Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

During Option 1 - Automated Integration In iOS App of auto integration of Mapp SDK is chosen 2.2 option, then the developer can trigger alert dialog for notification permission whenever he wants.

...

iOS

...


Objective-C

Expand
titleiOS [Objective-C]
Code Block
[[Appoxee shared] showNotificationAlertDialog];

...

Expand
titleiOS [Swift]
Code Block
func userWantsToBeNotifiedByPushNotifications() {
    
    Appoxee.shared()?.postponeNotificationRequest = false
}


Android

For Android 13 and newer it is required to request runtime permission POST_NOTIFICATION to be able to display notification UI.

Expand
titleAndroid (Java)
Code Block
Appoxee.instance().requestNotificationsPermission(MainActivity.this, results -> {
    if (results.containsKey(Manifest.permission.POST_NOTIFICATIONS) && 
    results.get(Manifest.permission.POST_NOTIFICATIONS) == PermissionsManager.PERMISSION_GRANTED) {
        // Handle event when POST_NOTIFICATION granted
        Toast.makeText(MainActivity.this,"POST NOTIFICATIONS GRANTED!", Toast.LENGTH_SHORT).show();
    }

});