@Override protected void onResume() { super.onResume(); // Lock the Tango configuration and reconnect to the service each time // the app // is brought to the foreground. super.onResume(); if (!mIsTangoServiceConnected) { startActivityForResult( Tango.getRequestPermissionIntent(Tango.PERMISSIONTYPE_MOTION_TRACKING), Tango.TANGO_INTENT_ACTIVITYCODE); } }
@Override public void onResume() { super.onResume(); Intent intent = getIntent(); String scheme = intent.getScheme(); OAuth savedToken = getOAuthToken(); if (CALLBACK_SCHEME.equals(scheme) && (savedToken == null || savedToken.getUser() == null)) { Uri uri = intent.getData(); String query = uri.getQuery(); logger.debug("Returned Query: {}", query); // $NON-NLS-1$ String[] data = query.split("&"); // $NON-NLS-1$ if (data != null && data.length == 2) { String oauthToken = data[0].substring(data[0].indexOf("=") + 1); // $NON-NLS-1$ String oauthVerifier = data[1].substring(data[1].indexOf("=") + 1); // $NON-NLS-1$ logger.debug( "OAuth Token: {}; OAuth Verifier: {}", oauthToken, oauthVerifier); // $NON-NLS-1$ OAuth oauth = getOAuthToken(); if (oauth != null && oauth.getToken() != null && oauth.getToken().getOauthTokenSecret() != null) { GetOAuthTokenTask task = new GetOAuthTokenTask(this); task.execute(oauthToken, oauth.getToken().getOauthTokenSecret(), oauthVerifier); } } } }
@Override protected void onResume() { // TODO Auto-generated method stub super.onResume(); AnalyticsUtils.onPageStart(this); AnalyticsUtils.onResume(this); }
@Override protected void onResume() { super.onResume(); // Manage bubble popping sound // Use AudioManager.STREAM_MUSIC as stream type mAudioManager = (AudioManager) getSystemService(AUDIO_SERVICE); mStreamVolume = (float) mAudioManager.getStreamVolume(AudioManager.STREAM_MUSIC) / mAudioManager.getStreamMaxVolume(AudioManager.STREAM_MUSIC); mSoundPool = new SoundPool(10, AudioManager.STREAM_MUSIC, 0); mSoundPool.setOnLoadCompleteListener( new OnLoadCompleteListener() { @Override public void onLoadComplete(SoundPool soundPool, int sampleId, int status) { if (status == 0) { setupGestureDetector(); } else { Log.i(TAG, "Unable to load sound"); finish(); } } }); mSoundID = mSoundPool.load(this, R.raw.bubble_pop, 1); }
@Override public void onResume() { // kick off the data generating thread: myThread = new Thread(data); myThread.start(); super.onResume(); }
@Override public void onResume() { super.onResume(); Log.e("Navit", "OnResume"); //InputMethodManager mgr = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); // DEBUG // intent_data = "google.navigation:q=Wien Burggasse 27"; // intent_data = "google.navigation:q=48.25676,16.643"; // intent_data = "google.navigation:ll=48.25676,16.643&q=blabla-strasse"; // intent_data = "google.navigation:ll=48.25676,16.643"; if (startup_intent != null) { if (System.currentTimeMillis() <= Navit.startup_intent_timestamp + 4000L) { Log.e("Navit", "**2**A " + startup_intent.getAction()); Log.e("Navit", "**2**D " + startup_intent.getDataString()); String navi_scheme = startup_intent.getScheme(); if ( navi_scheme != null && navi_scheme.equals("google.navigation")) { parseNavigationURI(startup_intent.getData().getSchemeSpecificPart()); } } else { Log.e("Navit", "timestamp for navigate_to expired! not using data"); } } }
@Override protected void onResume() { if (mInstanceUploaderTask != null) { mInstanceUploaderTask.setUploaderListener(this); } super.onResume(); }
/** Called when the activity is resumed from its paused state and immediately after onCreate(). */ @Override public void onResume() { super.onResume(); if (mInputStream != null && mOutputStream != null) { return; } UsbAccessory[] accessories = mUsbManager.getAccessoryList(); UsbAccessory accessory = (accessories == null ? null : accessories[0]); if (accessory != null) { if (mUsbManager.hasPermission(accessory)) { openAccessory(accessory); } else { synchronized (mUsbReceiver) { if (!mPermissionRequestPending) { mUsbManager.requestPermission(accessory, mPermissionIntent); mPermissionRequestPending = true; } } } } else { Log.d(TAG, "mAccessory is null"); } }
@Override protected void onResume() { super.onResume(); // 10s更新一次,这里只是示例,可以增加更复杂的策略 mLocationManager.requestLocationUpdates( LocationManager.GPS_PROVIDER, 10000, 0, mLocationListener); }
@Override protected void onResume() { // Ideally a game should implement onResume() and onPause() // to take appropriate action when the activity looses focus super.onResume(); mGLSurfaceView.onResume(); }
@Override protected void onResume() { super.onResume(); if (settingsStore.hasIdentityId()) { fetchApplications(); } }
/** {@inheritDoc} */ @Override public void onResume() { super.onResume(); setContentView(R.layout.hotelinformation); Log.d(SampleConstants.LOG_TAG, "starting HotelInformation"); final Hotel hotel = SampleApp.selectedHotel; if (hotel == null) { Log.d(SampleConstants.LOG_TAG, "hotel info was null"); return; } final TextView name = (TextView) this.findViewById(R.id.hotelInformationName); name.setText(hotel.name); StarRating.populate( (LinearLayout) this.findViewById(R.id.hotelInformationStars), hotel.starRating); if (SampleApp.HOTEL_ROOMS.containsKey(hotel.hotelId)) { populateRateList(); } else { new AvailabilityInformationLoaderTask( hotel.hotelId, SampleApp.arrivalDate, SampleApp.departureDate) .execute((Void) null); } ImageFetcher.loadThumbnailIntoImageView( (ImageView) findViewById(R.id.hotelInformationThumb), hotel.mainHotelImageTuple); if (SampleApp.EXTENDED_INFOS.containsKey(hotel.hotelId)) { setExtendedInfoFields(); } else { new ExtendedInformationLoaderTask(hotel.hotelId).execute((Void) null); } }
@Override protected void onResume() { super.onResume(); hasResumed = true; startComputerUpdates(); }
@Override public void onResume() { super.onResume(); Log.i(TAG, "onResume"); mCheckServiceTimerTask = new CheckServiceTimerTask(); mCheckServiceTimer.schedule(mCheckServiceTimerTask, 0, 1000); }
/* (non-Javadoc) * @see android.app.Activity#onResume() */ @Override protected void onResume() { // TODO Auto-generated method stub super.onResume(); /** 此处调用基本统计代码 */ MobclickAgent.onResume(this); }
@Override protected void onResume() { super.onResume(); SurfaceView surfaceView = (SurfaceView) findViewById(R.id.preview_view); SurfaceHolder surfaceHolder = surfaceView.getHolder(); if (hasSurface) { initCamera(surfaceHolder); } else { surfaceHolder.addCallback(this); surfaceHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS); } decodeFormats = null; characterSet = null; playBeep = true; AudioManager audioService = (AudioManager) getSystemService(AUDIO_SERVICE); if (audioService.getRingerMode() != AudioManager.RINGER_MODE_NORMAL) { playBeep = false; } initBeepSound(); vibrate = true; // quit the scan view cancelScanButton.setOnClickListener( new OnClickListener() { @Override public void onClick(View v) { CaptureActivity.this.finish(); } }); }
@Override protected void onResume() { super.onResume(); searchPoint = osmandSettings.getLastSearchedPoint(); Intent intent = getIntent(); if (intent != null) { selectAddressMode = intent.hasExtra(SELECT_ADDRESS_POINT_INTENT_KEY); } else { selectAddressMode = false; } findViewById(R.id.TopTextView).setVisibility(selectAddressMode ? View.VISIBLE : View.GONE); region = null; postcode = null; city = null; street = null; building = null; region = osmandSettings.getLastSearchedRegion(); RegionAddressRepository reg = ((OsmandApplication) getApplication()).getResourceManager().getRegionRepository(region); if (reg != null && reg.useEnglishNames() != osmandSettings.USE_ENGLISH_NAMES.get()) { reg.setUseEnglishNames(osmandSettings.USE_ENGLISH_NAMES.get()); } loadData(); updateUI(); }
@Override public void onResume() { super.onResume(); mNativeController = CreateNativeController(); mCameraView.enableView(); mCameraView.setOnTouchListener(CameraActivity.this); }
@Override public void onResume() { super.onResume(); Log.d(TAG, "onResume"); updateDisplay(); }
@Override protected void onResume() { super.onResume(); if (isPlay) { videoView.start(); } }
// 編集画面から戻ってきた際に実行される。 protected void onResume() { super.onResume(); Log.d(TAG, "onResume()"); // build spinner buildBrowserSpinner(); buildConvertSpinner(); }
@Override public void onResume() { super.onResume(); android.util.Log.e(TAG, "onResume"); loadSelectedPreferences(); updateViewsFromPreferences(); }
protected void onResume() { File file1 = new File( Environment.getExternalStorageDirectory().getAbsolutePath() + Constants.APP_FOLDER_TEMP); DeleteRecursive(file1); dbHelper = new AnnounceDBAdapter(this); dbHelper.open(); displayListView(); dbHelper.close(); int temp = Integer.parseInt((getPreferences(MODE_PRIVATE).getString("listScroll", 0 + ""))); Log.v("temp on resume", temp + ""); listView.setSelection(temp); if (listView.getCount() < 1) { nomobcast.setVisibility(TextView.VISIBLE); } else { nomobcast.setVisibility(TextView.GONE); } IntentFilter filter = new IntentFilter(); filter.addAction("MyGCMMessageReceived"); registerReceiver(receiver, filter); super.onResume(); }
protected void onResume() { super.onResume(); a.sendEmptyMessage(2); e = true; b.e(); }
@Override public void onResume() { super.onResume(); if (this.getShareableUri() != null) { this.registerNdefPushMessageCallback(); } }
@Override protected void onResume() { Log.d(TAG, "onResume"); super.onResume(); tpAlarm.setCurrentHour(prefs.getInt(M_HOUR, 0)); tpAlarm.setCurrentMinute(prefs.getInt(M_MINT, 0)); chkSnooze.setChecked(prefs.getBoolean(M_SNOOZE, false)); etxtSnoozeMin.setText(prefs.getString(SNOOZE_T, "0")); if (prefs.getString(TONE, null) != null) { String tone = prefs.getString(TONE, null); File f = new File("" + tone); btnSetTone.setText("Tone " + f.getName()); } else btnSetTone.setText(getString(R.string.btn_SetAlarmTone)); if (prefs.getBoolean(FIRST_LAUNCH, true)) { Intent checkIntent = new Intent(); checkIntent.setAction(TextToSpeech.Engine.ACTION_CHECK_TTS_DATA); startActivityForResult(checkIntent, MY_DATA_CHECK_CODE); SharedPreferences.Editor editor = prefs.edit(); editor.putBoolean(FIRST_LAUNCH, false); editor.commit(); } }
@Override protected void onResume() { super.onResume(); Log.v(TAG, "onResume()"); // CameraManager must be initialized here, not in onCreate(). if (cameraManager == null) { cameraManager = new CameraManager(getApplication()); } if (viewfinderView == null) { viewfinderView = (ViewfinderView) findViewById(R.id.viewfinder_view); viewfinderView.setCameraManager(cameraManager); } showScanner(); SurfaceView surfaceView = (SurfaceView) findViewById(R.id.preview_view); SurfaceHolder surfaceHolder = surfaceView.getHolder(); if (hasSurface) { // The activity was paused but not stopped, so the surface still // exists. Therefore // surfaceCreated() won't be called, so init the camera here. initCamera(surfaceHolder); } else { // Install the callback and wait for surfaceCreated() to init the // camera. surfaceHolder.addCallback(this); surfaceHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS); } }
@Override protected void onResume() { super.onResume(); databaseManager.openDatabase(); refreshReviewManagerListView(); overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out); }
@Override protected void onResume() { // TODO 自動生成されたメソッド・スタブ super.onResume(); SharedPreferences pref = getSharedPreferences("preceding", MODE_PRIVATE); num2bg(pref.getInt("bgNum", 0)); }
/** Called when the activity will start interacting with the user. */ @Override protected void onResume() { super.onResume(); LOG.d(TAG, "Resuming the App"); if (this.activityState == ACTIVITY_STARTING) { this.activityState = ACTIVITY_RUNNING; return; } if (this.appView == null) { return; } this.appView.handleResume(this.keepRunning, this.activityResultKeepRunning); // If app doesn't want to run in background if (!this.keepRunning || this.activityResultKeepRunning) { // Restore multitasking state if (this.activityResultKeepRunning) { this.keepRunning = this.activityResultKeepRunning; this.activityResultKeepRunning = false; } } }