Exemplo n.º 1
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    MobclickAgent.onError(this);
    UMFeedbackService.enableNewReplyNotification(this, NotificationType.AlertDialog);

    setContentView(R.layout.activity_main);

    mGoodsAdapter =
        new GoodsItemAdapter(this, R.id.imageView1, GoodsItemManager.instance().getGoodsItems());

    // mAdapter = new SGVAdapter(this);
    mSGV = (StaggeredGridView) findViewById(R.id.grid);
    // mSGV.setColumnCount(-1);
    // mSGV.setAdapter(mAdapter);
    mSGV.setAdapter(mGoodsAdapter);
    // mSGV.setAdapter(new EndlessGoodsItemAdapter(this, mGoodsAdapter, R.id.textView1));
    mSGV.setItemMargin(10);
    mGoodsAdapter.notifyDataSetChanged();

    mProgress = (ProgressBar) findViewById(R.id.progress);

    mGaInstance = GoogleAnalytics.getInstance(this);
    mGaTracker = mGaInstance.getTracker("UA-39513550-1");
  }
Exemplo n.º 2
0
 @Override
 public void onAttach(Activity activity) {
   super.onAttach(activity);
   googleAnalytics = GoogleAnalytics.getInstance(activity);
   tracker = googleAnalytics.getTracker("UA-41733963-1");
   mActivity = (ActivityMain) activity;
 }
Exemplo n.º 3
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();
  }
Exemplo n.º 4
0
  @SuppressWarnings("deprecation")
  @SuppressLint("NewApi")
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(new Bundle()); // XXX: Simple ugly fix.

    mGaInstance = GoogleAnalytics.getInstance(this);
    mGaTracker = mGaInstance.getTracker("UA-39295928-1");

    setContentView(R.layout.activity_sign_listing);

    Display display = getWindowManager().getDefaultDisplay();
    if (android.os.Build.VERSION.SDK_INT >= 13) {
      Point size = new Point();
      display.getSize(size);
      screenWidth = size.x;
      screenHeight = size.y;
    } else {
      screenWidth = display.getWidth();
      screenHeight = display.getHeight();
    }

    screenSize =
        getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK;

    switch (screenSize) {
      case Configuration.SCREENLAYOUT_SIZE_NORMAL:
        setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
        break;
      case Configuration.SCREENLAYOUT_SIZE_SMALL:
        setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
        break;
      default:
        break;
    }

    // Load local json
    new LoadHelper().execute();

    getSupportFragmentManager()
        .beginTransaction()
        .add(R.id.fragment_container, new PagerFragment())
        .commit();

    // If we are on a tablet the details fragment should be added
    if (screenSize == Configuration.SCREENLAYOUT_SIZE_XLARGE
        || screenSize == Configuration.SCREENLAYOUT_SIZE_LARGE) {
      detFragment = new SignDetailFragment();
      getSupportFragmentManager().beginTransaction().add(R.id.sign_detail, detFragment).commit();
    }
  }
Exemplo n.º 5
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());
 }
Exemplo n.º 6
0
  @Override
  public void onCreate() {
    super.onCreate();
    mGa = GoogleAnalytics.getInstance(this);
    mTracker = mGa.getTracker(GA_PROPERTY_ID);

    DisplayImageOptions options =
        new DisplayImageOptions.Builder().cacheInMemory(true).cacheOnDisc(true).build();
    File cacheDir = StorageUtils.getCacheDirectory(this);
    ImageLoaderConfiguration config =
        new ImageLoaderConfiguration.Builder(this)
            .memoryCache(new LruMemoryCache(8 * 1024 * 1024))
            .discCache(new TotalSizeLimitedDiscCache(cacheDir, 20 * 1024 * 1024))
            .defaultDisplayImageOptions(options)
            .build();
    ImageLoader.getInstance().init(config);
  }
