ok. i can run erel's example on android 12 and android 14 without the double message. since you went with b4xpages and i didn't, i have to assume there is an issue there (although i have no idea what). if you decide to try it with a "classic" b4a app, you need to modify the example (per erel):
B4X:
'b4xpages
'Sub GetBA As Object
' Dim jo As JavaObject = Me
' Return jo.RunMethod("getBA", Null)
'End Sub
'If not using B4XPages, replace GetBA with:
Sub GetBA As Object
Dim jo As JavaObject
Dim cls As String = Me
cls = cls.SubString("class ".Length)
jo.InitializeStatic(cls)
Return jo.GetField("processBA")
End Sub
maybe erel (or someone who has encountered the same issue) will spot this thread and comment. sorry.
I'm using a b4xpage project in an emulator with Android 14, to test this functionallity.
I still get this same behavior (don't shows the permission, even was granted, in first time) in an activity project too.
But I'm grad to your support. Thanks again @drgottjr.