コード例 #1
0
ファイル: MainActivity.java プロジェクト: mfpolat/Hobtime
 @Override
 protected void onResume() {
   super.onResume();
   /*
           locationManager.requestLocationUpdates(provider, 400, 1, this);
   */
 }
コード例 #2
0
  @Override
  protected void onResume() {
    super.onResume();

    if (!LinphoneService.isReady()) {
      startService(new Intent(ACTION_MAIN).setClass(this, LinphoneService.class));
    }

    ContactsManager.getInstance().prepareContactsInBackground();

    updateMissedChatCount();

    displayMissedCalls(LinphoneManager.getLc().getMissedCallsCount());

    LinphoneManager.getInstance().changeStatusToOnline();

    if (getIntent().getIntExtra("PreviousActivity", 0) != CALL_ACTIVITY) {
      if (LinphoneManager.getLc().getCalls().length > 0) {
        LinphoneCall call = LinphoneManager.getLc().getCalls()[0];
        LinphoneCall.State callState = call.getState();
        if (callState == State.IncomingReceived) {
          startActivity(new Intent(this, IncomingCallActivity.class));
        } else {

          if (call.getCurrentParamsCopy().getVideoEnabled()) {
            startVideoActivity(call);
          } else {
            startIncallActivity(call);
          }
        }
      }
    }
  }
コード例 #3
0
  @Override
  public void onResume() {
    super.onResume();

    // Re-register receivers on resume
    registerReceivers();
  }
コード例 #4
0
 public void onResume() {
   super.onResume();
   // register noisy clientStatusChangeReceiver here, so only active when Activity is visible
   if (Logging.DEBUG) Log.d(Logging.TAG, "TasksActivity register receiver");
   registerReceiver(mClientStatusChangeRec, ifcsc);
   loadData();
 }
コード例 #5
0
ファイル: GoogleMapActivity4.java プロジェクト: gb96/beyondar
 @Override
 protected void onResume() {
   super.onResume();
   // When the activity is resumed it is time to enable the
   // BeyondarLocationManager
   BeyondarLocationManager.enable();
 }
コード例 #6
0
  @Override
  protected void onResume() {
    super.onResume();
    mHelper.setBasemap();
    List<String> providers = mLocationManager.getProviders(true);

    for (String provider : providers) {
      if (provider.equalsIgnoreCase(LocationManager.GPS_PROVIDER)) {
        mGPSOn = true;
        curLocation = mLocationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);
        mLocationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, this);
        //                gps_button.setEnabled(true);
      }
      if (provider.equalsIgnoreCase(LocationManager.NETWORK_PROVIDER)) {
        mNetworkOn = true;
        curLocation = mLocationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER);
        mLocationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 0, 0, this);
        //                gps_button.setEnabled(true);
      }
    }

    if (mGPSOn) {
      //            mLocationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0,
      // this);
      gps_button.setEnabled(true);
    }
    if (mNetworkOn) {
      //            mLocationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 0, 0,
      // this);
      gps_button.setEnabled(true);
    }
  }
コード例 #7
0
ファイル: OAuthActivity.java プロジェクト: Rushera/passwdsafe
 @Override
 protected void onResume() {
   super.onResume();
   if (oauthView == null || !oauthView.getUrl().startsWith("http")) {
     startOAuth();
   }
 }
コード例 #8
0
 @Override
 protected void onResume() {
   super.onResume();
   Intent intent = new Intent(this, AdkService.class);
   bindService(intent, mServiceConnection, Service.BIND_AUTO_CREATE);
   mHandler.sendEmptyMessage(EVENT_UPDATE_ARM_STATE);
 }
コード例 #9
0
 @Override
 public void onResume() {
   super.onResume();
   if (mGoogleApiClient.isConnected() && !mRequestingLocationUpdates) {
     startLocationUpdates();
   }
 }
コード例 #10
0
  @Override
  public void onResume() {
    super.onResume();
    Log.d("ActivityTaste", "On Resume ");
    // getting information of user rating when ActivityTaste resume

  }
コード例 #11
0
 @Override
 protected void onResume() {
   super.onResume();
   ServiceManager.getInstance().pauseService(false);
   Log.e(TAG, "startUpdateTimer");
   DJIDrone.getDjiMC().startUpdateTimer(1000); // Start the update timer for MC to update info
 }
