Android Question When plugin charger activity is going refresh

Soheyl

Member
Licensed User
Longtime User
Hello Everyone
I have a problem with B4A
When I plug in the battery charger, the activity reloads without any event!
My meaning is on default new project, before any change.

I attached a project example.
Connect by Cable and try to plug and unplug.

Watch Video on Youtube



Any guess?

thanks
 

Attachments

  • Connect-USB-Bug.zip
    428.5 KB · Views: 124
Last edited:

JohnC

Expert
Licensed User
Longtime User
Are you sure neither the Activity_Pause or Activity_Resume sub events are not called when the "USB cable is connected" notification is displayed?
 
Upvote 0

Soheyl

Member
Licensed User
Longtime User
I tested now on
Google Pixel - Android 13 Beta 2
And
Samsung Galaxy Note 10 Plus + Android 12

The problem is just on Android 13
 
Upvote 0

JohnC

Expert
Licensed User
Longtime User
If you dont display the msgbox, and then you plug in the usb connector, does Activity_Pause or Activity_Resume trigger?

I'm thinking the problem is that the USB pop-up message is dismissing the msgbox, and the activity is not actually refreshing.
 
Upvote 0

Soheyl

Member
Licensed User
Longtime User
Amm might be right, but without a message box, it's happening on the main activity as well.

I found it, and it seems to be happening on every app! I think it's an Android bug, because it only happens when Battery Save Mode is active.

I'm grateful for your time. ?
 
Upvote 0
Top