@Override
 protected void onStart() {
   super.onStart();
   EasyTracker.getInstance().activityStart(this);
   Thread thread =
       new Thread() {
         @Override
         public void run() {
           // Promote Test
           DramaAPI dramaAPI = new DramaAPI(TvChannelViewPagerActivity.this);
           ArrayList<Advertisement> advertisements = dramaAPI.getAdvertisementList(0);
           if (advertisements != null && advertisements.size() > 0) {
             TvDramaApplication.shIO.edit().putInt("advertisemsent_id", -1).commit();
             TvDramaApplication.shIO
                 .edit()
                 .putString("advertisemsent_url", advertisements.get(0).getUrl())
                 .commit();
             TvDramaApplication.shIO
                 .edit()
                 .putString("advertisemsent_title", advertisements.get(0).getTitle())
                 .commit();
             TvDramaApplication.shIO
                 .edit()
                 .putString("advertisemsent_description", advertisements.get(0).getDescription())
                 .commit();
           } else {
             TvDramaApplication.shIO.edit().putInt("advertisemsent_id", 0).commit();
           }
         }
       };
   // 開始執行執行緒
   thread.start();
 }
예제 #2
0
 private void
     comprobarganador() { // si todas las lineas están tachadas y guardadas con 2, alguien ha
                          // ganado
   EasyTracker easyTracker = EasyTracker.getInstance(this);
   for (i = 0; i < 15; i++) {
     if (array[i] == 2) {
       contador++;
     }
   }
   if (contador == 15) {
     if (elturno == 1) {
       Toast toast3 =
           Toast.makeText(
               getApplicationContext(),
               getString(R.string.ganador) + " " + getString(R.string.jugadoruno),
               Toast.LENGTH_LONG);
       toast3.show();
       easyTracker.send(
           MapBuilder.createEvent("Accion", "Ganador", "Primer Jugador", null).build());
       gotomenu();
     } else {
       Toast toast3 =
           Toast.makeText(
               getApplicationContext(),
               getString(R.string.ganador) + " " + getString(R.string.jugadordos),
               Toast.LENGTH_LONG);
       toast3.show();
       easyTracker.send(
           MapBuilder.createEvent("Accion", "Ganador", "Segundo Jugador", null).build());
       gotomenu();
     }
   }
   contador = 0;
 }
예제 #3
0
 @Override
 protected void onStop() {
   // TODO Auto-generated method stub
   // Stop track using Google Analytics
   super.onStop();
   EasyTracker.getInstance().activityStop(this);
 }
예제 #4
0
 @Override
 protected void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   setContentView(R.layout.tablero);
   EasyTracker.getInstance(this).activityStart(this);
   final TextView turno = (TextView) findViewById(R.id.textView1); // leemos el textView
   final String jugadoruno = getString(R.string.jugadoruno); // más variables
   final String jugadordos = getString(R.string.jugadordos); // más variables
   Button boton = (Button) findViewById(R.id.button1); // definimos el botón
   boton.setOnClickListener(
       new View.OnClickListener() { // leemos cuando el botón es pulsado
         public void onClick(View v) {
           for (i = 0; i < 15; i++) { // este code se encarga de que las lineas tachadas
             if (array[i] == 1) { // se guarden en el array con un 2, o lo que viene a
               array[i] = 2; // ser igual, no se podrán des-tachar.
               contador = 1; // contador es 1 si se ha convertido alguna línea
             }
           }
           if (contador == 1) { // si contador es 1, se cambia de turno
             linea = 0;
             if (elturno == 1) {
               turno.setText(jugadordos);
               elturno = 2;
             } else {
               turno.setText(jugadoruno);
               elturno = 1;
             }
           } else showFallo(); // si contador no es 1, no se ha tachado nada
           // puesto que no se ha cambiado ninguna linea a 2.
           contador = 0;
           comprobarganador(); // y aquí, tras empezar el nuevo turno, se comprueba si ha ganado
                               // alguien
         }
       });
 }
예제 #5
0
 @Override
 protected void onResume() {
   super.onResume();
   Varios.clearAllNotifications = false;
   AppEventsLogger.activateApp(this, getString(R.string.facebook_app_id));
   EasyTracker.getInstance(this).activityStart(this);
 }
예제 #6
0
  @Override
  protected void onStop() {
    super.onStop();

    if (Log.GANALYTICS) {
      EasyTracker.getInstance(getApplicationContext()).activityStop(this);
    }
  }
