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 |
---|
|
Code Block |
---|
[[Appoxee shared] showNotificationAlertDialog]; |
|
...
Expand |
---|
|
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 |
---|
|
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();
}
}); |
|