Android Question Got a Pixel phone + usb connection + Android 16?

Sandman

Expert
Licensed User
Longtime User
There's two of us with that combination here in the forum that started getting "AppName isn't responding" messages.

If you are have the combination above, could you please comment on whether you get these messages now and then?
(Also post if you have the combination and do not get the messages.)


If you want to read more about this issue, here is the thread:
www.b4x.com/android/forum/threads/appname-not-responding.170706/
 

xeriko

Member
Licensed User
Longtime User
Same here — I have that combination and I'm getting the "AppName isn't responding" messages too. And it's not just now and then for me; it pops up roughly every 20 seconds, which makes it really annoying to work with.
 
Upvote 0

Alessandro71

Well-Known Member
Licensed User
Longtime User
Maybe not related at all, but I’m receiving complaints from users with Bluetooth issues on pixel phones after the latest Google patch.
maybe that latest patch has stability problems
 
Last edited:
Upvote 0

Dave O

Well-Known Member
Licensed User
Longtime User
I just got a crash reported by a user using my app on their Pixel 3a (Android 12), which was working fine until a few days ago. She just got a new Pixel 9a (Android 16) and the same crash is happening to it - <appname> keeps stopping - on app startup.

Wonder if mine is related to yours?
 
Upvote 0

Jmu5667

Well-Known Member
Licensed User
Longtime User
I have a Pixel 6a/Android 16 with all our apps running and have never encountered this issue. Has anyone done a 'adb logcat -d > device.txt' ? I would be glad to help if you want to send me an apk.

John.
 
Upvote 0

Sandman

Expert
Licensed User
Longtime User
Wonder if mine is related to yours?
Best guess: yes.

Has anyone done a 'adb logcat -d > device.txt' ?
Oh yes, quite a bit. The only thing ever that comes up is that there is something with the Starter, even though it's completely unmodified from a blank project. (I'm guessing that there is a minor possibility that we'll get a B4A update at some point, with updated behind-the-scenes code for the Starter.) Check out the linked thread in #1 for a bit more info.
 
Upvote 0

Alex_197

Well-Known Member
Licensed User
Longtime User
 
Upvote 0

Dave O

Well-Known Member
Licensed User
Longtime User
If it's a debugger issue, then does that mean that it only happens in Debug mode? (My reported crashes are in a production app (Release Obfuscated mode).)
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Whoever encountered this error, please try it with this code in the starter service:
B4X:
Sub Service_Create
    Log("Service_Create")
    StopService(Me)
End Sub

Sub Service_Start (StartingIntent As Intent)
    Log("Service_Start")
    Service.StopAutomaticForeground 'Starter service can start in the foreground state in some edge cases.
End Sub

Based on my tests it solves the issue related to the service execute ANR.
 
Upvote 0

Sandman

Expert
Licensed User
Longtime User
Based on my tests it solves the issue related to the service execute ANR
I have tried now, and it does indeed solve the issue. Thank you, it's good to be able to code using Debug again.

The only thing I use Starter for nowadays is the Application_Error sub, the StopService(Me) doesn't in any way interfere with that, right?

Just because I'm curious, does this mean that we will get an updated B4A with updated behind-the-scenes code for Starter at some point, so we don't have to have to stop the service? Or will the Starter template code get an update to contain the StopService(Me)?
 
Upvote 0

Alessandro71

Well-Known Member
Licensed User
Longtime User
Is this limited to Android 16 on Pixel phones?
because I have Android 16 users with no issues so far.
 
Upvote 0

Dave O

Well-Known Member
Licensed User
Longtime User
My starter crash on a user's Pixel 3a is for a release-obfuscated app (not debug) and NOT running B4XPages.

So still not sure if my crash is related to this one, but here's the details just in case they're useful to y'all:

B4X:
Exception java.lang.RuntimeException:
  at android.app.ActivityThread.handleCreateService (ActivityThread.java:4567)
  at android.app.ActivityThread.access$1700 (ActivityThread.java:256)
  at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2110)
  at android.os.Handler.dispatchMessage (Handler.java:106)
  at android.os.Looper.loopOnce (Looper.java:201)
  at android.os.Looper.loop (Looper.java:288)
  at android.app.ActivityThread.main (ActivityThread.java:7870)
  at java.lang.reflect.Method.invoke
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:548)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1003)
Caused by java.lang.RuntimeException:
  at anywheresoftware.b4a.BA.raiseEvent2 (BA.java:258)
  at anywheresoftware.b4a.BA.raiseEvent (BA.java:201)
  at name.obrien.dave.lister.starter.onCreate (starter.java:56)
  at android.app.ActivityThread.handleCreateService (ActivityThread.java:4554)
 
Upvote 0

Sandman

Expert
Licensed User
Longtime User
I have tried now, and it does indeed solve the issue. Thank you, it's good to be able to code using Debug again.
Update. I'm still getting ANR now and then, but the number of times it happens have clearly decreased.
 
Upvote 0

Dave O

Well-Known Member
Licensed User
Longtime User
My starter crash on a user's Pixel 3a is for a release-obfuscated app (not debug) and NOT running B4XPages.

Again, don't know if this helps, but I also have this in my Starter's Service_Create:

B4X:
    Service.AutomaticForegroundMode = Service.AUTOMATIC_FOREGROUND_NEVER

I read up on foreground mode a while ago, but was never really clear on how it worked. I use Starter to initialize a bunch of things and set up data structures, and also to listen for responses from CloudKVS.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
So still not sure if my crash is related to this one, but here's the details just in case they're useful to y'all:
This is a different issue.

Application_Error will continue to work as usual. Stopping the service should make no difference. It will probably be added to the projects templates (not sure yet).

Update. I'm still getting ANR now and then, but the number of times it happens have clearly decreased.
Please post the logs when it happens.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…