Android Question Google Application Testing

Cleidson

Member
Hello everybody,
I recently submitted an app for analysis on the Google Play Console and one of the tests returned that “the use of exact alarms is causing the app to crash for some Android users
The app schedules exact alarms without checking whether the SCHEDULE_EXACT_ALARM permission has been granted. This is causing the app to crash for Android 14 users because the permission is no longer granted by default.
In most cases, alternative work scheduling methods or inaccurate alarms are more suitable. If the use of exact alarms is warranted, update the app to verify that permission was granted before programming.”
I exactly followed the instructions contained in this post by Erel, and by reading the code, permission to use the watch is requested.

https://www.b4x.com/android/forum/threads/start-receiver-at-exact-time.148185/#content

So I don't understand if it's an error or a mere message and what should be done.
I would like to thank everyone who can guide me on this subject.
 

Cleidson

Member
Erel,
Thank you for your attention. I did a test using Firebase and it didn't return any problems. Here are two screenshots: One was taken by Google tests and the other using a virtual device. Both ask for authorization to use the alarm.



Tela Andriod 14.png
Tela Andriod 14 1.png



When performing a test, in debug mode, there was this error:



B4X:
Logger conectado a: emulator-5554
--------- beginning of main
Copying updated assets files (77)
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create (first time) **
** Activity (main) Pause event (activity is not paused). **
Call B4XPages.GetManager.LogEvents = True to enable logging B4XPages events.
Error occurred on line: 289 (B4XMainPage)
java.lang.Exception: array not expected...


This error occurs in this part of the code:

B4X:
Wait For ion_Event (MethodName As String, Args() As Object)

Return -1 = Args(0)

And even though you authorize the use of the alarm in the emulator, it returns as not allowed.
 
Upvote 0
Top