// Path: app/src/main/java/app/presentation/foundation/BaseApp.java
// public class BaseApp extends Application {
//     private PresentationComponent presentationComponent;
//     private GoogleAnalytics analytics;
//     private Tracker tracker;
// 
//     @Override public void onCreate() {
//         super.onCreate();
//         initInject();
//         AppCare.YesSir.takeCareOn(this);
//         initGcm();
//         initGoogleAnalytics();
//     }
// 
//     private void initInject() {
//         presentationComponent = DaggerPresentationComponent.builder()
//                 .presentationModule(new PresentationModule(this))
//                 .build();
//     }
// 
//     private void initGcm() {
//         RxGcm.Notifications.register(this, GcmMessageReceiver.class, GcmReceiverBackground.class)
//                 .subscribe(token -> {}, error -> {});
// 
//         RxGcm.Notifications.onRefreshToken(GcmTokenReceiver.class);
//     }
// 
//     private void initGoogleAnalytics() {
//         analytics = GoogleAnalytics.getInstance(this);
// 
//         if(BuildConfig.DEBUG) {
//             // true = for log output, it does not sent data to Google Analytics
//             analytics.setDryRun(true);
//             // To enable debug logging on a device run:
//             // adb shell setprop log.tag.GAv4 DEBUG
//             // adb logcat -s GAv4
//             // true = disable google analytics on the app
// //        analytics.setAppOptOut(true);
//         }
// 
//         tracker = analytics.newTracker(getString(R.string.ga_trackingId));
//         tracker.enableExceptionReporting(true);
//         tracker.enableAdvertisingIdCollection(true);
//         tracker.enableAutoActivityTracking(false);
//     }
// 
//     public Tracker getTracker() {
//         return tracker;
//     }
// 
//     public PresentationComponent getPresentationComponent() {
//         return presentationComponent;
//     }
// 
//     @Nullable public BaseActivity getLiveActivity(){
//         return (BaseActivity) AppCare.YesSir.getLiveActivityOrNull();
//     }
// }


import app.presentation.foundation.BaseApp;
import rx.Observable;
import rx_gcm.GcmReceiverData;
import rx_gcm.Message;
package app.data.foundation.gcm;


/**
 * Created by victor on 12/04/16.
 */
public final class GcmMessageReceiver implements GcmReceiverData {

    @Override public Observable<Message> onNotification(Observable<Message> oMessage) {
        return oMessage.flatMap(message -> {
// Path: app/src/main/java/app/presentation/foundation/BaseApp.java
// public class BaseApp extends Application {
//     private PresentationComponent presentationComponent;
//     private GoogleAnalytics analytics;
//     private Tracker tracker;
// 
//     @Override public void onCreate() {
//         super.onCreate();
//         initInject();
//         AppCare.YesSir.takeCareOn(this);
//         initGcm();
//         initGoogleAnalytics();
//     }
// 
//     private void initInject() {
//         presentationComponent = DaggerPresentationComponent.builder()
//                 .presentationModule(new PresentationModule(this))
//                 .build();
//     }
// 
//     private void initGcm() {
//         RxGcm.Notifications.register(this, GcmMessageReceiver.class, GcmReceiverBackground.class)
//                 .subscribe(token -> {}, error -> {});
// 
//         RxGcm.Notifications.onRefreshToken(GcmTokenReceiver.class);
//     }
// 
//     private void initGoogleAnalytics() {
//         analytics = GoogleAnalytics.getInstance(this);
// 
//         if(BuildConfig.DEBUG) {
//             // true = for log output, it does not sent data to Google Analytics
//             analytics.setDryRun(true);
//             // To enable debug logging on a device run:
//             // adb shell setprop log.tag.GAv4 DEBUG
//             // adb logcat -s GAv4
//             // true = disable google analytics on the app
// //        analytics.setAppOptOut(true);
//         }
// 
//         tracker = analytics.newTracker(getString(R.string.ga_trackingId));
//         tracker.enableExceptionReporting(true);
//         tracker.enableAdvertisingIdCollection(true);
//         tracker.enableAutoActivityTracking(false);
//     }
// 
//     public Tracker getTracker() {
//         return tracker;
//     }
// 
//     public PresentationComponent getPresentationComponent() {
//         return presentationComponent;
//     }
// 
//     @Nullable public BaseActivity getLiveActivity(){
//         return (BaseActivity) AppCare.YesSir.getLiveActivityOrNull();
//     }
// }


// Path: app/src/main/java/app/data/foundation/gcm/GcmMessageReceiver.java
import app.presentation.foundation.BaseApp;
import rx.Observable;
import rx_gcm.GcmReceiverData;
import rx_gcm.Message;

package app.data.foundation.gcm;


/**
 * Created by victor on 12/04/16.
 */
public final class GcmMessageReceiver implements GcmReceiverData {

    @Override public Observable<Message> onNotification(Observable<Message> oMessage) {
        return oMessage.flatMap(message -> {
            BaseApp baseApp = (BaseApp) message.application();