简体   繁体   中英

Intent extras not passed properly on some devices

when i send an Intent from one activity to another (holding some extras), on some devices it does not deliver those extras properly, while in other devices it delivers all the extras (it is the same code on both devices)

this problem happens on android 4.3 on Samsung Note 3 neo

while i test the same code on Samsung Note Tab 10.1 ... it works fine

why is that !?

PendingIntent getPendingIntent(){
    Intent extraIntent = getIntentWithExtras();
    Intent mainIntent = new Intent(context, MyActivity.class);
    mainIntent.setAction(MyActivity.ACTION_START_INTENT);
    // add several extras to mainIntent
    addExtras(mainIntent, extraIntent, INTENT_TYPE_ACTIVITY);
    return getActivityPendingIntent(mainIntent,PendingIntent.FLAG_UPDATE_CURRENT);
}

Thanks for your comments, i found out that i'm using these intents in PendingIntents, and while i set the flag of the PendingIntent to

PendingIntent.FLAG_UPDATE_CURRENT

and use the same action ... the intent is not updated and it keeps repeating the first intent

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM