title: How to pass data through PendingIntent to Broadcast receiver
body: <p>I'm developing alert app which shows notification and custom message in separate activity when alarm is set off.I'm facing problem in sending identifier to broadcast receiver which is useful in fetching data from database.
  I have gone through various blogs, stackoverflow posts but couldn't find the working solution.Please do help me.</p>
  
  <p>My function for scheduling alarm.</p>
  
  <pre><code>void setAlarm(int tag, long time) {
          Intent myIntent = new Intent(context, AlarmReceiver.class);
          myIntent.putExtra("TEST", "dummy");
          myIntent.putExtra("ID",tag);
          pendingIntent = PendingIntent.getBroadcast(context, tag, myIntent, Intent.FILL_IN_DATA);
          alarmManager = (AlarmManager) context.getSystemService(ALARM_SERVICE);
          alarmManager.set(AlarmManager.RTC_WAKEUP, time, pendingIntent);
      }
  </code></pre>
  
  <p>My Broadcast receiver </p>
  
  <pre><code> @Override
      public void onReceive(Context context, Intent intent) {
          logHelper.printLog("Alarm Service "+intent.getIntExtra("ID",0)+ intent.getStringExtra("TEST"));
          ComponentName comp = new ComponentName(context.getPackageName(),
                  AlarmService.class.getName());
          startWakefulService(context, (intent.setComponent(comp)));
          setResultCode(Activity.RESULT_OK);
      }
  </code></pre>
  
  <p>Kindly let me know if any further information needed.</p>