// Init - Only required method you call to setup OneSignal to receive push notifications. public static void Init(NotificationOpened notificationOpenedDelegate, bool autoRegister) { //isAndroidPlatform = (CrossDeviceInfo.Current.Platform == Platform.Android); //isIOSPlatform = (CrossDeviceInfo.Current.Platform == Platform.iOS); //isOneSignalPlatform = true; //(isAndroidPlatform || isIOSPlatform); //supportsLogging = (isAndroidPlatform || isIOSPlatform); OneSignal.notificationOpenedDelegate = notificationOpenedDelegate; oneSignalPlatform = DependencyService.Get <OneSignalPlatform>(); initialized = true; #if ONESIGNAL_PLATFORM OneSignal.notificationOpenedDelegate = notificationOpenedDelegate; if (initialized) { return; } #if __ANDROID__ oneSignalPlatform = new OneSignalAndroid(logLevel, visualLevel); #elif __IOS__ oneSignalPlatform = new OneSignalIOS(autoRegister, logLevel, visualLevel); #endif initialized = true; #endif }
// inNotificationOpenedDelegate = Calls this delegate when a push notification is opened. public UnityBuilder HandleNotificationOpened(NotificationOpened inNotificationOpenedDelegate) { notificationOpenedDelegate = inNotificationOpenedDelegate;; return(this); }
// inNotificationOpenedDelegate = Calls this delegate when a push notification is opened. public XamarinBuilder HandleNotificationOpened(NotificationOpened inNotificationOpenedDelegate) { _notificationOpenedDelegate = inNotificationOpenedDelegate; return(this); }
public OneSignalBuilder HandleNotificationOpened(NotificationOpened inNotificationOpenedDelegate) { NotificationOpenedDelegate = inNotificationOpenedDelegate; return(this); }
// Auxiliary Constructors public static void Init(NotificationOpened notificationOpenedDelegate) { Init(notificationOpenedDelegate, true); }