Search in sources :

Example 1 with ConnectionListener

use of com.fitpay.android.paymentdevice.callbacks.ConnectionListener in project fitpay-android-sdk by fitpay.

the class NotificationsTest method init.

@BeforeClass
@SuppressWarnings("unchecked")
public static void init() {
    listener = new ConnectionListener() {

        @Override
        public void onDeviceStateChanged(@Connection.State int state) {
            log("checkNotification receive:" + state);
            testState = state;
        }
    };
    manager = NotificationManager.getInstance();
    listeners = (List<Listener>) getPrivateField(manager, "mListeners");
    subscriptions = (ConcurrentHashMap<Class, Subscription>) getPrivateField(manager, "mSubscriptions");
    commands = (ConcurrentHashMap<Class, List<Command>>) getPrivateField(manager, "mCommands");
}
Also used : Listener(com.fitpay.android.utils.Listener) ConnectionListener(com.fitpay.android.paymentdevice.callbacks.ConnectionListener) AfterClass(org.junit.AfterClass) BeforeClass(org.junit.BeforeClass) List(java.util.List) ConnectionListener(com.fitpay.android.paymentdevice.callbacks.ConnectionListener) Subscription(rx.Subscription) BeforeClass(org.junit.BeforeClass)

Aggregations

ConnectionListener (com.fitpay.android.paymentdevice.callbacks.ConnectionListener)1 Listener (com.fitpay.android.utils.Listener)1 List (java.util.List)1 AfterClass (org.junit.AfterClass)1 BeforeClass (org.junit.BeforeClass)1 Subscription (rx.Subscription)1