android.os.Bundle.toString()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(6.6k)|赞(0)|评价(0)|浏览(366)

本文整理了Java中android.os.Bundle.toString()方法的一些代码示例,展示了Bundle.toString()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Bundle.toString()方法的具体详情如下:
包路径:android.os.Bundle
类名称:Bundle
方法名:toString

Bundle.toString介绍

暂无

代码示例

代码示例来源:origin: stackoverflow.com

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...
}

代码示例来源:origin: android-hacker/VirtualXposed

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();
}

代码示例来源:origin: jiajunhui/PlayerBase

value += "," + bundle.toString();

代码示例来源:origin: jiajunhui/PlayerBase

@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);
  }
};

代码示例来源:origin: konmik/nucleus

return BundleMock.class.getSimpleName() + "{map=" + map.toString() + "}";
}).when(bundle).toString();

代码示例来源:origin: stackoverflow.com

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)) {

代码示例来源:origin: aws-amplify/aws-sdk-android

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());

代码示例来源:origin: ksvc/KSYMediaPlayer_Android

@Override
  public void onMessage(IMediaPlayer iMediaPlayer,Bundle bundle) {
    Log.e(TAG, "name:" +  bundle.toString());
  }
};

代码示例来源:origin: ksvc/KSYMediaPlayer_Android

@Override
  public void onMessage(IMediaPlayer iMediaPlayer, Bundle bundle) {
    Log.e(TAG, "name:" + bundle.toString());
  }
};

代码示例来源:origin: stackoverflow.com

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);      
    }

代码示例来源:origin: stackoverflow.com

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"));

代码示例来源:origin: stackoverflow.com

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());

  }
}

代码示例来源:origin: com.codeslap/groundy

@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());
    }
  }
}

代码示例来源:origin: mengdd/HelloActivityAndFragment

@Override
  protected void onRestoreInstanceState(Bundle savedInstanceState) {
    Log.i(LOG_TAG, this.getClass().getSimpleName() + " onRestoreInstanceState bundle: " + savedInstanceState.toString());
    super.onRestoreInstanceState(savedInstanceState);
  }
}

代码示例来源:origin: mengdd/HelloActivityAndFragment

@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());
}

代码示例来源:origin: stackoverflow.com

TeaCounterFragment fragment = new TeaCounterFragment ();
   final Bundle bundle = new Bundle();
   bundle.putString("id_User", String.valueOf(COUNT));
   Log.i("BUNDLE", bundle.toString());
   fragment.setArguments(bundle);

代码示例来源:origin: googlesamples/android-play-billing

logDebug("Extras: " + data.getExtras().toString());
result = new IabResult(IABHELPER_UNKNOWN_ERROR, "IAB returned null purchaseData or dataSignature");
if (mPurchaseListener != null) mPurchaseListener.onIabPurchaseFinished(result, null);

代码示例来源:origin: stackoverflow.com

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();

代码示例来源:origin: stackoverflow.com

Fragment fragment = new Fragment();
final Bundle bundle = new Bundle();
bundle.putString("data", data);
Log.i("BUNDLE", bundle.toString());
fragment.setArguments(bundle);

代码示例来源:origin: stackoverflow.com

@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); 
   }

相关文章

Bundle类方法