Is it possible to get requestCode at the time of intent either in Receiver class or Activity Class?
and this was my pending Intent
alarmMgr= (AlarmManager)getSystemService(Context.ALARM_SERVICE);
Intent intent = new Intent(this, BroadcastReceiver_Class.class);
/*intent.putExtra("alarm_time_minutes", minutes);*/
pendingIntent = PendingIntent.getBroadcast(this, requestCode, intent,requestCode);
alarmMgr.set(AlarmManager.RTC_WAKEUP, cal.getTimeInMillis(), pendingIntent);
Thanks in Advance..
You can put requestCode
as extra to your intent. Like following:
intent.putExtra("requestCode", requestCode);
Then you can get it in Activity class by:
int requestCode = received_intent.getExtras().getInt("requestCode");