コード例 #1
0
ファイル: MainActivity.java プロジェクト: viggi2004/camark
  @Override
  protected void onStart() {
    super.onStart();

    super.onStart();
    mInternetAvailable = NetworkChecker.isConnected(MainActivity.this);
    MyTextView errorMsg = (MyTextView) findViewById(R.id.noInternetMessage);
    if (mInternetAvailable) errorMsg.setVisibility(View.INVISIBLE);
    else errorMsg.setVisibility(View.VISIBLE);
  }
コード例 #2
0
  @Override
  protected void onStart() {
    super.onStart();

    new Thread(
            new Runnable() {
              public void run() {
                if (false) {
                  long start = System.currentTimeMillis();
                  long costTime = System.currentTimeMillis() - start;
                  // 等待sleeptime时长
                  if (sleepTime - costTime > 0) {
                    try {
                      Thread.sleep(sleepTime - costTime);
                    } catch (InterruptedException e) {
                      e.printStackTrace();
                    }
                  }
                  //
                  // 进入主页面
                  startActivity(new Intent(SplashActivity.this, MainActivity.class));
                  finish();
                } else {
                  try {
                    Thread.sleep(sleepTime);
                  } catch (InterruptedException e) {
                  }
                  startActivity(new Intent(SplashActivity.this, LoginActivity.class));
                  finish();
                }
              }
            })
        .start();
  }
コード例 #3
0
  @Override
  public void onStart() {
    super.onStart();
    // Initialize the broadcast manager that will listen for track changes.
    LocalBroadcastManager.getInstance(mContext)
        .registerReceiver((mReceiver), new IntentFilter(Common.UPDATE_UI_BROADCAST));

    /* Check if the service is up and running. If so, send out a broadcast message
     * that will initialize this activity fully. This code block is what will
     * initialize this activity fully if it is opened after the service is already
     * up and running (the onServiceRunning() callback isn't available at this point).
     */
    if (mApp.isServiceRunning() && mApp.getService().getCursor() != null) {
      String[] updateFlags =
          new String[] {
            Common.UPDATE_PAGER_POSTIION,
            Common.UPDATE_SEEKBAR_DURATION,
            Common.HIDE_STREAMING_BAR,
            Common.INIT_PAGER,
            Common.UPDATE_PLAYBACK_CONTROLS,
            Common.UPDATE_EQ_FRAGMENT
          };

      String[] flagValues =
          new String[] {
            "" + mApp.getService().getCurrentSongIndex(),
            "" + mApp.getService().getCurrentMediaPlayer().getDuration(),
            "",
            "",
            "",
            ""
          };
      mApp.broadcastUpdateUICommand(updateFlags, flagValues);
    }
  }
コード例 #4
0
  @Override
  protected void onStart() {
    super.onStart();

    mIsActivityVisible = true;

    if (mAllShareService == null) {
      System.out.println("mAllShareService == null");
    }
    if (mAllShareServiceListener == null) {
      System.out.println("mAllShareServiceListener == null");
    }
    if (mDevicePicker == null) {
      System.out.println("mDevicePicker == null");
      mDevicePicker = new DevicePicker();
      //   mDevicePicker = (DevicePicker)
      // getSupportFragmentManager().findFragmentById(R.id.devicePicker);
    }
    if (mDevicePicker == null) {
      System.out.println("mDevicePicker == null");
      //  mDevicePicker = new DevicePicker();
    }

    mAllShareService.registerListener(mAllShareServiceListener);
    mAllShareService.init(getApplicationContext());
  }
コード例 #5
0
ファイル: Promociones.java プロジェクト: lscortesc/SantoGallo
 @Override
 protected void onStart() {
   super.onStart();
   gifView.play();
   LinearLayout back_promo = (LinearLayout) findViewById(R.id.back_promo);
   back_promo.setVisibility(View.VISIBLE);
 }
コード例 #6
0
 @Override
 protected void onStart() {
   super.onStart();
   if (mGoogleApiClient != null) {
     mGoogleApiClient.connect();
   }
 }
コード例 #7
0
 @Override
 protected void onStart() {
   super.onStart();
   if (!mResolvingError) {
     mGoogleApiClient.connect();
   }
 }
コード例 #8
0
 @Override
 protected void onStart() {
   log("onStart");
   super.onStart();
   App.get().setCurrentActivity(this);
   App.get().setActiveCase(getCase());
 }
コード例 #9
0
  @Override
  public void onStart() {
    super.onStart();

    // Send a screwen view when the Activity is displayed to the user.
    if (ActivityName.equals("MilliyetTV")) {
      mGaTracker.sendView("MilliyetTVCategory - " + categoryIDtext);
      mGaTrackerGlobal.sendView("MilliyetTVCategory - " + categoryIDtext);
      //			logoImage.setImageResource(R.drawable.navigation_bar_logo_milliyettv);
    } else if (ActivityName.equals("SkorerTV")) {
      mGaTracker.sendView("SkorerTVCategory - " + categoryIDtext);
      mGaTrackerGlobal.sendView("SkorerTVCategory - " + categoryIDtext);
      //			logoImage.setImageResource(R.drawable.navigation_bar_logo_skorertv);
    } else {
      mGaTracker.sendView("GalleryCategory - " + categoryIDtext);
      mGaTrackerGlobal.sendView("GalleryCategory - " + categoryIDtext);
      //			logoImage.setImageResource(R.drawable.navigation_bar_logo);
    }

    FlurryAgent.onStartSession(this, "YEV3RXRLFB73A9IHAJEK");

    //	    if (ActivityName.equals("MilliyetTV"))
    //		{
    //	    	mGaTracker.sendView("/VideoCategory - "+categoryNameText);
    //		}
    //	    else
    //	    {
    //	    	mGaTracker.sendView("/GalleryCategory - "+categoryNameText);
    //	    }
  }