예제 #7
0
 @Override
 protected void onStart() {
   AppEventsLogger logger = uiHelper.getAppEventsLogger();
   super.onStart();
   logger.logEvent("Home");
   mDataLayer = TagManager.getInstance(this).getDataLayer();
   mDataLayer.push(DataLayer.mapOf("event", "screenVisible", "screenName", SCREEN_NAME));
   EasyTracker.getInstance(this).activityStart(this);
 }
예제 #8
0
 @Override
 public void onStart() {
   super.onStart();
   if (AppConfig.MIBOX_VERSION) {
     MiStatInterface.recordPageStart(this, "TutorialActivity");
   } else {
     EasyTracker.getInstance(this).activityStart(this);
   }
 }
예제 #9
0
 @Override
 public void onStop() {
   super.onStop();
   if (AppConfig.MIBOX_VERSION) {
     MiStatInterface.recordPageEnd();
   } else {
     EasyTracker.getInstance(this).activityStop(this);
   }
 }
예제 #10
0
  @Override
  protected void onStop() {
    SFLogger.d(TAG, "onStop");
    super.onStop();
    EasyTracker.getInstance(this).activityStop(this);

    this.gameSound.release();
    this.surfaceView.setRenderState(HithamsterView.RENDER_STATE.RENDER_STATE_STOP);
  }
예제 #11
0
  @Override
  protected void onStop() {
    super.onStop();

    /* Implementation of Google Analytics for Android */
    if (!(ConstantValues.URL == "http://www.trustripes.com"
        && ConstantValues.isInDevelopmentTeam(realId))) {
      EasyTracker.getInstance().activityStop(this);
    }
  }
  @Override
  public void onCreate(Bundle savedState) {
    super.onCreate(savedState);

    EasyTracker.getInstance().setContext(getActivity());

    if (savedState != null && mTopicLeaf == null) {
      mTopicLeaf = (TopicLeaf) savedState.getSerializable(SAVED_TOPIC);
    }
  }
예제 #13
0
  @Override
  public void onStart() {
    super.onStart();

    EasyTracker.getInstance().activityStart(this);

    final GoogleAnalytics analytics = GoogleAnalytics.getInstance(this);
    mTracker = analytics.getTracker(getString(R.string.ga_trackingId));
    mTracker.sendEvent("activity_phone", "start", "phone", 0l);

    GAServiceManager.getInstance().dispatch();
  }
예제 #14
0
 protected void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   ActionBar actionBar = getActionBar();
   //		actionBar.setDisplayHomeAsUpEnabled(true);
   setContentView(R.layout.tsquare_main);
   overridePendingTransition(R.anim.fade, R.anim.hold);
   EasyTracker.getInstance(this).activityStart(this);
   GoogleAnalytics.getInstance(this).getTracker(MainActivity.TRACKING);
   Tracker tracker = GoogleAnalytics.getInstance(this).getTracker(MainActivity.TRACKING);
   tracker.send(
       MapBuilder.createAppView()
           .set(Fields.SCREEN_NAME, "T-Square Final " + actionBar.getTitle())
           .build());
 }
