title: Broadcast Receiver in Library Not working
body: <p>Hi Guys I created a broadcast receiver in a Library Project.</p>
  
  <p>below is the code </p>
  
  <pre><code>import android.content.BroadcastReceiver;
  import android.content.Context;
  import android.content.Intent;
  
  public class AlarmReceiver extends BroadcastReceiver {
  
       @Override
       public void onReceive(Context context, Intent intent) {
       // When our Alaram time is triggered , this method will be excuted (onReceive)
       // We're invoking a service in this method which shows Notification to the User
        Intent myIntent = new Intent(context, AlarmNotificationService.class);
        context.startService(myIntent);
      }
  
  } 
  </code></pre>
  
  <p>I trigger the broadcast receiver using alarm manager using the below code.</p>
  
  <pre><code>Intent myIntent = new Intent("Alarm");
          myIntent.setClass(activity, AlarmReceiver.class);    
  PendingIntent pendingIntent = PendingIntent.getBroadcast(activity, 0, myIntent, 0);
              AlarmManager alarmManager = (AlarmManager)activity.getSystemService(activity.ALARM_SERVICE);
              long time = System.currentTimeMillis() + 10 * 1000;
              alarmManager.set(AlarmManager.RTC, time , pendingIntent); 
  </code></pre>
  
  <p>I defined the receiver in the main project's manifest as shown below</p>
  
  <pre><code>&lt;receiver android:name="com.library.packagename.AlarmReciever"&gt;
      &lt;intent-filter&gt;
          &lt;action android:name="Alarm" /&gt;             
      &lt;/intent-filter&gt;
  &lt;/receiver&gt;
  </code></pre>
  
  <p>but the broadcast receiver is not getting triggered.</p>