Hello JereMiami,
When building for API33 (i.e. with LiveCode 9.6.10 or 10.0.0 DP-6) and running on Android 13 and above, applications which send push notifications must check that the user has granted the necessary permission to do so and request it if not.
This could be done, for example, when the user enables an app feature which requires such notifications, or on startup of the app, in the app's main openStack handler, using the following code:
Code: Select all
if the platform is "android" and the systemVersion >= 13 then
local tPostNotificationsPermissionGranted
put androidHasPermission("android.permission.POST_NOTIFICATIONS") \
into tPostNotificationsPermissionGranted
if not tPostNotificationsPermissionGranted then
androidRequestPermission "android.permission.POST_NOTIFICATIONS"
end if
put androidHasPermission("android.permission.POST_NOTIFICATIONS") \
into tPostNotificationsPermissionGranted
if not tPostNotificationsPermissionGranted then
answer "This app is not permitted to post notifications. You can change this" && \
"in the Settings app."
end if
end if
Also, make sure you check the Push Notification checkbox in the Android settings and provide the necessary settings.json file
Hope this helps.
Kind regards,
Panos
--