Esempio n. 1
0
 @Override
 protected void onResume() {
   super.onResume();
   /*
           locationManager.requestLocationUpdates(provider, 400, 1, this);
   */
 }
  @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);
          }
        }
      }
    }
  }
  @Override
  public void onResume() {
    super.onResume();

    // Re-register receivers on resume
    registerReceivers();
  }
Esempio n. 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();
 }
Esempio n. 5
0
 @Override
 protected void onResume() {
   super.onResume();
   // When the activity is resumed it is time to enable the
   // BeyondarLocationManager
   BeyondarLocationManager.enable();
 }
  @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);
    }
  }
Esempio n. 7
0
 @Override
 protected void onResume() {
   super.onResume();
   if (oauthView == null || !oauthView.getUrl().startsWith("http")) {
     startOAuth();
   }
 }
 @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);
 }
Esempio n. 9
0
 @Override
 public void onResume() {
   super.onResume();
   if (mGoogleApiClient.isConnected() && !mRequestingLocationUpdates) {
     startLocationUpdates();
   }
 }
Esempio n. 10
0
  @Override
  public void onResume() {
    super.onResume();
    Log.d("ActivityTaste", "On Resume ");
    // getting information of user rating when ActivityTaste resume

  }
 @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
 }
Esempio n. 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());
              }
            });
  }
Esempio n. 13
0
  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();
  }
  @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
  }
Esempio n. 15
0
  @Override
  protected void onResume() {
    super.onResume();
    uiHelper.onResume();

    updateUI();
  }
  @Override
  protected void onResume() {
    StatService.onResume(this);
    this.wakeLock.acquire();

    super.onResume();
  }
  @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();
  }
Esempio n. 18
0
  @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();
  }
 @Override
 protected void onResume() {
   super.onResume();
   // hide keyboard
   getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
   setUpCallBacks();
 }
Esempio n. 20
0
 @Override
 protected void onResume() {
   super.onResume();
   mPager.setCurrentItem(position);
   setTitleButtons();
   setActionBar();
 }
Esempio n. 21
0
  @Override
  protected void onResume() {
    Intent intent = new Intent(this, PlayerService.class);
    bindService(intent, connection, BIND_AUTO_CREATE);

    super.onResume();
  }
 public void onResume() {
   super.onResume();
   Localytics.openSession();
   Localytics.setInAppMessageDisplayActivity(this);
   Localytics.handlePushNotificationOpened(getIntent());
   Localytics.handleTestMode(getIntent());
   Localytics.upload();
 }
Esempio n. 23
0
 @Override
 protected void onResume() {
   super.onResume();
   // if (ItApplication.currnUser == null) {
   // mIndex = 0;
   // }
   setOnTabselected();
 }
Esempio n. 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);
 }
  @Override
  protected void onResume() {
    checkGooglePlayServices();

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

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

    if (checkPlayServices()) {
      // Do additional stuff here
    }
  }
Esempio n. 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);
 }
Esempio n. 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()");
 }