// Path: app/src/main/java/com/jaus/albertogiunta/justintrain_oraritreni/utils/helpers/AnalyticsHelper.java
// public class AnalyticsHelper {
// 
//     /*
// 
//     adb shell setprop log.tag.FA VERBOSE
//     adb shell setprop log.tag.FA-SVC VERBOSE
//     adb logcat -v time -s FA FA-SVC
// 
//      */
// 
//     private FirebaseAnalytics firebase = null;
// 
//     private static AnalyticsHelper analyticsHelper;
// 
//     public static AnalyticsHelper getInstance(Context context) {
//         if (analyticsHelper == null) {
//             analyticsHelper = new AnalyticsHelper(context);
//         }
//         return analyticsHelper;
//     }
// 
//     private AnalyticsHelper(Context context) {
//         firebase = FirebaseAnalytics.getInstance(context);
//         firebase.setMinimumSessionDuration(3000);
// //        firebase.setUserId();
// //        firebase.setUserProperty();
//     }
// 
//     public void logScreenEvent(String screen, String action) {
//         Bundle bundle = new Bundle();
//         bundle.putString(FirebaseAnalytics.Param.CONTENT_TYPE, screen);
//         bundle.putString(FirebaseAnalytics.Param.ITEM_NAME, action);
//         bundle.putString(FirebaseAnalytics.Param.ITEM_ID, action);
//         firebase.logEvent(FirebaseAnalytics.Event.SELECT_CONTENT, bundle);
//     }
// }
// 
// Path: app/src/main/java/com/jaus/albertogiunta/justintrain_oraritreni/utils/constants/CONST_ANALYTICS.java
// public static final String ACTION_TUTORIAL_DONE = " Done Tutorial";
// 
// Path: app/src/main/java/com/jaus/albertogiunta/justintrain_oraritreni/utils/constants/CONST_ANALYTICS.java
// public static final String ACTION_TUTORIAL_NEXT = " Next slide";
// 
// Path: app/src/main/java/com/jaus/albertogiunta/justintrain_oraritreni/utils/constants/CONST_ANALYTICS.java
// public static final String ACTION_TUTORIAL_SKIP = " Skip Tutorial";
// 
// Path: app/src/main/java/com/jaus/albertogiunta/justintrain_oraritreni/utils/constants/CONST_ANALYTICS.java
// public static final String SCREEN_TUTORIAL           = "TUT";


import android.content.Context;
import android.graphics.Color;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import com.github.paolorotolo.appintro.AppIntro2;
import com.github.paolorotolo.appintro.AppIntro2Fragment;
import com.jaus.albertogiunta.justintrain_oraritreni.R;
import com.jaus.albertogiunta.justintrain_oraritreni.utils.helpers.AnalyticsHelper;
import uk.co.chrisjenx.calligraphy.CalligraphyContextWrapper;
import static com.jaus.albertogiunta.justintrain_oraritreni.utils.constants.CONST_ANALYTICS.ACTION_TUTORIAL_DONE;
import static com.jaus.albertogiunta.justintrain_oraritreni.utils.constants.CONST_ANALYTICS.ACTION_TUTORIAL_NEXT;
import static com.jaus.albertogiunta.justintrain_oraritreni.utils.constants.CONST_ANALYTICS.ACTION_TUTORIAL_SKIP;
import static com.jaus.albertogiunta.justintrain_oraritreni.utils.constants.CONST_ANALYTICS.SCREEN_TUTORIAL;
package com.jaus.albertogiunta.justintrain_oraritreni.tutorial;





public class IntroActivity extends AppIntro2 {

