// 0- Base public static PushNotification pullMessage(int position) { if (javaUnityApplicasaPushNotification == null) { javaUnityApplicasaPushNotification = new AndroidJavaClass("com.applicasaunity.Unity.ApplicasaPushNotification"); } string text = javaUnityApplicasaPushNotification.CallStatic <string>("ApplicasaPushGetMessage", position); int badge = javaUnityApplicasaPushNotification.CallStatic <int>("ApplicasaPushGetBadge", position); string sound = javaUnityApplicasaPushNotification.CallStatic <string>("ApplicasaPushGetSound", position); string tag = javaUnityApplicasaPushNotification.CallStatic <string>("ApplicasaPushGetTag", position); PushNotification push = new PushNotification(text, sound, badge); push.tag = tag; return(push); }
void ApplicasaListenToPush(Applicasa.PushNotification thePush) { string message = thePush.message; Debug.Log("LiLog_Unity push message " + message); }
// 0- Base public static PushNotification pullMessage(int position) { if(javaUnityApplicasaPushNotification==null) javaUnityApplicasaPushNotification = new AndroidJavaClass("com.applicasaunity.Unity.ApplicasaPushNotification"); string text = javaUnityApplicasaPushNotification.CallStatic <string>("ApplicasaPushGetMessage",position); int badge = javaUnityApplicasaPushNotification.CallStatic <int>("ApplicasaPushGetBadge",position); string sound = javaUnityApplicasaPushNotification.CallStatic <string>("ApplicasaPushGetSound",position); string tag = javaUnityApplicasaPushNotification.CallStatic <string>("ApplicasaPushGetTag",position); PushNotification push = new PushNotification(text, sound, badge); push.tag = tag; return push; }
/** * You may call NotificationServices Manually */ public static PushNotification pullMessage(int position) { PushNotification push = new PushNotification(); push.message = NotificationServices.GetRemoteNotification(position).alertBody; push.sound = NotificationServices.GetRemoteNotification(position).soundName; push.tag = NotificationServices.GetRemoteNotification(position).userInfo.ToString(); push.userInfo = NotificationServices.GetRemoteNotification(position).userInfo; return push; //NotificationServices.GetRemoteNotification(position).alertBody; }