setLatestEventInfo() ne peut pas résoudre dans Android Studio

Je travaille dans Android Studio et en essayant de générer une notification sur date et une heure Spécifiques. Tous vont bien, mais, Dans ma classe de Service setLatestEventInfo() la méthode ne peut pas être résolu.
J'ai fait la même démonstration dans eclipse et il n'y a aucun problème avec eclipse.
Je ne veux pas générer de notification sur n'importe quel Bouton de clic ou de n'importe quel manuel de génération d'événements, mais sur une date et une heure spécifiques comme je l'ai spécifié.

Code pour la classe de Service est comme suit :

public class MyRemiderService extends Service {
private NotificationManager mManager;

@Override
public IBinder onBind(Intent intent) {

    return null;
}

@Override
public void onCreate() {

    super.onCreate();
}

@Override
@Deprecated
public void onStart(Intent intent, int startId) {
    super.onStart(intent, startId);
    mManager = (NotificationManager) getApplicationContext()
            .getSystemService(getApplicationContext().NOTIFICATION_SERVICE);
    Intent intent1 = new Intent(this.getApplicationContext(),
            HomeActivity.class);
    Notification notification = new Notification(R.drawable.notification_template_icon_bg,
            "This is a test message!", System.currentTimeMillis());
    intent1.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP
            | Intent.FLAG_ACTIVITY_CLEAR_TOP);
    PendingIntent pendingNotificationIntent = PendingIntent.getActivity(
            this.getApplicationContext(), 0, intent1,
            PendingIntent.FLAG_UPDATE_CURRENT);
    notification.flags |= Notification.FLAG_AUTO_CANCEL;
    notification.setLatestEventInfo(this.getApplicationContext(),
            "AlarmManagerDemo", "This is a test message!",
            pendingNotificationIntent);


    mManager.notify(0, notification);
}

@Override
public void onDestroy() {

    super.onDestroy();
}

S'il vous plaît, permettez-moi d'apporter une solution à ce sujet.. Merci.

Ohhh.. Est-il une alternative à ce sujet ?

OriginalL'auteur Jaimin Modi | 2015-09-14