Exemplo n.º 7
0
  /** Called when the activity is first created. */
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    mGaInstance = GoogleAnalytics.getInstance(this);
    mGaTracker = mGaInstance.getTracker("UA-40877184-1");

    Bundle extras = getIntent().getExtras();
    if (extras != null) {
      group = extras.getString("Group");
    }

    createButton("Previous Years Papers");
    createButton("Notes to study");

    GridView gridView = (GridView) findViewById(R.id.gridview);
    gridView.setAdapter(new CustomAdapter(mButtons));
  }
Exemplo n.º 8
0
  @Override
  public void onStart() {
    super.onStart();
    Log.d("haipn", "onstart marketplace");

    RequestQueue queue = MyVolley.getRequestQueue();
    GsonRequest<MpListCategories> myReq =
        new GsonRequest<MpListCategories>(
            Method.GET,
            Const.URL_LIST_CATEGORY,
            MpListCategories.class,
            createMyReqSuccessListener(),
            createMyReqErrorListener());
    queue.add(myReq);

    Tracker tracker = GoogleAnalytics.getInstance(getActivity()).getTracker(Const.GA_PROPERTY_ID);
    tracker.set(Fields.SCREEN_NAME, SCREEN_LABEL);
    tracker.send(MapBuilder.createAppView().build());
  }
Exemplo n.º 9
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);
  }
