Whenever I run this code I get error 908: Permission denied. Also specify if something to be written in activitystarter.
Try to writing the permissions like this :
And please show me your all block.
Both are not dangerous permissions. They should be granted automatically (without user interaction).
See e.g. here: https://developers.google.com/nearby/connections/android/get-started?hl=da
What permission is denied?
Which components / extensions are used?
What is the goal / purpose of the app?
See also here:
Anke, I have the same problem too.
When I ask this permission too get error that permission denied & says to allow in the
settings app. But there too I don't see permission.
I am using my own extension which manages notifications.
You can only ask for permissions that are declared in the app's manifest at compile time. If the app doesn't include the permission, then it will be automatically denied if you try to request it. If you're getting those permissions from an extension, you can only test by compiling the app as the companion won't have extension-specific permissions.
The extension doesn't asks permission, its requested from blocks.
Also tried building the
APK but the result was same.
If using permission for the
extension then should it be granted from
From which blocks?
As @ewpatton said you can only require a permission that is declared in the Manifest.
If an extension needs a specific (dangerous) permission it should add this permission to the Manifest and ask for this permission.
This permission can only be granted by the user (not by the extension itself).
That means the permission should be there in the manifest then only we can ask right? Can we not ask directly?
Exactly. However, all you need to do is request dangerous permissions.
If your app lists a normal permission in its Manifest, that permission is automatically granted.
I want to develop an app which can start wifi using a button.
please guide me to develop this project.
and thank you for your support.
Just to clarify. The manifest is built into the app at compile/package time. If an extension requests a permission, then when you package an app with that extension in use, the permission will be declared in the manifest and all should work as expected.
However, if you load the extension into the Companion while debugging, the manifest, which was built when we compiled the Companion, will not be updated.
At the moment the Companion includes ACCESS_WIFI_STATE but not CHANGE_WIFI_STATE (because no MIT App Inventor component uses that permission).
You have two alternatives at this point. You can just test by packaging your app and installing it on a device. You can try building your own companion ("ant playapp") and include the permission. This may happen if you just include the extension when you build the Companion (I haven't tried this). Or you can alter the file "Compiler.java" (where the manifest is set up) to include the permission.
Yes, I added this permission "
CHANGE_WIFI_STATE" (and also some others) to the Manifest of the Companion APK.
But I always test my apps (especially permissions) with the compiled app (APK).
Here is a video tutorial for those interested in how to edit the Manifest:
buenas tardes el dia de hoy quiero preguntar como puedo solucionar el problema Error 908: permisos denegados
esta es mi primera aplicacion creada con app inventor y cuando ejecuto la aplicación no me genera ningun error, pero cuando creo el apk en el movil me genera el error reportado
adjunto una captura de como configure los permisos.
si requieren mas informacion puedo compartir el projecto
Which Android version?
Target Android 11
If your app targets Android 11, both the
WRITE_EXTERNAL_STORAGEpermission and the
WRITE_MEDIA_STORAGEprivileged permission no longer provide any additional access.
to store files, use the ASD - application specific directory, which does not require any permission
see also the overview by @Anke here