-
Notifications
You must be signed in to change notification settings - Fork 181
Open
Description
E/Unity: AndroidJavaException: java.lang.NoSuchMethodError: no static method with name='SetNotification' signature='(IJLjava/lang/String;Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;IILjava/lang/String;Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)V' in class Lnet.agasper.unitynotification.UnityNotificationManager;
java.lang.NoSuchMethodError: no static method with name='SetNotification' signature='(IJLjava/lang/String;Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;IILjava/lang/String;Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)V' in class Lnet.agasper.unitynotification.UnityNotificationManager;
at com.unity3d.player.ReflectionHelper.getMethodID(Unknown Source)
at com.unity3d.player.UnityPlayer.nativeRender(Native Method)
at com.unity3d.player.UnityPlayer.c(Unknown Source)
at com.unity3d.player.UnityPlayer$e$2.queueIdle(Unknown Source)
at android.os.MessageQueue.next(MessageQueue.java:216)
at android.os.Looper.loop(Looper.java:151)
The call from my app
LocalNotification.SendNotification(1, miliSeconds, StaticStrings.notificationTitle, StaticStrings.notificationMessage,"soundName", new Color32(0xff, 0x44, 0x44, 255), true, true, true, "app_icon");
and the call from the LocalNotification class
public static int SendNotification(int id, long delayMs, string title, string message,String soundName, Color32 bgColor, bool sound = true, bool vibrate = true, bool lights = true, string bigIcon = "")
{
#if UNITY_ANDROID //&& !UNITY_EDITOR
AndroidJavaClass pluginClass = new AndroidJavaClass(fullClassName);
if (pluginClass != null)
{
Debug.Log(" pluginclass not nulll");
pluginClass.CallStatic("SetNotification", id, delayMs, title, message, message,
sound ? 1 : 0,soundName, vibrate ? 1 : 0, lights ? 1 : 0, bigIcon, "notify_icon_small",
bgColor.r * 65536 + bgColor.g * 256 + bgColor.b, "bundle", "channel", Application.identifier);
}
Debug.Log(" pluginclass nulll : id : " + id);
return id;
How do i fix this and what wrong am i doing ?
Metadata
Metadata
Assignees
Labels
No labels