java - Notification at later time and daily -


i want application notify me once @ 3 in morning @ 7 pm in evening 3.01 in morning , 7.01 pm in evening , on. code 1 notification is

pendingintent contentintent = pendingintent.getactivity(context, 0,     new intent(), 0);   calendar calendar = calendar.getinstance();   calendar.set(2014, calendar.june, 27, 4, 0);   long starttime = calendar.gettimeinmillis();   notification notif = new notification(r.drawable.icon,     "testing...", starttime);   notif.setlatesteventinfo(context, from, message, contentintent);   notif.sound = uri.parse("android.resource://"             + context.getpackagename() + "/" + r.raw.glass);   notif.vibrate = new long[] { 100, 250, 100, 500 };    nm.notify(1, notif); 

now when

calendar calendar = calendar.getinstance(); calendar.set(2014, calendar.june, 27, 4, 0); long starttime = calendar.gettimeinmillis(); 

i notification @ current time, example, 4 pm , set notification of 7 pm, when run app notifies me next second i.e. 4pm.

i have seen these links , doing same alarm.

android notify user @ later time http://blog.blundell-apps.com/notification-for-a-user-chosen-time/

  1. i having problem in setting notification later time?

  2. i want notify user daily, twice day. how can achieve this? (if cant achieve notification let me know how achieve alarm.)

thanks


Comments

Popular posts from this blog

Unable to open serial port using Putty to bluetooth device on windows 7 64 bit -

bash - How do you programmatically add a bats test? -

java - Getting exception in JDBC thin driver -