Hi mates i'm trying to develop an app which needs to send a notification for the user at certain time. In the internet i found this code but eclipse says that it's deprecated. Do you know which is the proper way to do it with my API? (16)
NotificationManager nm = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
int icon = R.drawable.worldmap2;
CharSequence tickerText = "Hello";
long when = System.currentTimeMillis();
Notification notification = new Notification(icon, tickerText,when);
Context context = getApplicationContext();
CharSequence contentTitle = "My notification";
CharSequence contentText = "Hello World!";
final Intent intent1 = new Intent(context, HttpExampleLimits.class);
PendingIntent pIntent = PendingIntent.getActivity(getApplicationContext(), 0, intent1, 0);
notification.setLatestEventInfo(context, contentTitle,contentText, pIntent);
nm.notify(1, notification);
Thank you very much!