Search in sources :

Example 1 with ConsumerData

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

the class ConsumerActivity method handleConsumer.

// //////////
// Event bus listeners
// 
@Subscribe
public void handleConsumer(ConsumerEvent event) {
    Logger.d("handleConsumer()");
    hideProgress();
    ConsumerData data = event.getEventData().getModelData().getConsumerData();
    SettingsProvider.getInstance().saveSubscriptionCount(data.getSubscriptionCount());
    SettingsProvider.getInstance().setString(SettingsProvider.CONSUMER_EMAIL, consumer.email);
    SettingsProvider.getInstance().setString(SettingsProvider.CONSUMER_PASSWORD, consumer.password);
    Bundle extras = new Bundle();
    extras.putBoolean(LoginActivity.PARAMETERS_FORCE_LOGIN, true);
    NavigationHelper.getInstance(ConsumerActivity.this).switchToLoginScreen(ConsumerActivity.this, extras);
}
Also used : ConsumerData(com.zype.android.webapi.model.consumers.ConsumerData) Bundle(android.os.Bundle) Subscribe(com.squareup.otto.Subscribe)

Aggregations

Bundle (android.os.Bundle)1 Subscribe (com.squareup.otto.Subscribe)1 ConsumerData (com.zype.android.webapi.model.consumers.ConsumerData)1