Exemplo n.º 10
0
 @Override
 public void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   mGaInstance = GoogleAnalytics.getInstance(getActivity());
   mGaTracker = mGaInstance.getTracker(Constant.GA_ID);
 }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_video_category);

    mGaInstance = GoogleAnalytics.getInstance(this);
    mGaTracker = mGaInstance.getTracker("UA-15581378-12");
    mGaTrackerGlobal = mGaInstance.getTracker("UA-15581378-27");

    comScore.setAppContext(this.getApplicationContext());

    GarantiAdManager.loadAd(
        this,
        providerUrl,
        new GarantiAdManager.AdListener() {

          @Override
          public void onLoad() {}

          @Override
          public void onError() {}
        });

    final String[] in = {"in"};
    final AppMap appmap = new AppMap(getApplicationContext(), VideoCategory.this);

    Bundle extras = getIntent().getExtras();
    if (extras != null) {
      categoryNameText = extras.getString("categoryName");
      categoryIDtext = extras.getString("categoryID");
      ActivityName = extras.getString("ActivityName");
      // categoryName.setText(categoryNameText);  //kategori adını burada yakalıyoruz.
    }
    listView = (ListView) findViewById(R.id.list);
    ImageView logoImage = (ImageView) findViewById(R.id.logoImage);
    if (ActivityName.equals("MilliyetTV")) {
      logoImage.setImageResource(R.drawable.navigation_bar_logo_milliyettv);
    } else if (ActivityName.equals("SkorerTV")) {
      logoImage.setImageResource(R.drawable.navigation_bar_logo_skorertv);
    } else {
      logoImage.setImageResource(R.drawable.navigation_bar_logo);
    }
    logoImage.setOnClickListener(
        new OnClickListener() {
          @Override
          public void onClick(View v) {
            // TODO Auto-generated method stub
            if (ActivityName.equals("MilliyetTV")) {
              appmap.RunActivity("MilliyetTV", "", "", "");
            } else if (ActivityName.equals("SkorerTV")) {
              appmap.RunActivity("SkorerTV", "", "", "");
            } else {
              appmap.RunActivity("Home", "", "", "");
            }

            overridePendingTransition(
                R.anim.animated_activity_slide_left_in, R.anim.animated_activity_slide_right_out);
          }
        });

    ImageView backImage = (ImageView) findViewById(R.id.backImage);
    backImage.setOnClickListener(
        new OnClickListener() {
          @Override
          public void onClick(View v) {
            // TODO Auto-generated method stub
            try {
              Video.setClickableVideo(true);
              //					AppMap.DownloadBannerData.bannerEnabled="false";
            } catch (Exception e) {
              // TODO: handle exception
            }
            try {
              Video.backgroungLayout.setVisibility(View.VISIBLE);
            } catch (Exception e) {
              // TODO: handle exception
            }
            finish();
          }
        });

    ImageView refreshImage = (ImageView) findViewById(R.id.refreshImage);
    refreshImage.setOnClickListener(
        new OnClickListener() {
          @Override
          public void onClick(View v) {
            // TODO Auto-generated method stub
            if (ActivityName.equals("MilliyetTV") || ActivityName.equals("SkorerTV")) {
              VideoCategoryAccessData accessData =
                  new VideoCategoryAccessData(
                      getApplicationContext(),
                      listView,
                      categoryNameText,
                      categoryIDtext,
                      ActivityName,
                      VideoCategory.this);
              accessData.execute(in);
            } else {
              GalleryCategoryAccessData accessData =
                  new GalleryCategoryAccessData(
                      getApplicationContext(),
                      listView,
                      categoryNameText,
                      categoryIDtext,
                      ActivityName,
                      VideoCategory.this);
              accessData.execute(in);
            }
          }
        });

    if (ActivityName.equals("MilliyetTV") || ActivityName.equals("SkorerTV")) {
      final VideoCategoryAccessData accessData =
          new VideoCategoryAccessData(
              getApplicationContext(),
              listView,
              categoryNameText,
              categoryIDtext,
              ActivityName,
              VideoCategory.this);

      try {
        if (accessData.isFileOK()) {
          accessData.fillData();
        } else {
          accessData.execute(in);
        }
      } catch (IOException e) {
        Toast.makeText(getApplicationContext(), "Bağlantı Hatası", Toast.LENGTH_LONG).show();
        finish();
        // TODO Auto-generated catch block
        e.printStackTrace();
      } catch (ParseException e) {
        Toast.makeText(getApplicationContext(), "Bağlantı Hatası", Toast.LENGTH_LONG).show();
        finish();
        // TODO Auto-generated catch block
        e.printStackTrace();
      } catch (JSONException e) {
        Toast.makeText(getApplicationContext(), "Bağlantı Hatası", Toast.LENGTH_LONG).show();
        finish();
        // TODO Auto-generated catch block
        e.printStackTrace();
      }
    } else {
      final GalleryCategoryAccessData accessData =
          new GalleryCategoryAccessData(
              getApplicationContext(),
              listView,
              categoryNameText,
              categoryIDtext,
              ActivityName,
              VideoCategory.this);

      try {
        if (accessData.isFileOK()) {
          accessData.fillData();
        } else {
          accessData.execute(in);
        }
      } catch (IOException e) {
        Toast.makeText(getApplicationContext(), "Bağlantı Hatası", Toast.LENGTH_LONG).show();
        finish();
        // TODO Auto-generated catch block
        e.printStackTrace();
      } catch (ParseException e) {
        Toast.makeText(getApplicationContext(), "Bağlantı Hatası", Toast.LENGTH_LONG).show();
        finish();
        // TODO Auto-generated catch block
        e.printStackTrace();
      } catch (JSONException e) {
        Toast.makeText(getApplicationContext(), "Bağlantı Hatası", Toast.LENGTH_LONG).show();
        finish();
        // TODO Auto-generated catch block
        e.printStackTrace();
      }
    }

    listView.setOnItemClickListener(
        new OnItemClickListener() {

          @Override
          public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {
            // TODO Auto-generated method stub
            try {
              appmap.RunActivity(
                  ((TextView) arg1.findViewById(R.id.contentType)).getText().toString(),
                  ActivityName,
                  ((TextView) arg1.findViewById(R.id.ID)).getText().toString(),
                  ((TextView) arg1.findViewById(R.id.haberText)).getText().toString());
            } catch (Exception e) {
              // TODO: handle exception
            }
          }
        });
  }
Exemplo n.º 12
0
 private GoogleAnalytics instance() {
   return GoogleAnalytics.getInstance(TiApplication.getInstance().getApplicationContext());
 }