コード例 #10
0
 @Override
 protected void onStart() {
   super.onStart();
   try {
     canvas.postInvalidateDelayed(800);
   } catch (NullPointerException e) {
   }
 }
コード例 #11
0
ファイル: MainActivity.java プロジェクト: Aluxian/DroidHub
  @Override
  protected void onStart() {
    super.onStart();

    if (Log.GANALYTICS) {
      EasyTracker.getInstance(getApplicationContext()).activityStart(this);
    }
  }
コード例 #12
0
ファイル: MapsActivity.java プロジェクト: irygiels/myApp
 @Override
 protected void onStart() {
   super.onStart();
   async = new Asynct();
   async.execute();
   prepareListData();
   // cleanOldSensors(TIME_IN_OURS);
 }
コード例 #13
0
  @Override
  protected void onStart() {
    super.onStart();

    Intent service = new Intent(this, ReceiverService.class);
    startService(service);
    bindService(service, conn, Context.BIND_AUTO_CREATE);
  }
コード例 #14
0
 @Override
 public void onStart() {
   super.onStart();
   if (Utils.isNetworkOn()) {
     Intent bIntent = new Intent(this, FileMonitorService.class);
     bindService(bIntent, mMonitorConnection, Context.BIND_AUTO_CREATE); // 启动服务
   }
 }
 @Override
 protected void onStart() {
   super.onStart();
   GoogleAnalytics.getInstance(act).reportActivityStart(act);
   //		GA
   t = ((MyAnalytics) act.getApplication()).getTracker(TrackerName.APP_TRACKER);
   GA_Util.sendScreen(t, tag);
 }
コード例 #16
0
  @Override
  protected void onStart() {
    super.onStart();

    setProgressBarVisibility(true);

    App.getLogger().d(TAG, "Start");
  }
コード例 #17
0
 @Override
 protected void onStart() {
   // TODO Auto-generated method stub
   super.onStart();
   btReceiver = new BluetoothStateReceiver();
   IntentFilter filter = new IntentFilter(BluetoothAdapter.ACTION_STATE_CHANGED);
   registerReceiver(btReceiver, filter);
 }
コード例 #18
0
  @Override
  protected void onStart() {
    super.onStart();

    mPlayerController = new AudioPlayerController();
    mPlayerController.registerCallback(mPlayerControllerCallbacks);
    mPlayerController.play(this, mAudioUri);
    mPlayerController.setLooping(false);
  }
コード例 #19
0
ファイル: MainActivity.java プロジェクト: freewind22/monitor
  @Override
  protected void onStart() {
    // TODO Auto-generated method stub
    ServiceManager.isStart = true;
    ServiceManager.stopVibrator();
    ServiceManager.stopPlay();

    super.onStart();
  }
コード例 #20
0
ファイル: LockActivity.java プロジェクト: nigel0913/EcustLock
  @Override
  protected void onStart() {
    Log.v(ac_tag, "onStart");
    super.onStart();

    bufferSizeInBytes = AudioRecord.getMinBufferSize(sampleRateInHz, channelConfig, audioFormat);
    audioRecord =
        new AudioRecord(audioSource, sampleRateInHz, channelConfig, audioFormat, bufferSizeInBytes);
  }
コード例 #21
0
  @Override
  protected void onStart() {
    // TODO Auto-generated method stub
    super.onStart();

    // MyJob count
    updateAndSetMenuItems(AppValues.nJobsCount);

    FlurryAgent.onStartSession(MainActivity.this, AppValues.FLURRY_API_KEY);
  }
コード例 #22
0
ファイル: BaseActivity.java プロジェクト: WeidongHe/itouxian
 @Override
 protected void onStart() {
   super.onStart();
   mTheme = PrefsUtil.getThemeMode();
   applyTheme(mTheme);
   IntentFilter filter = new IntentFilter(Constants.ACTION_THEME_CHANGED);
   mThemeReceiver = new ThemeChangeReceiver();
   registerReceiver(mThemeReceiver, filter);
   FlurryAgent.onStartSession(this, "ZZF7PQQ23BYVC9V9TXW3");
 }
コード例 #23
0
  /*
   * Called when the Activity is restarted, even before it becomes visible.
   */
  @Override
  public void onStart() {

    super.onStart();

    /*
     * Connect the client. Don't re-start any requests here;
     * instead, wait for onResume()
     */
    mLocationClient.connect();
  }
