Javascript java-如何修复类型通知未定义的方法SetLateStevenInfo(AlarmService\u Service,String,CharSequences,PendingContent)

Javascript java-如何修复类型通知未定义的方法SetLateStevenInfo(AlarmService\u Service,String,CharSequences,PendingContent),javascript,java,c#,android,eclipse,Javascript,Java,C#,Android,Eclipse,如何修复类型通知的方法SetLateStevenInfo(AlarmService\u Service,String,CharSequences,PendingEvent)未定义 请提供任何帮助以修复此错误 以下是脚本: /** * Show a notification while this service is running. */ private void showNotification() { // In this sample, we'll use the same

如何修复类型通知的方法SetLateStevenInfo(AlarmService\u Service,String,CharSequences,PendingEvent)未定义

请提供任何帮助以修复此错误

以下是脚本:

/**
 * Show a notification while this service is running.
 */
private void showNotification() {
    // In this sample, we'll use the same text for the ticker and the expanded notification
  CharSequence text = "Doctor Jokes SF";

    // Set the icon, scrolling text and timestamp
  Notification notification = new Notification(R.drawable.icon, text,System.currentTimeMillis());

  Intent notifyIntent = new Intent(this, MainActivity.class);
 // Sets the Activity to start in a new, empty task
 notifyIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);

    // The PendingIntent to launch our activity if the user selects this notification
    PendingIntent contentIntent = PendingIntent.getActivity(this, 0,
      notifyIntent, PendingIntent.FLAG_UPDATE_CURRENT);

    // Set the info for the views that show in the notification panel.
    notification.setLatestEventInfo(this, quote.getBody(), text, contentIntent);

    notification.flags |=Notification.FLAG_AUTO_CANCEL | Notification.FLAG_ONLY_ALERT_ONCE;
  //Define sound URI
    Uri soundUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);
    notification.sound = soundUri;

    // Send the notification.
    // We use a layout id because it is a unique number.  We use it later to cancel.
    mNM.cancelAll();
    mNM.notify(0, notification);
}

显然,这是不公平的,你应该使用通知生成器。查看。

javascript java或c#?它是什么?100%非javascript此脚本取自游戏代码源中名为AlarmService_Service.java的文件,因此这是javascript!是的,先生,你是对的,但是如果你知道如何解决这个问题,请告诉我如何解决