Esempio n. 1
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_about);
    // Firebase Analytics
    FirebaseAnalytics mFirebaseAnalytics = FirebaseAnalytics.getInstance(this);
    mFirebaseAnalytics.logEvent(Helper.EVENT_SHOW_ABOUT, new Bundle());

    TextView authors = (TextView) findViewById(R.id.about_authors);
    authors.setMovementMethod(android.text.method.LinkMovementMethod.getInstance());

    // easter egg
    clickCount = 0;
    ImageView logo = (ImageView) findViewById(R.id.deepspace_logo);
    logo.setOnClickListener(
        new View.OnClickListener() {
          @Override
          public void onClick(View v) {
            if (clickCount >= 5) {
              Snackbar.make(
                      findViewById(R.id.about_activity),
                      R.string.wgs_assitance,
                      Snackbar.LENGTH_LONG)
                  .show();
              clickCount = 0;
            } else {
              clickCount++;
            }
          }
        });
  }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_card_details);
    Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
    setSupportActionBar(toolbar);
    this.context = this;

    container = (LinearLayout) findViewById(R.id.container);

    learnApiImplements = LazzyBeeSingleton.learnApiImplements;

    _initSettingUser();

    mViewPager = (ViewPager) findViewById(R.id.viewpager);
    mSlidingTabLayout = (SlidingTabLayout) findViewById(R.id.sliding_tabs);

    getSupportActionBar().setDisplayHomeAsUpEnabled(true);

    _displayCard(getCarID());

    _initAdView();

    _trackerApplication();

    FirebaseAnalytics firebaseAnalytics = FirebaseAnalytics.getInstance(this);
    firebaseAnalytics.logEvent(LazzyBeeShare.FA_OPEN_DICTIONARY_VIEW_WORD, new Bundle());
  }
Esempio n. 3
0
  @Override
  public void initSplash(ConfigSplash configSplash) {

    FirebaseMessaging.getInstance().subscribeToTopic(Define.APP_NAME);
    mDeviceToken = FirebaseInstanceId.getInstance().getToken();
    Log.d("token", "Refreshed token: " + mDeviceToken);

    mFirebaseAnalytics = FirebaseAnalytics.getInstance(this);

    Bundle bundle = new Bundle();
    bundle.putString(FirebaseAnalytics.Param.CONTENT_TYPE, "SplashScreen");
    mFirebaseAnalytics.logEvent(FirebaseAnalytics.Event.APP_OPEN, bundle);

    configSplash.setBackgroundColor(R.color.accent);
    configSplash.setAnimCircularRevealDuration(Define.SPLASH_SCREEN_BACKGROUND_TIME);
    configSplash.setRevealFlagX(Flags.REVEAL_RIGHT);
    configSplash.setRevealFlagY(Flags.REVEAL_BOTTOM);

    configSplash.setLogoSplash(R.drawable.logo_logishub);
    configSplash.setAnimLogoSplashDuration(Define.SPLASH_SCREEN_LOGO_TIME);
    configSplash.setAnimLogoSplashTechnique(Techniques.Bounce);

    configSplash.setTitleSplash("NeoSystems co., Ltd.");
    configSplash.setTitleTextColor(R.color.monsoon);
    configSplash.setTitleTextSize(16f);
    configSplash.setAnimTitleDuration(Define.SPLASH_SCREEN_TEXT_TIME);
    configSplash.setAnimTitleTechnique(Techniques.FadeIn);
  }
 @Override
 public void reportScreen() {
   setScreenName();
   Bundle bundle = createBaseEventBundle();
   mAnalytics.logEvent(EVENT_VIEW, bundle);
   Timber.d("GAnalytics Screen tracked: %s", mScreenName);
 }