コード例 #12
0
  /** Makes Foursquare API call for coffee shops using Retrofit each time the app is resumed */
  @Override
  protected void onResume() {
    super.onResume();
    setUpMapIfNeeded();
    RestClient.getInstance()
        .getCoffeeService()
        .coffeeShops(
            latitude + "," + longitude,
            "coffee",
            1000, // making network call
            new Callback<ResponseObject>() {
              @Override
              public void success(
                  ResponseObject responseObject, Response response) { // populate data upon success
                populateData(responseObject);
                populateMap();
              }

              @Override
              public void failure(RetrofitError error) {
                Toast.makeText(MapsActivity.this, R.string.server_error, Toast.LENGTH_LONG);
                Log.e("Error getting coffee", error.toString());
              }
            });
  }
コード例 #13
0
ファイル: ZhuyeActivity.java プロジェクト: noikiy/myhyhapp
  public void onResume() {
    super.onResume();
    // umeng统计
    MobclickAgent.onResume(this);
    //	if ( !GezitechApplication.isActive ) {
    // app 从后台唤醒,进入前台
    //   GezitechApplication.isActive = true;
    // 判断xmpp是否链接
    User user = GezitechService.getInstance().getCurrentLoginUser(this);
    if (user != null) {
      if (GezitechApplication.connection == null
          || (!GezitechApplication.connection.isConnected())
          || (XmppConnectionManager.getInstance().getConnection() != null
              && !XmppConnectionManager.getInstance().getConnection().isConnected())) {
        XmppConnectionManager.getInstance().login();
      }
    }
    /*//是否重新启动app
    if( GezitechApplication.runtime>0 && (System.currentTimeMillis() - GezitechApplication.runtime) > 30*60*1000  ){
    	Intent intent = new Intent(this, WelcomeActivity.class);
    	startActivity( intent );
    	GezitechService.getInstance().exitApp( this );
    }*/
    //	}
    // 过半个小时定位一次
    long currTime = System.currentTimeMillis();
    long LBSCtime = GezitechApplication.systemSp.getLong("LBSCtime", currTime);
    if (AppUtils.isAppOnForeground() && (currTime - LBSCtime) > 35 * 60) {

      GezitechService.getInstance().longitude();
    }
    getNewNearByCount();
  }
コード例 #14
0
  @Override
  protected void onResume() {
    super.onResume();

    // xdrip start
    extendedGraphBuilder = new ExtendedGraphBuilder(getApplicationContext());

    _broadcastReceiver =
        new BroadcastReceiver() {
          @Override
          public void onReceive(Context ctx, Intent intent) {
            if (intent.getAction().compareTo(Intent.ACTION_TIME_TICK) == 0) {
              setupCharts();
              displayCurrentInfo();
              holdViewport.set(0, 0, 0, 0);
            }
          }
        };
    newDataReceiver =
        new BroadcastReceiver() {
          @Override
          public void onReceive(Context ctx, Intent intent) {
            setupCharts();
            displayCurrentInfo();
            holdViewport.set(0, 0, 0, 0);
          }
        };
    registerReceiver(_broadcastReceiver, new IntentFilter(Intent.ACTION_TIME_TICK));
    registerReceiver(newDataReceiver, new IntentFilter(Intents.ACTION_NEW_BG));
    setupCharts();
    displayCurrentInfo();
    holdViewport.set(0, 0, 0, 0);
    // xdrip end
  }
コード例 #15
0
  @Override
  protected void onResume() {
    super.onResume();
    uiHelper.onResume();

    updateUI();
  }
コード例 #16
0
  @Override
  protected void onResume() {
    StatService.onResume(this);
    this.wakeLock.acquire();

    super.onResume();
  }
