private CrossPlatformNotification CreateNotification (long _fireAfterSec, eNotificationRepeatInterval _repeatInterval) { // User info IDictionary _userInfo = new Dictionary<string, string>(); _userInfo["data"] = "add what is required"; CrossPlatformNotification.iOSSpecificProperties _iosProperties = new CrossPlatformNotification.iOSSpecificProperties(); _iosProperties.HasAction = true; _iosProperties.AlertAction = GMS.appName; CrossPlatformNotification.AndroidSpecificProperties _androidProperties = new CrossPlatformNotification.AndroidSpecificProperties(); _androidProperties.ContentTitle = GMS.amigoData.nombre; _androidProperties.TickerText = GMS.appName; _androidProperties.CustomSound = "Notification.mp3"; //Keep the files in Assets/StreamingAssets/VoxelBusters/NativePlugins/Android folder. //_androidProperties.LargeIcon = "NativePlugins.png"; //Keep the files in Assets/StreamingAssets/VoxelBusters/NativePlugins/Android folder. if (GMS.checkImageExists (GMS.amigoData.foto)) { _androidProperties.LargeIcon = Application.persistentDataPath + "/" + GMS.amigoData.foto; } else { _androidProperties.LargeIcon = "default.jpg"; } CrossPlatformNotification _notification = new CrossPlatformNotification(); _notification.AlertBody = MgsTextNotif; //On Android, this is considered as ContentText _notification.FireDate = System.DateTime.Now.AddSeconds(_fireAfterSec); _notification.RepeatInterval = _repeatInterval; _notification.UserInfo = _userInfo; _notification.iOSProperties = _iosProperties; _notification.AndroidProperties = _androidProperties; return _notification; }
private VoxelBusters.NativePlugins.CrossPlatformNotification CreateNotification(long _fireAfterSec, VoxelBusters.NativePlugins.eNotificationRepeatInterval _repeatInterval) { // User info IDictionary _userInfo = new Dictionary <string, string>(); _userInfo["data"] = "custom data"; VoxelBusters.NativePlugins.CrossPlatformNotification.iOSSpecificProperties _iosProperties = new VoxelBusters.NativePlugins.CrossPlatformNotification.iOSSpecificProperties(); _iosProperties.HasAction = true; _iosProperties.AlertAction = "alert action"; VoxelBusters.NativePlugins.CrossPlatformNotification.AndroidSpecificProperties _androidProperties = new VoxelBusters.NativePlugins.CrossPlatformNotification.AndroidSpecificProperties(); _androidProperties.ContentTitle = "Daily Quote"; _androidProperties.TickerText = "Check your new daily quote for today"; _androidProperties.LargeIcon = "icon.png"; //Keep the files in Assets/PluginResources/Android or Common folder. VoxelBusters.NativePlugins.CrossPlatformNotification _notification = new VoxelBusters.NativePlugins.CrossPlatformNotification(); _notification.AlertBody = "Check your new daily quote for today"; //On Android, this is considered as ContentText _notification.FireDate = System.DateTime.Now.AddSeconds(_fireAfterSec); _notification.RepeatInterval = _repeatInterval; _notification.SoundName = "Notification.mp3"; //Keep the files in Assets/PluginResources/Android or iOS or Common folder. _notification.UserInfo = _userInfo; _notification.iOSProperties = _iosProperties; _notification.AndroidProperties = _androidProperties; return(_notification); }
private CrossPlatformNotification CreateNotification (long _fireAfterSec, eNotificationRepeatInterval _repeatInterval) { // User info IDictionary _userInfo = new Dictionary<string, string>(); _userInfo["data"] = "add what is required"; CrossPlatformNotification.iOSSpecificProperties _iosProperties = new CrossPlatformNotification.iOSSpecificProperties(); _iosProperties.HasAction = true; _iosProperties.AlertAction = "alert action"; CrossPlatformNotification.AndroidSpecificProperties _androidProperties = new CrossPlatformNotification.AndroidSpecificProperties(); _androidProperties.ContentTitle = "content title"; _androidProperties.TickerText = "ticker ticks over here"; _androidProperties.CustomSound = "Notification.mp3"; //Keep the files in Assets/StreamingAssets/VoxelBusters/NativePlugins/Android folder. _androidProperties.LargeIcon = "NativePlugins.png"; //Keep the files in Assets/StreamingAssets/VoxelBusters/NativePlugins/Android folder. CrossPlatformNotification _notification = new CrossPlatformNotification(); _notification.AlertBody = "alert body"; //On Android, this is considered as ContentText _notification.FireDate = System.DateTime.Now.AddSeconds(_fireAfterSec); _notification.RepeatInterval = _repeatInterval; _notification.UserInfo = _userInfo; _notification.iOSProperties = _iosProperties; _notification.AndroidProperties = _androidProperties; return _notification; }