コード例 #1
0
 public void InitPushNotifications()
 {
     AN_NotificationProxy.InitPushNotifications(
         AndroidNativeSettings.Instance.PushNotificationIcon == null ? string.Empty : AndroidNativeSettings.Instance.PushNotificationIcon.name,
         AndroidNativeSettings.Instance.PushNotificationSound == null ? string.Empty : AndroidNativeSettings.Instance.PushNotificationSound.name,
         AndroidNativeSettings.Instance.EnableVibrationPush, AndroidNativeSettings.Instance.ShowPushWhenAppIsForeground);
 }
コード例 #2
0
 public void InitPushNotifications()
 {
     AN_NotificationProxy.InitPushNotifications(
         AndroidNativeSettings.Instance.PushNotificationSmallIcon == null ? string.Empty : AndroidNativeSettings.Instance.PushNotificationSmallIcon.name.ToLower(),
         AndroidNativeSettings.Instance.PushNotificationLargeIcon == null ? string.Empty : AndroidNativeSettings.Instance.PushNotificationLargeIcon.name.ToLower(),
         AndroidNativeSettings.Instance.PushNotificationSound == null ? string.Empty : AndroidNativeSettings.Instance.PushNotificationSound.name,
         AndroidNativeSettings.Instance.EnableVibrationPush, AndroidNativeSettings.Instance.ShowPushWhenAppIsForeground,
         AndroidNativeSettings.Instance.ReplaceOldNotificationWithNew);
 }
コード例 #3
0
 public void InitPushNotifications()
 {
     AN_NotificationProxy.InitPushNotifications(
         AndroidNativeSettings.Instance.PushNotificationSmallIcon == null ? string.Empty : AndroidNativeSettings.Instance.PushNotificationSmallIcon.name.ToLower(),
         AndroidNativeSettings.Instance.PushNotificationLargeIcon == null ? string.Empty : AndroidNativeSettings.Instance.PushNotificationLargeIcon.name.ToLower(),
         AndroidNativeSettings.Instance.PushNotificationSound == null ? string.Empty : AndroidNativeSettings.Instance.PushNotificationSound.name,
         AndroidNativeSettings.Instance.EnableVibrationPush, AndroidNativeSettings.Instance.ShowPushWhenAppIsForeground,
         AndroidNativeSettings.Instance.ReplaceOldNotificationWithNew,
         string.Format("{0}|{1}|{2}|{3}", 255 * AndroidNativeSettings.Instance.PushNotificationColor.a,
                       255 * AndroidNativeSettings.Instance.PushNotificationColor.r,
                       255 * AndroidNativeSettings.Instance.PushNotificationColor.g,
                       255 * AndroidNativeSettings.Instance.PushNotificationColor.b));
 }
コード例 #4
0
    public int ScheduleLocalNotification(AndroidNotificationBuilder builder)
    {
        AN_NotificationProxy.ScheduleLocalNotification(builder);

        LocalNotificationTemplate        notification = new LocalNotificationTemplate(builder.Id, builder.Title, builder.Message, DateTime.Now.AddSeconds(builder.Time));
        List <LocalNotificationTemplate> scheduled    = LoadPendingNotifications();

        scheduled.Add(notification);

        SaveNotifications(scheduled);

        return(builder.Id);
    }
コード例 #5
0
    public void CancelLocalNotification(int id, bool clearFromPrefs = true)
    {
        AN_NotificationProxy.CanselLocalNotification(id);

        if (clearFromPrefs)
        {
            List <LocalNotificationTemplate> scheduled = LoadPendingNotifications();
            List <LocalNotificationTemplate> newList   = new List <LocalNotificationTemplate>();

            foreach (LocalNotificationTemplate n in scheduled)
            {
                if (n.id != id)
                {
                    newList.Add(n);
                }
            }


            SaveNotifications(newList);
        }
    }
コード例 #6
0
 public void LoadLastMessage()
 {
     AN_NotificationProxy.GCMLoadLastMessage();
 }
コード例 #7
0
 public void RgisterDevice()
 {
     AN_NotificationProxy.GCMRgisterDevice(AndroidNativeSettings.Instance.GCM_SenderId);
 }
コード例 #8
0
 public void InitPushNotifications(string icon, string sound, bool enableVibrationPush, bool showWhenAppForeground, bool replaceOldNotificationWithNew)
 {
     AN_NotificationProxy.InitPushNotifications(icon, sound, enableVibrationPush, showWhenAppForeground, replaceOldNotificationWithNew);
 }
コード例 #9
0
 public void RemoveLastMessageInfo()
 {
     AN_NotificationProxy.GCMRemoveLastMessageInfo();
 }
コード例 #10
0
 public void InitPushNotifications(string smallIcon, string largeIcon, string sound, bool enableVibrationPush, bool showWhenAppForeground, bool replaceOldNotificationWithNew, string color)
 {
     AN_NotificationProxy.InitPushNotifications(smallIcon, largeIcon, sound, enableVibrationPush, showWhenAppForeground, replaceOldNotificationWithNew, color);
 }
コード例 #11
0
 public void ShowToastNotification(string text, int duration)
 {
     AN_NotificationProxy.ShowToastNotification(text, duration);
 }
コード例 #12
0
 public void HideAllNotifications()
 {
     AN_NotificationProxy.HideAllNotifications();
 }
コード例 #13
0
    //--------------------------------------
    //  PUBLIC METHODS
    //--------------------------------------

    public void LocadAppLaunchNotificationId()
    {
        AN_NotificationProxy.requestCurrentAppLaunchNotificationId();
    }
コード例 #14
0
 public void InitParsePushNotifications()
 {
     AN_NotificationProxy.InitParsePushNotifications(AndroidNativeSettings.Instance.ParseAppId, AndroidNativeSettings.Instance.DotNetKey);
 }
コード例 #15
0
 public void InitPushNotifications(string icon, string sound, bool enableVibrationPush)
 {
     AN_NotificationProxy.InitPushNotifications(icon, sound, enableVibrationPush);
 }