I am trying to send Extra
to intent
.
Intent i = new Intent(this, OpenBroadcastReceiver.class);
i.putExtra("url", url);
i.putExtra("lid", lid);
i.putExtra("regId", regId);
PendingIntent contentIntent = PendingIntent.getBroadcast(this.getApplicationContext(), 0, i, 0);
And I get:
public void onReceive(Context context, Intent intent) {
final ShareExternalServer appUtil = new ShareExternalServer();
Bundle extra=intent.getExtras();
final String lid = extra.getString("lid");
Log.e("AppUtil", "Receive! LID="+lid);
final String url = extra.getString("url");
final String regId = extra.getString("regId");
Log.e("AppUtil", "Receive! URL="+url);
Log.e("AppUtil", "Receive! regId="+regId);
...
E/AppUtil﹕ Receive! LID=null
E/AppUtil﹕ Receive! URL=https://pushall.ru/
E/AppUtil﹕ Receive! regId=APA91bGCpJWveKUgm0
All normal - lid dont send. All String.
Aucun commentaire:
Enregistrer un commentaire