@Override public void onActivityResult(int requestCode, int resultCode, Intent intent) { super.onActivityResult(requestCode, resultCode, intent); if (mSsoHandler != null) { mSsoHandler.authorizeCallBack(requestCode, resultCode, intent); } }
/** * Sets the context of the Command. This can then be used to do things like get file paths * associated with the Activity. * * @param cordova The context of the main Activity. * @param webView The CordovaWebView Cordova is running in. */ public void initialize(CordovaInterface cordova, CordovaWebView webView) { super.initialize(cordova, webView); this.sockMan = (ConnectivityManager) cordova.getActivity().getSystemService(Context.CONNECTIVITY_SERVICE); this.connectionCallbackContext = null; // We need to listen to connectivity events to update navigator.connection IntentFilter intentFilter = new IntentFilter(); intentFilter.addAction(ConnectivityManager.CONNECTIVITY_ACTION); if (this.receiver == null) { this.receiver = new BroadcastReceiver() { @SuppressWarnings("deprecation") @Override public void onReceive(Context context, Intent intent) { // (The null check is for the ARM Emulator, please use Intel Emulator for better // results) if (NetworkManager.this.webView != null) updateConnectionInfo( (NetworkInfo) intent.getParcelableExtra(ConnectivityManager.EXTRA_NETWORK_INFO)); } }; cordova.getActivity().registerReceiver(this.receiver, intentFilter); this.registered = true; } }
@Override public void onDestroy() { super.onDestroy(); if (this.mLogic != null) { this.mLogic.onDestroy(); this.mLogic = null; } }
@Override /** * Called when an activity you launched exits, giving you the requestCode you started it with, the * resultCode it returned, and any additional data from it. * * @param requestCode The request code originally supplied to startActivityForResult(), allowing * you to identify who this result came from. * @param resultCode The integer result code returned by the child activity through its * setResult(). * @param data An Intent, which can return result data to the caller (various data can be attached * to Intent "extras"). */ public void onActivityResult(int requestCode, int resultCode, Intent intent) { super.onActivityResult(requestCode, resultCode, intent); CordovaPlugin callback = this.activityResultCallback; if (callback != null) { callback.onActivityResult(requestCode, resultCode, intent); } }
/** Called when the activity receives a new intent. */ public void onNewIntent(Intent intent) { super.onNewIntent(intent); checkMessage(intent); }
/** The final call you receive before your activity is destroyed. */ public void onDestroy() { super.onDestroy(); }
@Override public void onPause(boolean multitasking) { super.onPause(multitasking); unregisterReceivers(); }
@Override public void onResume(boolean multitasking) { super.onResume(multitasking); registerReceivers(); }