Set notification at specific time android

I realize this question has been asked before, but I’m at my wit’s end with this one.

I have an alarm manager to set up a notification:

  • How to center a View inside of an Android Layout?
  • Android L FAB Button shadow
  • How to highlight ImageView when focused or clicked?
  • How to prevent Android from returning a cached response to my HTTP Request?
  • Scale background image in LinearLayout
  • Google goggles API
  • public void to_reminder(View view)
        Intent intent=new Intent(this,Notification_morning.class);
        AlarmManager manager=(AlarmManager)getSystemService(Activity.ALARM_SERVICE);
        PendingIntent pendingIntent=PendingIntent.getService(this,
                0,intent, 0);
        Calendar cal=Calendar.getInstance();
        cal.set(Calendar.HOUR_OF_DAY, timepicker.getCurrentHour());
        cal.set(Calendar.SECOND, 0);
        cal.set(Calendar.MILLISECOND, 0);

    … And then I have the notification itself that is a service:

    public class Notification_morning extends Service {
    public void onCreate() 
    Toast.makeText(this, "MyAlarmService.onCreate()", Toast.LENGTH_LONG).show();
    Intent resultIntent=new Intent(this, Calendar_start.class);
    PendingIntent pIntent=PendingIntent.getActivity(this,0,resultIntent,0);
    Notification noti_builder= new Notification.Builder(this)
    .setContentTitle("Don't forget to plan your activitites for the day! ")
    NotificationManager notificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE); //what does this do!?
    noti_builder.flags |=Notification.FLAG_AUTO_CANCEL;
        public IBinder onBind(Intent intent) {
        return null;


    …. I included the toast to make sure that I was actually going to this method. The toast comes up, but the notification does not. What am I doing wrong here? Is it something in the manifest file I need to change?

    Related posts:

    read file from assets
    Android: how to hide ActionBar on certain activities
    Generating hash key for app using facebook sdk
    getExtra from Intent launched from a pendingIntent
    Integrating youtube to fragment
    Is there a documentation standard for custom XML style attributes in Android?
    Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.