If (e.PreviousExecutionState = ApplicationExecutionState.Terminated) TODO: change this value to a cache size that is appropriate for your application Create a Frame to act as the navigation context and navigate to the first page Do not repeat app initialization when the Window already has content, OneSignal.Init("b2f7f966-d8cc-11e4-bed1-df8f05be55ba", e, notificationOpened) įrame rootFrame = as Frame Protected override void OnLaunched(LaunchActivatedEventArgs e) / Details about the launch request and process. / will be used when the application is launched to open a specific file, to display / Invoked when the application is launched normally by the end user. OneSignal.SetLogLevel(OneSignal.LOG_LEVEL.DEBUG, OneSignal.LOG_LEVEL.DEBUG) This improves the effectiveness of OneSignal's "best-time" notification scheduling feature. Call syncHashedEmail anywhere in your app if you have the user's email. OneSignal.IdsAvailable((userId, pushToken) =>ĭebug.Log("- VREEL: UserID: " + userId + " - PushToken: " + pushToken) OneSignal.SetLogLevel(OneSignal.LOG_LEVEL.INFO, OneSignal.LOG_LEVEL.INFO) Enable line below to enable logging if you are having issues setting up OneSignal. OneSignal.Init(OneSignal_AppId, GoogleProjectNumber) Call before using any other methods on OneSignal. If (PlayerPrefs.GetInt("PrimeraVez") = 0) Var pushState = OneSignal.GetPermissionSubscriptionState() OneSignal.emailSubscriptionObserver += OneSignal_emailSubscriptionObserver OneSignal.subscriptionObserver += OneSignal_subscriptionObserver OneSignal.permissionObserver += OneSignal_permissionObserver HandleInAppMessageClicked(HandlerInAppMessageClicked) HandleNotificationOpened(HandleNotificationOpened) HandleNotificationReceived(HandleNotificationReceived) Should only be called once when your app is loaded. Call before using any other methods on OneSignal (except setLogLevel or SetRequiredUserPrivac圜onsent) The only required method you need to call to setup OneSignal to receive push notifications. OneSignal.SetRequiresUserPrivac圜onsent(requiresUserPrivac圜onsent) using OneSignal.UserDidProvideConsent(true) before the If you set to true, the user will have to provide consent OneSignal.SetLogLevel(OneSignal.LOG_LEVEL.VERBOSE, OneSignal.LOG_LEVEL.NONE) Enable line below to debug issues with setuping OneSignal. String body = createEmailBody(userName, resetLink1) īool IsMailSent = SendMailNotification(message) String resetLink1 = appurl + "UserManagement/ActivateUser?" + urlparams.Split('&') + "&" + urlparams.Split('&') + "&" + urlparams.Split('&') Reference.Child("usernameList").Child(friendUsername).GetValueAsync().ContinueWith(task => ) Public void SendNotificationAndCoins(string friendUsername)ĭatabaseReference reference = OneSignal.InitWithLaunchOptions(new Foundation.NSDictionary() , new Foundation.NSNumber((int)_builder.DisplayOption)) , new Foundation.NSNumber(inAppLaunchURL) Var dict = new Foundation.NSDictionary("kOSSettingsKeyInAppLaunchURL" OneSignal.SetLogLevel(convertedLogLevel, convertedVisualLevel) Var convertedVisualLevel = (OneSLogLevel)((ulong)((int)_visualLogLevel)) Var convertedLogLevel = (OneSLogLevel)((ulong)((int)_logLevel)) If (_(kOSSettingsKeyAutoPrompt))ĪutoPrompt = _builder.IOSSettings Bool autoPrompt = false, inAppLaunchURL = false
0 Comments
Leave a Reply. |