How do you request notification permission on first app launch in MIT App Inventor?

Hello everyone,

I am developing an app in MIT App Inventor and I use OneSignal for push notifications, which are successfully delivered to users. However, I have a problem with setting up the app so that on the first launch it automatically asks the user to grant notification permission.

I understand that from Android 13 (API 33) onward, explicit user permission is required to send notifications, but I’m not sure how to implement this properly in MIT App Inventor, since I don’t see an option or component that allows this.

Does anyone know:

How to request this permission in MIT App Inventor?

What blocks should be used to make this happen only once at the first app launch?

Do I need to use an ActivityStarter or an external extension?

Maybe someone has an example of how they solved this?

Thanks in advance for your help!

Which extension are you using?
Please provide a link
That extension should provide the required method to ask for post notification permission

Taifun

I downloaded it from the internet, I can't remember where

Can you recommend where I can download it from the internet or can you send it to me by email
Tnx
Milan

You can always use the AskForPermission block defined in Screen1. However, we encourage extension developers to ask for permissions when they are needed, rather than at first launch, to match best practices defined by Google and Apple regarding apps published in their stores.