コード例 #24
0
ファイル: BaseActivity.java プロジェクト: fivetrue/mort
 @Override
 protected void onStart() {
   super.onStart();
   //        MORTClientNetworkService.bind(getApplicationContext(), serviceConnection);
   if (mMortClient == null) {
     mMortClient = new MORTClient(this);
     mMortClient.setMORTClientNetworkListener(mortClientNetworkListener);
     showProgress("확인 중", "확인 중.....");
     mMortClient.searchMortDevice();
   }
   sDeviceInfoServer.startCameraServer();
   sDeviceInfoServer.startSensorServer();
 }
コード例 #25
0
  protected void onStart() {
    Log.d(TAG, "onStart!");
    super.onStart();

    if (!this.OnStartAlreadyConnected) {
      // NOT ALREADY CONNECTED: CONNECT!
      Log.d(TAG, "NOT Already connected! Connecting to...");
      mGoogleApiClient.connect();
      Log.d(TAG, "...connected to Google API!");
    } else {
      Log.d(TAG, "Already connected!");
    }
  }
コード例 #26
0
  @SuppressLint("NewApi")
  @Override
  protected void onStart() {
    super.onStart();

    if (mIsPostTaskRunning) ReaderLog.w("post task already running");

    if (SysUtils.canUseExecuteOnExecutor()) {
      new ShowPostTask().executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
    } else {
      new ShowPostTask().execute();
    }
  }
コード例 #27
0
  @Override
  protected void onStart() {

    super.onStart();
    googleClient.connect();
    // ATTENTION: This was auto-generated to implement the App Indexing API.
    // See https://g.co/AppIndexing/AndroidStudio for more information.
    Action viewAction =
        Action.newAction(
            Action.TYPE_VIEW,
            "Maps Page",
            Uri.parse("http://host/path"),
            Uri.parse("android-app://com.example.darragh.firstwearapplication/http/host/path"));
    AppIndex.AppIndexApi.start(googleClient, viewAction);
  }
コード例 #28
0
 @Override
 protected void onStart() {
   GKIMLog.lf(this, 0, TAG + "=>onStart.");
   if (mStoryId == null || mStoryId.length() <= 0) {
     this.finish();
   }
   mPagerAdapter.setStories(mListStoryIds);
   mPagerAdapter.notifyDataSetChanged();
   int index = mPagerAdapter.getStoryIndex(mStoryId);
   mPager.setCurrentItem(index, true);
   if (index == 0) {
     myOnPageSelectedLogic(index);
   }
   mHashStoryCommentCount.clear();
   mHashStoryFBLikeCount.clear();
   super.onStart();
   Tracking.startSession(this);
 }
コード例 #29
0
ファイル: StartActivity.java プロジェクト: tom2320x/list
  @Override
  protected void onStart() {
    super.onStart();

    Boolean analyticsViewed = mSharedPref.getAnalyticsViewed();

    if (!analyticsViewed) {
      // Display Google Analytics Message
      Log.v(TAG, "VIEWED: " + String.valueOf(analyticsViewed));
      // Request Permissions
      mMessageHelper.enableFeatureDialog(
          mContext,
          getString(R.string.dialog_ga_title),
          getString(R.string.dialog_ga_message),
          new MaterialDialog.ButtonCallback() {
            @Override
            public void onPositive(MaterialDialog dialog) {
              super.onPositive(dialog);
              // Set boolean opt-in
              mSharedPref.setAnalyticsOptOut(false);

              mSharedPref.setAnalyticsViewed(true);
              GoogleAnalytics.getInstance(mContext).setAppOptOut(false);
              dialog.dismiss();
            }

            @Override
            public void onNegative(MaterialDialog dialog) {
              super.onNegative(dialog);
              // Set boolean opt-out
              mSharedPref.setAnalyticsOptOut(true);
              mSharedPref.setAnalyticsViewed(true);
              GoogleAnalytics.getInstance(mContext).setAppOptOut(true);
              dialog.dismiss();
            }
          });
    }

    GoogleAnalytics.getInstance(this).reportActivityStart(this);
  } // onStart
コード例 #30
0
  @Override
  public void onStart() {
    super.onStart();
    getSupportLoaderManager()
        .restartLoader(
            0,
            null,
            new LoaderCallbacks<Cursor>() {

              @Override
              public Loader<Cursor> onCreateLoader(int arg0, Bundle arg1) {
                return new CursorLoader(
                    ActivityTaskHistory.this,
                    Task.URI_TASK_HISTORY,
                    Task.Columns.HISTORY_COLUMNS_UPDATED,
                    Task.Columns.HIST_TASK_ID + " IS ?",
                    new String[] {Long.toString(mTaskID)},
                    null);
              }

              @Override
              public void onLoadFinished(Loader<Cursor> arg0, Cursor c) {
                mCursor = c;
                setSeekBarProperties();
                if (!loaded) {
                  seekBar.setProgress(c.getCount() - 1);
                  loaded = true;
                }
              }

              @Override
              public void onLoaderReset(Loader<Cursor> arg0) {
                mCursor = null;
                setSeekBarProperties();
              }
            });
  }