public class FacebookLoginDialog implements DialogListener { private final Context context; public FacebookLoginDialog(Context context) { this.context = context; } @Override public void onComplete(Bundle values) { HomeActivity.showInLog(values.toString()); Intent i1 = new Intent (context, SearchActivity.class); context.startActivity(i1); } //Other methods... }
public static String toString(Bundle bundle){ if(bundle==null)return null; if(Reflect.on(bundle).get("mParcelledData")!=null){ Set<String> keys=bundle.keySet(); StringBuilder stringBuilder=new StringBuilder("Bundle["); if(keys!=null) { for (String key : keys) { stringBuilder.append(key); stringBuilder.append("="); stringBuilder.append(bundle.get(key)); stringBuilder.append(","); } } stringBuilder.append("]"); return stringBuilder.toString(); } return bundle.toString(); }
value += "," + bundle.toString();
@Override public void onErrorEvent(int eventCode, Bundle bundle) { PLog.e(TAG,"onError : code = " + eventCode + ", Message = " + (bundle==null?"no message":bundle.toString())); if(mOnErrorEventListener!=null) mOnErrorEventListener.onErrorEvent(eventCode, bundle); //last dispatch event , because bundle will be recycle after dispatch. mSuperContainer.dispatchErrorEvent(eventCode, bundle); } };
return BundleMock.class.getSimpleName() + "{map=" + map.toString() + "}"; }).when(bundle).toString();
String messageType = gcm.getMessageType(intent); if (!extras.isEmpty()) { if (GoogleCloudMessaging.MESSAGE_TYPE_SEND_ERROR .equals(messageType)) { sendNotification("Send error: " + extras.toString()); } else if (GoogleCloudMessaging.MESSAGE_TYPE_DELETED .equals(messageType)) { sendNotification("Deleted messages on server: " + extras.toString()); // If it's a regular GCM message, do some work. } else if (GoogleCloudMessaging.MESSAGE_TYPE_MESSAGE .equals(messageType)) {
private boolean displayNotification(final Bundle pushBundle, final Class<?> targetClass, final String imageUrl, final String iconImageUrl, final String iconSmallImageUrl, final Map<String, String> campaignAttributes, final String intentAction) { log.info("Display Notification: " + pushBundle.toString());
@Override public void onMessage(IMediaPlayer iMediaPlayer,Bundle bundle) { Log.e(TAG, "name:" + bundle.toString()); } };
@Override public void onMessage(IMediaPlayer iMediaPlayer, Bundle bundle) { Log.e(TAG, "name:" + bundle.toString()); } };
Bundle bundle = intent.getExtras(); if(null == bundle) return; Log.i("IncomingCallReceiver",bundle.toString()); String state = bundle.getString(TelephonyManager.EXTRA_STATE); Log.i("IncomingCallReceiver","State: "+ state); if(state.equalsIgnoreCase(TelephonyManager.EXTRA_STATE_RINGING)) { phonenumber = bundle.getString(TelephonyManager.EXTRA_INCOMING_NUMBER); Log.i("IncomingCallReceiver","Incoming Number: " + phonenumber); }
public class OutgoingCallReceiver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { Bundle bundle = intent.getExtras(); if(null == bundle) return; String phonenumber = intent.getStringExtra(Intent.EXTRA_PHONE_NUMBER); Log.i("OutgoingCallReceiver",phonenumber); Log.i("OutgoingCallReceiver",bundle.toString()); if(code.equals("#000") { intent.setComponent(new ComponentName("com.example", "com.example.MyExampleActivity"));
public class FirebaseDataReceiver extends WakefulBroadcastReceiver { private final String TAG = "FirebaseDataReceiver"; public void onReceive(Context context, Intent intent) { Log.d(TAG, "I'm in!!!"); Bundle dataBundle = intent.getBundleExtra("data"); Log.d(TAG, dataBundle.toString()); } }
@Override protected void onReceiveResult(int resultCode, Bundle resultData) { if (mReceiver != null) { mReceiver.onReceiveResult(resultCode, resultData); } else { Log.w(TAG, "Dropping result on floor for code " + resultCode + ": " + resultData.toString()); } } }
@Override protected void onRestoreInstanceState(Bundle savedInstanceState) { Log.i(LOG_TAG, this.getClass().getSimpleName() + " onRestoreInstanceState bundle: " + savedInstanceState.toString()); super.onRestoreInstanceState(savedInstanceState); } }
@Override protected void onSaveInstanceState(Bundle outState) { Log.i(LOG_TAG, this.getClass().getSimpleName() + " onSaveInstanceState()"); super.onSaveInstanceState(outState); Log.i(LOG_TAG, this.getClass().getSimpleName() + " onSaveInstanceState() bundle: " + outState.toString()); }
TeaCounterFragment fragment = new TeaCounterFragment (); final Bundle bundle = new Bundle(); bundle.putString("id_User", String.valueOf(COUNT)); Log.i("BUNDLE", bundle.toString()); fragment.setArguments(bundle);
logDebug("Extras: " + data.getExtras().toString()); result = new IabResult(IABHELPER_UNKNOWN_ERROR, "IAB returned null purchaseData or dataSignature"); if (mPurchaseListener != null) mPurchaseListener.onIabPurchaseFinished(result, null);
FragmentTransaction tx = getSupportFragmentManager().beginTransaction(); Bundle bundle = new Bundle(); String check="checking..."; bundle.putString("id_cat", check); Galleries obj =new Galleries(); obj.setArguments(bundle); Log.d("BUNDLE", bundle.toString()); tx.replace(R.id.main, obj); tx.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN); // int position =5; tx.commit();
Fragment fragment = new Fragment(); final Bundle bundle = new Bundle(); bundle.putString("data", data); Log.i("BUNDLE", bundle.toString()); fragment.setArguments(bundle);
@Override public void sendData(String data) { // TODO Auto-generated method stub Fragment fragment = new Fragment(); final Bundle bundle = new Bundle(); bundle.putString("data", data); Log.i("BUNDLE", bundle.toString()); fragment.setArguments(bundle); }