Search in sources :

Example 1 with Consumer

use of com.zype.android.webapi.model.consumers.Consumer in project zype-android by zype.

the class SearchActivity method handleConsumer.

@Subscribe
public void handleConsumer(ConsumerEvent event) {
    // TODO
    Logger.d("handleConsumer");
    Consumer data = event.getEventData().getModelData();
    int subscriptionCount = data.getConsumerData().getSubscriptionCount();
    SettingsProvider.getInstance().saveSubscriptionCount(subscriptionCount);
}
Also used : Consumer(com.zype.android.webapi.model.consumers.Consumer) Subscribe(com.squareup.otto.Subscribe)

Example 2 with Consumer

use of com.zype.android.webapi.model.consumers.Consumer in project zype-android by zype.

the class LoginActivity method handleConsumer.

@Subscribe
public void handleConsumer(ConsumerEvent event) {
    Consumer data = event.getEventData().getModelData();
    int subscriptionCount = data.getConsumerData().getSubscriptionCount();
    SettingsProvider.getInstance().saveSubscriptionCount(subscriptionCount);
    String consumerId = data.getConsumerData().getId();
    SettingsProvider.getInstance().saveConsumerId(consumerId);
    showProgress(false);
    setResult(RESULT_OK);
    finish();
}
Also used : Consumer(com.zype.android.webapi.model.consumers.Consumer) Subscribe(com.squareup.otto.Subscribe)

Example 3 with Consumer

use of com.zype.android.webapi.model.consumers.Consumer in project zype-android by zype.

the class MainActivity method handleConsumer.

// @Override
// public void openVideoFragment(String url) {
// Logger.d("openVideoFragment " + url);
// //        LatestFragment f = (LatestFragment) mSectionsPagerAdapter.getItem(0);
// //        f.showVideoFragment(url);
// }
// -------------------SUBSCRIBE-------------------
@Subscribe
public void handleConsumer(ConsumerEvent event) {
    // TODO
    Logger.d("handleConsumer");
    Consumer data = event.getEventData().getModelData();
    int subscriptionCount = data.getConsumerData().getSubscriptionCount();
    SettingsProvider.getInstance().saveSubscriptionCount(subscriptionCount);
}
Also used : Consumer(com.zype.android.webapi.model.consumers.Consumer) Subscribe(com.squareup.otto.Subscribe)

Aggregations

Subscribe (com.squareup.otto.Subscribe)3 Consumer (com.zype.android.webapi.model.consumers.Consumer)3