예제 #15
0
  @Override
  public void onCreate() {
    super.onCreate();
    EasyTracker.getInstance().setContext(this);

    TraceDroid.init(this);
    Log.setTAG("gobandroid");

    interaction_scope = new InteractionScope();

    if (Build.VERSION.SDK_INT > 7) // need at least 8 for C2DM
    initGCM();

    GobandroidBackend.registerDevice(this);
  }
  public static void trackScreen(Context ctx, String screenName) {
    // May return null if EasyTracker has not yet been initialized with a property ID.
    Tracker easyTracker = EasyTracker.getInstance(ctx);

    // This screen name value will remain set on the tracker and sent with
    // hits until it is set to a new value or to null.
    // easyTracker.set( Fields.SCREEN_NAME, screenName );

    // Set dispatch period.
    easyTracker.send(
        MapBuilder.createAppView()
            .set(Fields.SCREEN_NAME, screenName)
            .set(Fields.HIT_TYPE, "appview")
            .build());
  }
  /**
   * **
   *
   * @param ctx Context.
   * @param eventCatagory Required. For e.g. ui_event, ux_event
   * @param eventName Required. Name of the event. For e.g. button_press
   * @param eventLabel
   * @param eventValue **
   */
  public static void trackEvent(
      Context ctx, String eventCatagory, String eventName, String eventLabel, long eventValue) {
    // May return null if a EasyTracker has not yet been initialized with a
    // property ID.
    EasyTracker easyTracker = EasyTracker.getInstance(ctx);

    // MapBuilder.createEvent().build() returns a Map of event fields and values
    // that are set and sent with the hit.
    easyTracker.send(
        MapBuilder.createEvent(
                eventCatagory, // Event category (required)
                eventName, // Event action (required)
                eventLabel, // Event label
                eventValue) // Event value
            .build());
  }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    UIUtils.tryTranslateHttpIntent(this);
    BeamUtils.tryUpdateIntentFromBeam(this);

    super.onCreate(savedInstanceState);

    setContentView(R.layout.activity_sessions_sandbox);

    final FragmentManager fm = getSupportFragmentManager();
    mTracksDropdownFragment =
        (TracksDropdownFragment) fm.findFragmentById(R.id.fragment_tracks_dropdown);

    mSlidingPaneLayout = (SlidingPaneLayout) findViewById(R.id.sliding_pane_layout);

    // Offset the left pane by its full width and left margin when collapsed
    // (ViewPager-like presentation)
    mSlidingPaneLayout.setParallaxDistance(
        getResources().getDimensionPixelSize(R.dimen.sliding_pane_width)
            + getResources().getDimensionPixelSize(R.dimen.multipane_padding));
    mSlidingPaneLayout.setSliderFadeColor(
        getResources().getColor(R.color.sliding_pane_content_fade));

    routeIntent(getIntent(), savedInstanceState != null);

    if (savedInstanceState != null) {
      if (mFullUI) {
        int viewType = savedInstanceState.getInt(STATE_VIEW_TYPE);
        getSupportActionBar().setSelectedNavigationItem(viewType);
      }

      mDetailFragment = fm.findFragmentById(R.id.fragment_container_detail);
      updateDetailBackground();
    }

    // This flag prevents onTabSelected from triggering extra master pane reloads
    // unless it's actually being triggered by the user (and not automatically by
    // the system)
    mInitialTabSelect = false;

    mImageLoader =
        new ImageLoader(this, R.drawable.person_image_empty)
            .setMaxImageSize(getResources().getDimensionPixelSize(R.dimen.speaker_image_size))
            .setFadeInImage(UIUtils.hasHoneycombMR1());

    EasyTracker.getInstance().setContext(this);
  }
  @SuppressWarnings("deprecation")
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    Log.d(TAG, "on create called...");
    activity = this;
    setContentView(R.layout.activity_show_reminder);
    // For hide Keyboard
    View view = (View) findViewById(R.id.reminders);
    Util.setupUI(view, this);
    EasyTracker.getInstance().setContext(getApplicationContext());
    tracker = EasyTracker.getTracker();
    tracker.trackView("List of Reminders Digital_Diary");
    getIds();
    addListener();
    Util.addGoogleAds(this);

    // setContentView(R.layout.custom_adapter);

  }
예제 #20
0
  private void _init() {
    NativeUtils.configure(this);
    if (ConfigUtils.USE_AD_MOB) {
      _initAdMob();
    }

    if (ConfigUtils.USE_ADBUDDIZ) {
      AdBuddiz.setPublisherKey(getResources().getString(R.string.adbuddiz_key));
      if (ConfigUtils.TEST_ADBUDDIZ) {
        AdBuddiz.setLogLevel(AdBuddizLogLevel.Info);
        AdBuddiz.setTestModeActive();
      }
      AdBuddiz.cacheAds(UtilActivity.this);
    }

    tracker =
        GoogleAnalytics.getInstance(this)
            .getTracker(getResources().getString(R.string.ga_trackingId));

    easyTracker = EasyTracker.getInstance(this);
  }
예제 #21
0
  @Override
  public void onCreate() {
    super.onCreate();

    // set provider authority
    CONTENT_AUTHORITY = getPackageName() + ".provider";

    // initialize settings on first run
    PreferenceManager.setDefaultValues(this, R.xml.settings_basic, false);
    PreferenceManager.setDefaultValues(this, R.xml.settings_advanced, false);

    // ensure the notifications service is started (we also restart it on
    // boot)
    Utils.runNotificationService(this);

    // load the current theme into a global variable
    final String theme =
        PreferenceManager.getDefaultSharedPreferences(this)
            .getString(SeriesGuidePreferences.KEY_THEME, "0");
    Utils.updateTheme(theme);

    // set a context for Google Analytics
    EasyTracker.getInstance().setContext(getApplicationContext());
  }
