How to pass data from activity to broadcastReceiver?
<p>i have code that calls a broadcast receiver, in the receiver, i try to get the extra data from the intent, but it's null. </p>

<p>so,</p>

<pre><code>     Intent intent = new Intent(MainActivity.this, CallAlarm.class);
                          intent.putExtra("medicine", "kkk");

                          PendingIntent sender=PendingIntent.getBroadcast(
                                  MainActivity.this,0, intent, 0);

                          AlarmManager am;
                          am = (AlarmManager)getSystemService(ALARM_SERVICE);
                          am.set(AlarmManager.RTC_WAKEUP,
                                 c.getTimeInMillis(),
                                 sender
                                );
</code></pre>

<p>and in the BroadcastReceiver.onReceiver(),</p>

<pre><code>    String name = i.getStringExtra("medicine");
</code></pre>

<p>but medicine is null. what am i missing?</p>