    AnalyticsHelper analyticsHelper;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        analyticsHelper = AnalyticsHelper.getInstance(this);
        addSlide(AppIntro2Fragment.newInstance("Percorri sempre la stessa tratta?",
                "Aggiungi le tue tratte e i tuoi treni abituali ai preferiti, per averli sempre a portata di mano!", R.drawable.tut1, Color.parseColor("#717C8D")));
        addSlide(AppIntro2Fragment.newInstance("Andata? Ritorno?", "No problem. Trascina la tratta preferita verso dove vuoi andare. Proprio come ti verrebbe naturale fare.", R.drawable.tut2, Color.parseColor("#717C8D")));
        addSlide(AppIntro2Fragment.newInstance("Treno poco affidabile?", "Tienilo sempre sotto controllo tramite la notifica!", R.drawable.tut3, Color.parseColor("#717C8D")));
    }

    @Override
    public void onDonePressed(Fragment currentFragment) {
        super.onDonePressed(currentFragment);
// Path: app/src/main/java/com/jaus/albertogiunta/justintrain_oraritreni/utils/helpers/AnalyticsHelper.java
// public class AnalyticsHelper {
// 
//     /*
// 
//     adb shell setprop log.tag.FA VERBOSE
//     adb shell setprop log.tag.FA-SVC VERBOSE
//     adb logcat -v time -s FA FA-SVC
// 
//      */
// 
//     private FirebaseAnalytics firebase = null;
// 
//     private static AnalyticsHelper analyticsHelper;
// 
//     public static AnalyticsHelper getInstance(Context context) {
//         if (analyticsHelper == null) {
//             analyticsHelper = new AnalyticsHelper(context);
//         }
//         return analyticsHelper;
//     }
// 
//     private AnalyticsHelper(Context context) {
//         firebase = FirebaseAnalytics.getInstance(context);
//         firebase.setMinimumSessionDuration(3000);
// //        firebase.setUserId();
// //        firebase.setUserProperty();
//     }
// 
//     public void logScreenEvent(String screen, String action) {
//         Bundle bundle = new Bundle();
//         bundle.putString(FirebaseAnalytics.Param.CONTENT_TYPE, screen);
//         bundle.putString(FirebaseAnalytics.Param.ITEM_NAME, action);
//         bundle.putString(FirebaseAnalytics.Param.ITEM_ID, action);
//         firebase.logEvent(FirebaseAnalytics.Event.SELECT_CONTENT, bundle);
//     }
// }
// 
// Path: app/src/main/java/com/jaus/albertogiunta/justintrain_oraritreni/utils/constants/CONST_ANALYTICS.java
// public static final String ACTION_TUTORIAL_DONE = " Done Tutorial";
// 
// Path: app/src/main/java/com/jaus/albertogiunta/justintrain_oraritreni/utils/constants/CONST_ANALYTICS.java
// public static final String ACTION_TUTORIAL_NEXT = " Next slide";
// 
// Path: app/src/main/java/com/jaus/albertogiunta/justintrain_oraritreni/utils/constants/CONST_ANALYTICS.java
// public static final String ACTION_TUTORIAL_SKIP = " Skip Tutorial";
// 
// Path: app/src/main/java/com/jaus/albertogiunta/justintrain_oraritreni/utils/constants/CONST_ANALYTICS.java
// public static final String SCREEN_TUTORIAL           = "TUT";


// Path: app/src/main/java/com/jaus/albertogiunta/justintrain_oraritreni/tutorial/IntroActivity.java
import android.content.Context;
import android.graphics.Color;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import com.github.paolorotolo.appintro.AppIntro2;
import com.github.paolorotolo.appintro.AppIntro2Fragment;
import com.jaus.albertogiunta.justintrain_oraritreni.R;
import com.jaus.albertogiunta.justintrain_oraritreni.utils.helpers.AnalyticsHelper;
import uk.co.chrisjenx.calligraphy.CalligraphyContextWrapper;
import static com.jaus.albertogiunta.justintrain_oraritreni.utils.constants.CONST_ANALYTICS.ACTION_TUTORIAL_DONE;
import static com.jaus.albertogiunta.justintrain_oraritreni.utils.constants.CONST_ANALYTICS.ACTION_TUTORIAL_NEXT;
import static com.jaus.albertogiunta.justintrain_oraritreni.utils.constants.CONST_ANALYTICS.ACTION_TUTORIAL_SKIP;
import static com.jaus.albertogiunta.justintrain_oraritreni.utils.constants.CONST_ANALYTICS.SCREEN_TUTORIAL;

package com.jaus.albertogiunta.justintrain_oraritreni.tutorial;





public class IntroActivity extends AppIntro2 {

    AnalyticsHelper analyticsHelper;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        analyticsHelper = AnalyticsHelper.getInstance(this);
        addSlide(AppIntro2Fragment.newInstance("Percorri sempre la stessa tratta?",
                "Aggiungi le tue tratte e i tuoi treni abituali ai preferiti, per averli sempre a portata di mano!", R.drawable.tut1, Color.parseColor("#717C8D")));
        addSlide(AppIntro2Fragment.newInstance("Andata? Ritorno?", "No problem. Trascina la tratta preferita verso dove vuoi andare. Proprio come ti verrebbe naturale fare.", R.drawable.tut2, Color.parseColor("#717C8D")));
        addSlide(AppIntro2Fragment.newInstance("Treno poco affidabile?", "Tienilo sempre sotto controllo tramite la notifica!", R.drawable.tut3, Color.parseColor("#717C8D")));
    }

    @Override
    public void onDonePressed(Fragment currentFragment) {
        super.onDonePressed(currentFragment);
        analyticsHelper.logScreenEvent(SCREEN_TUTORIAL, ACTION_TUTORIAL_DONE);