예제 #22
0
파일: Info.java 프로젝트: rubensworks/hydra
  @Override
  public void onCreate(Bundle icicle) {
    super.onCreate(icicle);
    setTitle(R.string.title_info);

    EasyTracker.getInstance().setContext(this);

    NSArrayWrapper wrapper = (NSArrayWrapper) getIntent().getParcelableExtra("content");
    NSArray content;
    if (wrapper != null) {
      content = wrapper.array;
    } else {
      try {
        content =
            (NSArray)
                XMLPropertyListParser.parse(getResources().openRawResource(R.raw.info_content));

      } catch (Exception ex) {
        Log.e("[Hydra.Info]", "Failed to parse the info content!");
        ex.printStackTrace();
        this.finish();
        return;
      }
    }

    if (getIntent() != null) {
      if (getIntent().getStringExtra("tracking") == null) {
        getIntent().putExtra("tracking", "Info");
      } else {
        EasyTracker.getTracker().sendView(getIntent().getStringExtra("tracking"));
        Log.i("Tracking", getIntent().getStringExtra("tracking"));
      }
    }

    setListAdapter(new InfoList(this, content));
  }
예제 #23
0
 @Override
 protected void onStop() {
   super.onStop();
   EasyTracker.getInstance().activityStop(this); // Add this method.
 }
 @Override
 protected void onStart() {
   super.onStart();
   EasyTracker.getInstance().activityStart(this);
 }
예제 #25
0
 @Override
 public void onStop() {
   super.onStop();
   // The rest of your onStop() code.
   EasyTracker.getInstance(this).activityStop(this); // Add this method.
 }
예제 #26
0
 @Override
 public void onStop() {
   super.onStop();
   EasyTracker.getInstance(this).activityStop(this); // Add this method.
 }
예제 #27
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    overridePendingTransition(R.anim.push_right_in, R.anim.push_right_out);

    int actionBarTitle = Resources.getSystem().getIdentifier("action_bar_title", "id", "android");
    TextView actionBarTitleView = (TextView) getWindow().findViewById(actionBarTitle);

    Typeface robotoBoldCondensedItalic =
        Typeface.createFromAsset(getAssets(), "fonts/Mallanna.ttf");
    if (actionBarTitleView != null) {
      actionBarTitleView.setTypeface(robotoBoldCondensedItalic);
    }

    setContentView(R.layout.eng_activity_main);

    FontsOverride.setDefaultFont(this, "DEFAULT", "fonts/Mallanna.ttf");
    FontsOverride.setDefaultFont(this, "MONOSPACE", "fonts/Mallanna.ttf");
    FontsOverride.setDefaultFont(this, "SERIF", "fonts/Mallanna.ttf");
    FontsOverride.setDefaultFont(this, "SANS_SERIF", "fonts/Mallanna.ttf");

    // Adding Google Analytics...
    easyTracker = EasyTracker.getInstance(EngSongs.this);
    easyTracker.send(
        MapBuilder.createEvent("TrackEventTest", "page_loaded", "main_page", null).build());

    try {
      int a[] = new int[2];
      int num = a[4];
    } catch (ArrayIndexOutOfBoundsException e) {
      easyTracker.send(
          MapBuilder.createException(
                  new StandardExceptionParser(EngSongs.this, null)
                      .getDescription(Thread.currentThread().getName(), e),
                  false)
              .build());
    }

    // Locate the Banner Ad in activity_main.xml
    AdView adView = (AdView) this.findViewById(R.id.adView);

    // Request for Ads
    AdRequest adRequest =
        new AdRequest.Builder()

            // Add a test device to show Test Ads

            .addTestDevice("2181F924609987B5E1B7117BAB38E3DA")
            .build();

    // Load ads into Banner Ads
    adView.loadAd(adRequest);

    // Load ads into Interstitial Ads

    // Prepare an Interstitial Ad Listener

    ll = (LinearLayout) findViewById(R.id.adLayoutView);
    if (isNetworkAvailable(getBaseContext())) {
      ll.setVisibility(LinearLayout.VISIBLE);

    } else {
      ll.setVisibility(LinearLayout.GONE);
    }

    Locale locale = new Locale("te");
    Locale.setDefault(locale);
    config = new Configuration();
    config.locale = locale;
    getBaseContext()
        .getResources()
        .updateConfiguration(config, getBaseContext().getResources().getDisplayMetrics());

    mfont = Typeface.createFromAsset(getAssets(), "fonts/Mallanna.ttf");

    Resources res = getResources();

    String lis[] = res.getStringArray(R.array.Eng_Alphabets);
    final List<String> Alphalist = Arrays.asList(lis);
    songlis = res.getStringArray(R.array.Eng_SongList);
    lv = (ListView) findViewById(R.id.listView1);
    lv2 = (ListView) findViewById(R.id.listView2);
    adapter = new ArrayAdapter<String>(EngSongs.this, R.layout.activity_listview, lis);

    lv.setAdapter(adapter);

    String str = songlis[0];
    String result[] = str.split(",");
    adapter2 = new ArrayAdapter<String>(EngSongs.this, R.layout.activity_listview, result);
    lv2.setAdapter(adapter2);

    LayoutAnimationController controller =
        AnimationUtils.loadLayoutAnimation(this, R.anim.list_layout_controller);
    lv2.setLayoutAnimation(controller);

    lv.setOnItemClickListener(this);
    lv2.setOnItemClickListener(
        new OnItemClickListener() {
          public void onItemClick(AdapterView<?> parent, View view, int position, long id) {

            song = position;
            Intent i = new Intent(getApplicationContext(), EngLyricDisp.class);
            i.putExtra("pos", "" + (indexes[letter] + song));

            startActivity(i);
          }
        });
  }
