internal static void _CancelAllPendingLocalNotificationRequests()
 {
     AndroidUtil.CallJavaStaticMethod(
         ANDROID_JAVA_CLASS,
         "_CancelAllPendingLocalNotificationRequests"
         );
 }
 internal static void RequestStoreReview(string callbackObject, string callbackMethod)
 {
     AndroidUtil.CallJavaStaticMethod(ANDROID_JAVA_UTILITY_CLASS, "RequestStoreReview",
                                      callbackObject,
                                      callbackMethod
                                      );
 }
 internal static void _CancelAllShownNotifications()
 {
     AndroidUtil.CallJavaStaticMethod(
         ANDROID_JAVA_CLASS,
         "_CancelAllShownNotifications"
         );
 }
        internal static void _GetPendingLocalNotifications(Action <AndroidNotificationRequest[]> callback)
        {
            Helper.NullArgumentTest(callback);

            var requests = new List <AndroidNotificationRequest>();
            var jObj     = AndroidUtil.CallJavaStaticMethod <AndroidJavaObject>(
                ANDROID_JAVA_CLASS,
                "_GetPendingNotificationRequestsJson");

            // The JNI array conversion method will crash if the raw object value is 0.
            if (jObj.GetRawObject().ToInt32() != 0)
            {
                var jsonStrs = AndroidJNIHelper.ConvertFromJNIArray <string[]>(jObj.GetRawObject());
                foreach (string s in jsonStrs)
                {
                    var req = AndroidNotificationRequest.FromJson(s);
                    if (req != null)
                    {
                        requests.Add(req);
                    }
                }
            }

            jObj.Dispose();
            callback(requests.ToArray());
        }
 internal static void _ScheduleLocalNotification(
     string id,
     long delaySecs,
     long repeatSecs,
     string title,
     string body,
     string userInfoJson,
     string categoryId,
     string smallIcon,
     string largeIcon)
 {
     AndroidUtil.CallJavaStaticMethod(
         ANDROID_JAVA_CLASS,
         "_ScheduleLocalNotification",
         id,
         delaySecs,
         repeatSecs,
         title,
         body,
         userInfoJson,
         categoryId,
         smallIcon,
         largeIcon
         );
 }
 internal static void _CancelPendingLocalNotificationRequest(string id)
 {
     AndroidUtil.CallJavaStaticMethod(
         ANDROID_JAVA_CLASS,
         "_CancelPendingLocalNotificationRequest",
         id
         );
 }
 internal static void _InitNativeClient(string categoryGroupsJson, string categoriesJson, string listenerName, string backgroundNotificationMethodName, string foregroundNotificationMethodName)
 {
     AndroidUtil.CallJavaStaticMethod(
         ANDROID_JAVA_CLASS,
         "_Init",
         categoryGroupsJson,
         categoriesJson,
         listenerName,
         backgroundNotificationMethodName,
         foregroundNotificationMethodName
         );
 }
 internal static void RequestRating(RatingDialogContent content, RatingRequestSettings settings)
 {
     AndroidUtil.CallJavaStaticMethod(ANDROID_JAVA_UTILITY_CLASS, "RequestReview",
                                      content.Title,
                                      content.Message,
                                      content.LowRatingMessage,
                                      content.HighRatingMessage,
                                      content.PostponeButtonText,
                                      content.RefuseButtonText,
                                      content.CancelButtonText,
                                      content.FeedbackButtonText,
                                      content.RateButtonText,
                                      settings.MinimumAcceptedStars.ToString()
                                      );
 }
Exemple #9
0
 internal static void ShareTextOrURL(string textOrURL, string subject = "")
 {
     AndroidUtil.CallJavaStaticMethod(ANDROID_JAVA_UTILITY_CLASS, "ShareTextOrURL", textOrURL, subject);
 }
Exemple #10
0
 internal static void ShareImage(string imagePath, string message, string subject = "")
 {
     AndroidUtil.CallJavaStaticMethod(ANDROID_JAVA_UTILITY_CLASS, "ShareImage", imagePath, message, subject);
 }
Exemple #11
0
 internal static void ShowToast(string message, bool longToast = false)
 {
     AndroidUtil.CallJavaStaticMethod(ANDROID_JAVA_UI_CLASS, "ShowToast", message, longToast);
 }
Exemple #12
0
 internal static void ShowOneButtonAlert(string title, string message, string button)
 {
     AndroidUtil.CallJavaStaticMethod(ANDROID_JAVA_UI_CLASS, "ShowOneButtonAlert", title, message, button);
 }
Exemple #13
0
 internal static void ShowThreeButtonsAlert(string title, string message, string button1, string button2, string button3)
 {
     AndroidUtil.CallJavaStaticMethod(ANDROID_JAVA_UI_CLASS, "ShowThreeButtonsAlert", title, message, button1, button2, button3);
 }
Exemple #14
0
 public void ShareURL(string url, string subject = "")
 {
     AndroidUtil.CallJavaStaticMethod <string>(NATIVE_SHARING_CLASS, NATIVE_SHARE_TEXT_OR_URL_METHOD, url, subject);
 }
Exemple #15
0
 public void ShareImage(string imagePath, string message, string subject = "")
 {
     AndroidUtil.CallJavaStaticMethod <string>(NATIVE_SHARING_CLASS, NATIVE_SHARE_IMAGE_METHOD, imagePath, message, subject);
 }