I was wondering what I could use to replace the deprecated Notification class
and the setLatestEventInfo()
method. It's not recognizing the setLatestEventInfo()
method.
Here is the current code I have:
public void makeForeground() {
Notification notification = new Notification(R.drawable.icon, getText(R.string.servicename), System.currentTimeMillis());
notification.setLatestEventInfo(this, getText(R.string.servicename), this.lang[134], PendingIntent.getActivity(this, 0, new Intent(this, UIActivity.class), 0));
startForeground(2, notification);
}
What can I replace this with?