コード例 #17
0
  @Override
  protected void onResume() {
    super.onResume();

    // Set "All posts" selected
    blog.setCurrentPage(1);
    if (mViewPager != null) {
      mViewPager.setCurrentItem(1);
    }
    // Reset alarm on app start
    if (MainActivity.newPostAlarm != null) {
      MainActivity.newPostAlarm.cancelAlarm(this);
    } else {
      MainActivity.newPostAlarm = new NewPostAlarm();
    }
    MainActivity.newPostAlarm.setAlarm(this);

    // Google Analytics track
    if (Utils.checkPlayServices(this)) {
      Tracker t = this.getTracker(TrackerName.APP_TRACKER);
      t.setScreenName("capture");
      t.send(new HitBuilders.AppViewBuilder().build());
    }

    // Close the Drawer
    mNavigationDrawerFragment.getDrawerLayout().closeDrawers();
  }
コード例 #18
0
ファイル: Activity_Tab.java プロジェクト: Dickjay/STOU-Ebooks
  @Override
  protected void onResume() {

    Log.d("", "resume activity tab");
    if (AppMain.isphone) {
      if (AppMain.isGotoshelf) {
        Log.d("", "Go to shelf");
        if (AppMain.isphone) {
          mTabHost.setCurrentTabByTag("Tab5");
          AppMain.isGotoshelf = false;
        } else {
          mTabHost.setCurrentTabByTag("Tab5");
          AppMain.isGotoshelf = false;
        }
      }
    } else {

      if (AppMain.isGotoshelf) {
        Log.d("", "Go to shelf");
        if (AppMain.isphone) {
          mTabHost.setCurrentTabByTag("Tab4");
          AppMain.isGotoshelf = false;
        } else {
          mTabHost.setCurrentTabByTag("Tab4");
          AppMain.isGotoshelf = false;
        }
      }
    }

    super.onResume();
  }
コード例 #19
0
 @Override
 protected void onResume() {
   super.onResume();
   // hide keyboard
   getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
   setUpCallBacks();
 }
コード例 #20
0
 @Override
 protected void onResume() {
   super.onResume();
   mPager.setCurrentItem(position);
   setTitleButtons();
   setActionBar();
 }
コード例 #21
0
  @Override
  protected void onResume() {
    Intent intent = new Intent(this, PlayerService.class);
    bindService(intent, connection, BIND_AUTO_CREATE);

    super.onResume();
  }
コード例 #22
0
 public void onResume() {
   super.onResume();
   Localytics.openSession();
   Localytics.setInAppMessageDisplayActivity(this);
   Localytics.handlePushNotificationOpened(getIntent());
   Localytics.handleTestMode(getIntent());
   Localytics.upload();
 }
コード例 #23
0
 @Override
 protected void onResume() {
   super.onResume();
   // if (ItApplication.currnUser == null) {
   // mIndex = 0;
   // }
   setOnTabselected();
 }
コード例 #24
0
 @Override
 protected void onResume() {
   super.onResume();
   nfcAdapter.enableForegroundDispatch(this, mNfcPendingIntent, mMifareFilters, mTechLists);
   receiveTab.append("\nAdded new mifare intent filter");
   Intent intent = getIntent();
   resolveIntent(intent);
 }
コード例 #25
0
  @Override
  protected void onResume() {
    checkGooglePlayServices();

    if (adView != null) adView.resume();

    super.onResume();
  }
コード例 #26
0
 @Override
 protected void onResume() {
   super.onResume();
   if (sensorHandling != null) {
     sensorHandling.register();
     Log.v(getClass().getName(), "ShakeDetector registered on resume");
   }
 }
コード例 #27
0
 @Override
 protected void onResume() {
   super.onResume();
   mSensorManager.registerListener(
       mSensorListener,
       mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER),
       SensorManager.SENSOR_DELAY_NORMAL);
 }
コード例 #28
0
  @Override
  public void onResume() {
    super.onResume();

    if (checkPlayServices()) {
      // Do additional stuff here
    }
  }
コード例 #29
0
 @Override
 protected void onResume() {
   super.onResume();
   if (searchBar != null) searchBar.setEnabled(true);
   if (submitButton != null) submitButton.setEnabled(true);
   if (locateButton != null) locateButton.setEnabled(true);
   if (scanButton != null) scanButton.setEnabled(true);
 }
コード例 #30
0
 @Override
 protected void onResume() {
   // TODO Auto-generated method stub
   super.onResume();
   Util.mContext = mMainActivityContext = this;
   ms_bIsInBackground = false;
   if (Constants.isDebug) Log.e("MainActivity", "MainActivity-onResume()");
 }