alarm: calling an status bar notification activity doesn't work
<pre><code> private void scheduleAlarmReceiver() {
 AlarmManager alarmMgr = (AlarmManager) this.getSystemService(Context.ALARM_SERVICE);
 PendingIntent pendingIntent =  PendingIntent.getBroadcast(this, 0, new Intent(this, StatusNotify.class),
 PendingIntent.FLAG_CANCEL_CURRENT);
 alarmMgr.setInexactRepeating(AlarmManager.ELAPSED_REALTIME_WAKEUP, 2000,AlarmManager.INTERVAL_DAY, pendingIntent);
 Log.i("alarm", "alarm set");
 }
</code></pre>

<p>statusnotify.class</p>

<pre><code>protected void onCreate(Bundle savedInstanceState) {
 super.onCreate(savedInstanceState);
 setContentView(R.layout.activity_status_notify);
 NotificationManager nm = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
 int unique_id = 145558;
 Log.i("status bar" +unique_id , " ");
 Intent nintent = new Intent();
 nintent.setClass(this, TaskTrace.class);
 PendingIntent pin = PendingIntent.getActivity(getApplicationContext(),0, nintent, 0);
 String title = "Notification";
 String body = "This is a new notification";
 Notification n = new Notification(R.drawable.ic_launcher, body, System.currentTimeMillis());
 n.contentIntent = pin;
 n.setLatestEventInfo(getApplicationContext(), title, body, pin);
 n.defaults = Notification.DEFAULT_ALL;
 nm.notify(unique_id, n);
 }
</code></pre>

<p>Statusnotify works fine when run individually but doesn't get trigered from the alarm class. </p>

<p>guess everything is fine in the intent call. Please do help me out. satus bar notifiction must appear 1n 2 seconds when the alarm is set and repeat for every day in same time</p>
