Exemple #1
0
        /// <summary>
        /// Schedules a notification to fire. Use the fields in the AndroidNotificationConfiguration object to configure the notification. When dealing with grouped notifications
        /// the groupKey must match for all notifications and you must set one notification to be the summary notification (AndroidNotificationConfiguration.isGroupSummary
        /// must be true). The extraData will be returned with the notificationReceivedEvent and the int returned (requestCode) can be used to cancel the notification.
        /// If AndroidNotificationConfiguration.cancelsNotificationId is set when the notification fires it will call cancelNotification with that notification Id.
        /// </summary>
        public static int scheduleNotification(AndroidNotificationConfiguration config)
        {
            if (Application.platform != RuntimePlatform.Android)
            {
                return(-1);
            }

            config.build();
            return(_plugin.Call <int>("scheduleNotification", Json.encode(config)));
        }
Exemple #2
0
        // Schedules a notification to fire. Use the fields in the AndroidNotificationConfiguration object to configure the notification. When dealing with grouped notifications
        // the groupKey must match for all notifications and you must set one notification to be the summary notification (AndroidNotificationConfiguration.isGroupSummary
        // must be true). The extraData will be returned with the notificationReceivedEvent and the int returned (requestCode) can be used to cancel the notification.
        // If AndroidNotificationConfiguration.cancelsNotificationId is set when the notification fires it will call cancelNotification with that notification Id.
        public static int scheduleNotification(AndroidNotificationConfiguration config)
        {
            if (Application.platform != RuntimePlatform.Android)
            {
                return(-1);
            }

            config.build();
            //return _plugin.Call<int>( "scheduleNotification", config.secondsFromNow, config.title, config.subtitle, config.tickerText, config.extraData, config.smallIcon, config.largeIcon, config.requestCode, config.color, config.groupKey, config.isGroupSummary );
            return(_plugin.Call <int>("scheduleNotification", Json.encode(config)));
        }
Exemple #3
0
        // Schedules a notification to fire. Use the fields in the AndroidNotificationConfiguration object to configure the notification. When dealing with grouped notifications
        // the groupKey must match for all notifications and you must set one notification to be the summary notification (AndroidNotificationConfiguration.isGroupSummary
        // must be true). The extraData will be returned with the notificationReceivedEvent and the int returned (requestCode) can be used to cancel the notification.
        // If AndroidNotificationConfiguration.cancelsNotificationId is set when the notification fires it will call cancelNotification with that notification Id.
        public static int scheduleNotification( AndroidNotificationConfiguration config )
        {
            if( Application.platform != RuntimePlatform.Android )
                return -1;

            config.build();
            return _plugin.Call<int>( "scheduleNotification", Json.encode( config ) );
        }