예제 #28
0
 @Override
 protected void onStart() {
   SFLogger.d(TAG, "onStart");
   super.onStart();
   EasyTracker.getInstance(this).activityStart(this);
 }
예제 #29
0
 @Override
 public void onStart() {
   super.onStart();
   EasyTracker.getInstance(this).activityStart(this);
 }
예제 #30
0
        @Override
        public void onClick(View v) {
          sd.close();
          int index = (Integer) v.getTag();
          String className = classNames[index];
          FlurryAgent.logEvent(FlurryStrings.getEventNameForActivity(className));
          Activity currentActivity = (Activity) v.getContext();

          if (!currentActivity.getClass().getName().equals(className)) {
            Intent intent = new Intent();
            intent.setClassName(currentActivity, className);

            if (className.equals(HomeActivity.class.getName())) {
              intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
            }

            if (className.equals(EventsAndPromotionsActivity.class.getName())) {
              intent.putExtra(
                  EventsAndPromotionsActivity.CURRENT_TYPE,
                  EventsAndPromotionsActivity.TYPE_PROMOTION);

              EasyTracker easyTracker = EasyTracker.getInstance(context);
              easyTracker.set(Fields.SCREEN_NAME, Const.GAStrings.DEALS_MAIN);
              easyTracker.send(MapBuilder.createAppView().build());
            }

            if (className.equals(ThingsToDo_MySentosaActivity.class.getName()))
              intent.putExtra(
                  ThingsToDo_MySentosaActivity.CURRENT_TYPE,
                  index == 1
                      ? ThingsToDo_MySentosaActivity.TYPE_THINGSTODO
                      : ThingsToDo_MySentosaActivity.TYPE_MYSENTOSA);

            if (className.equals(TicketsActivity.class.getName()))
              intent.putExtra(TicketsActivity.TICKET_TYPE, "Package");

            if (className.equals(IslanderActivity.class.getName())) {
              EasyTracker easyTracker = EasyTracker.getInstance(context);
              easyTracker.set(Fields.SCREEN_NAME, Const.GAStrings.ISLANDER_MAIN);
              easyTracker.send(MapBuilder.createAppView().build());
            }

            currentActivity.startActivity(intent);

          } else {
            // we have an exception here, EVENTS and PROMOTIONS use a same activity => code above
            // will not run in case moving from EVENTS to PROMOTIONS screen
            if (className.equals(EventsAndPromotionsActivity.class.getName())) {
              if (((EventsAndPromotionsActivity) currentActivity).isEvent()) {
                // Can not move from PROMOTIONS to EVENTS, only 1 way: EVENTS to PROMOTIONS
                Intent intent = new Intent();
                intent.setClassName(currentActivity, className);

                intent.putExtra(
                    EventsAndPromotionsActivity.CURRENT_TYPE,
                    EventsAndPromotionsActivity.TYPE_PROMOTION);

                EasyTracker easyTracker = EasyTracker.getInstance(context);
                easyTracker.set(Fields.SCREEN_NAME, Const.GAStrings.DEALS_MAIN);
                easyTracker.send(MapBuilder.createAppView().build());

                currentActivity.startActivity(intent);
              }
            }
          }
        }