tutorial sender_id pushnotification plugin notification java android cordova push-notification

java - sender_id - no se puede encontrar el símbolo en el mensaje de error de notificación "notificationBuilder.setContentText(currentText).setNumber(++ numMessages);"



push notification apache cordova (1)

A continuación está mi código, estoy usando cordova Push Notification, estoy tratando de fusionar varias notificaciones de inserción, pero me da error, para la notificación individual de su funcionamiento, no puedo encontrar lo que salió mal, sugerir amablemente

package org.apache.cordova.firebase; import android.app.NotificationManager; import android.app.PendingIntent; import android.content.Context; import android.content.Intent; import android.content.pm.PackageManager; import android.media.RingtoneManager; import android.net.Uri; import android.os.Bundle; import android.support.v4.app.NotificationCompat; import android.util.Log; import android.text.TextUtils; import com.google.firebase.messaging.FirebaseMessagingService; import com.google.firebase.messaging.RemoteMessage; import java.util.Map; import java.util.Random; private void sendNotification(String id, String title, String messageBody, Map<String, String> data, boolean showNotification) { Bundle bundle = new Bundle(); int notifyID = 1; for (String key : data.keySet()) { bundle.putString(key, data.get(key)); } if (showNotification) { Intent intent = new Intent(this, OnNotificationOpenReceiver.class); intent.putExtras(bundle); PendingIntent pendingIntent = PendingIntent.getBroadcast(this, id.hashCode(), intent, PendingIntent.FLAG_UPDATE_CURRENT); Uri defaultSoundUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION); NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(this) .setContentTitle(title) .setContentText(messageBody) .setAutoCancel(true) .setSound(defaultSoundUri); int numMessages = 0; //This line gives me error:error: cannot find symbol notificationBuilder.setContentText(currentText).setNumber(++numMessages); notificationManager.notify(notifyID, notificationBuilder.build()); } else { bundle.putBoolean("tap", false); FirebasePlugin.sendNotification(bundle); } }


Parece que currentText que se usa en el método setContextText no está instanciado en ningún lugar de tu código.