Integer id_user = 1;
Intent registration= new Intent("com.google.android.c2dm.intent.REGISTER");
registration.putExtra("app", PendingIntent.getBroadcast(getBaseContext(),0,new Intent(),0));
registration.putExtra("sender",project_number);
startService(registration);
i need put extra similar
registration.putExtra("id_user",id_user);
and recieved in broadclass
public class resquest extends BroadcastReceiver {
NEED CATCH HERE..... a USER_ID
@Override
public void onReceive(Context context, Intent intent) {
.....Code here
}
}
Regards!
First of all you need to send in the user id to be able to fetch it:
Then you can fetch it like this