void Awake() { // Ask for permission to show local notifications // It can be done at any point in the application if (!_hasLocalNotificationPermission) { Enhance.RequestLocalNotificationPermission(OnPermissionGranted, OnPermissionRefused); } // Set currency callback (offerwalls) // It is important to do in the beginning of the application's logic }
void Awake() { // Ask for permission to show local notifications // It can be done at any point in the application if (!_hasLocalNotificationPermission) { Enhance.RequestLocalNotificationPermission(OnPermissionGranted, OnPermissionRefused); } // Set currency callback (offerwalls) // It is important to do in the beginning of the application's logic Enhance.SetReceivedCurrencyCallback(onCurrencyReceived); UpdateIAPLabel(); SetIapProductSku("Extra10Gems"); }
/** * Request permission from the user to show local notifications * * @param onPermissionGrantedCallback executed when the permission is granted * @param onPermissionRefusedCallback executed when the permission is refused */ public static void RequestLocalNotificationPermission(Action onPermissionGrantedCallback, Action onPermissionRefusedCallback) { Enhance.RequestLocalNotificationPermission(onPermissionGrantedCallback, onPermissionRefusedCallback); }