Esempio n. 5
0
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    getWindow()
        .getDecorView()
        .setSystemUiVisibility(
            View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
                | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
                | View.SYSTEM_UI_FLAG_LAYOUT_STABLE);
    setContentView(R.layout.settings_activity);

    if (getIntent() != null
        && getIntent().getCategories() != null
        && getIntent()
            .getCategories()
            .contains(Notification.INTENT_CATEGORY_NOTIFICATION_PREFERENCES)) {
      FirebaseAnalytics.getInstance(this).logEvent("notification_preferences_open", null);
      mStartSection = START_SECTION_ADVANCED;
    }

    // Set up UI widgets
    setupAppBar();

    ((DrawInsetsFrameLayout) findViewById(R.id.draw_insets_frame_layout))
        .setOnInsetsCallback(
            new DrawInsetsFrameLayout.OnInsetsCallback() {
              @Override
              public void onInsetsChanged(Rect insets) {
                View container = findViewById(R.id.container);
                ViewGroup.MarginLayoutParams lp =
                    (ViewGroup.MarginLayoutParams) container.getLayoutParams();
                lp.leftMargin = insets.left;
                lp.topMargin = insets.top;
                lp.rightMargin = insets.right;
                lp.bottomMargin = insets.bottom;
                container.setLayoutParams(lp);
              }
            });

    if (mBackgroundAnimator != null) {
      mBackgroundAnimator.cancel();
    }

    mBackgroundAnimator = ObjectAnimator.ofFloat(this, "backgroundOpacity", 0, 1);
    mBackgroundAnimator.setDuration(1000);
    mBackgroundAnimator.start();
  }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    if (BuildConfig.DEBUG) {
      // デバッグ時にステータスバー消去
      getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
    }

    setContentView(getLayoutId());
    prepareCreate();

    // ToolBar
    mToolBar = (Toolbar) findViewById(R.id.toolbar);
    mToolBar.setTitle(R.string.app_name);
    mToolBar.inflateMenu(getToolBarId());
    if (!mToolBarEnabled) {
      mToolBar.setVisibility(View.GONE);
    }

    // FloatingActionButton
    FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
    fab.setOnClickListener(
        new View.OnClickListener() {
          @Override
          public void onClick(View view) {
            // TODO:クリック時の動作を指定できる仕組みを作る
            Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
                .setAction("Action", null)
                .show();
          }
        });
    if (!mFabEnabled) {
      fab.setVisibility(View.GONE);
    }

    // NavigationView
    final DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
    ActionBarDrawerToggle toggle =
        new ActionBarDrawerToggle(
            this,
            drawer,
            mToolBar,
            R.string.navigation_drawer_open,
            R.string.navigation_drawer_close);
    toggle.setDrawerIndicatorEnabled(true);
    drawer.setDrawerListener(toggle);
    toggle.syncState();

    NavigationView navigationView = (NavigationView) findViewById(getNavViewId());
    navigationView.setNavigationItemSelectedListener(this);

    mToolBar.setNavigationOnClickListener(
        new View.OnClickListener() {
          @Override
          public void onClick(View v) {
            if (drawer.isDrawerOpen(Gravity.LEFT)) {
              drawer.closeDrawer(Gravity.LEFT);
            } else {
              drawer.openDrawer(Gravity.LEFT);
            }
          }
        });

    mFirebaseAnalytics = FirebaseAnalytics.getInstance(this);
  }
 @Override
 protected void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   setupActionBar();
   firebaseAnalytics = FirebaseAnalytics.getInstance(this);
 }
Esempio n. 8
0
 public static void doHeartbeat(FirebaseAnalytics firebaseAnalytics) {
   final String HEARTBEAT = "HEARTBEAT";
   Bundle bundle = new Bundle();
   bundle.putString(HEARTBEAT, HEARTBEAT);
   firebaseAnalytics.logEvent(HEARTBEAT, bundle);
 }
 protected void reportEvent(String event, Bundle bundle) {
   mAnalytics.logEvent(event, bundle);
   Timber.d("GAnalytics Event tracked: %s - %s", mScreenName, bundle.toString());
 }
 /**
  * Tracks an event
  *
  * @param event Action to track
  */
 protected void reportEvent(String event) {
   Bundle bundle = createBaseEventBundle();
   mAnalytics.logEvent(event, bundle);
   Timber.d("GAnalytics Event tracked: %s - %s", mScreenName, event);
 }