Android Question [Solved] Blank screen when starting any application created with B4A (Android 11)

vecino

Well-Known Member
Licensed User
Longtime User
Hi, on a new 10" tablet with Android 11 I am having that problem with any application created with B4A.
Even also the "B4A Bridge" app has that problem.
Even with an application that has only one button.
Usually the whole screen goes blank, and if I hit the "back key" it exits (sometimes) and if I try to enter again then sometimes it starts fine (sometimes).
I have downloaded, for testing purposes, from the google store several apps and they all work fine.
I'm lost!!! I don't get it, it's 6 tablets the same.
I have seen this thread which is similar to what is happening to me:
What could be going on?
 
Solution
Hi, on a new 10" tablet with Android 11 I am having that problem with any application created with B4A.
Even also the "B4A Bridge" app has that problem.
Even with an application that has only one button.
Usually the whole screen goes blank, and if I hit the "back key" it exits (sometimes) and if I try to enter again then sometimes it starts fine (sometimes).
I have downloaded, for testing purposes, from the google store several apps and they all work fine.
I'm lost!!! I don't get it, it's 6 tablets the same.
I have seen this thread which is similar to what is happening to me:
What could be going on?
I had the same problem some time ago.
As sugested here several times : remove the Starter module.
The problem is : with de...

agraham

Expert
Licensed User
Longtime User
Beware of being sucked into assumptions that have no correlation with your problem. As far as I am aware there are no intrinsic problems with running B4A apps on Android 10, 11, 12 and 13 - I have done all those. There may be permissions differences but you seem to be targeting SDK 28 so normal permissions should suffice. If an app doesn't run on a Samsing table with Android 11 I would suspect the app and not the device has a problem. On the other hand, I wouldn't trust cheap Chinese tablets.
 
Upvote 0

MicroDrie

Well-Known Member
Licensed User
Longtime User
Attached is a simple application that is still under development and does not start with these tablets con Android 11.
Your ItemCheck program with targetSdkVersion="28" in the manifest runs smoothly on my Samsung Galxy A13 phone with Android 12.

My advice, as always, is to start by upgrading SDK manager to the latest current 30 version to fix any bugs.
What strikes me is this line in post #1:
Even also the "B4A Bridge" app has that problem.
I think it's unlikely that the Bridge program would suddenly have a previously unknown problem on Crap tablets with Android 11 as well.

Again, I would uninstall the bridge program first and then reinstall the latest version to clear up any "legged conflicting" software. Then in the IDE I would instruct the project to clean and delete unnecessary files for each connection with the Androids 11 tablets. Upgrade your manifest to targetSdkVersion="30".
 
Upvote 0

walterf25

Expert
Licensed User
Longtime User
What problems do you have?
Is it similar to what is happening to me?
My problem is not the same, but the app is really not very complex, all it does is starts a background service which receives data from a USB Serial cable, saves the data to a database and sends the data back to a server when a wifi or data connection is detected.

The Serial data received is sporadic, throughout an entire day there could be one stream of data as there could be 200 streams of data, so I have ruled out any issues with the USB Serial connection.

The problem is that in the Samsung tablet I mentioned above, this app seems to run very slow, most of the time if freezes up, rendering the tablet useless as it won't respond to the user's press of the menu buttons, as I mentioned the app runs entirely fine in all other devices, it's just the Samsung Tablet 8 SM-X205 that does this.

I am not claiming that the tablet is the issue but any one with a good common sense could deduce that there is definitely an issue and from all the testing i've done the only failure I see is with this tablet, I have even tested on an older Samsung Tab 3 tablet running Android 4.1.2. and the app runs flawlessly without any issues whatsoever.
 
Upvote 0

vecino

Well-Known Member
Licensed User
Longtime User
Thank you all, friends.
What was strange to me is that all 6 of the same tablets failed.
I have installed several dozen of the same tablets but with android <v11 and that is why I was blaming android and not the tablets.
Let's see if I can return them and exchange them for brand name ones with higher quality.
Thanks again.
 
Upvote 0

vecino

Well-Known Member
Licensed User
Longtime User
Desperate. Hello again, early this morning, as I am quite desperate with this issue, I have set about installing a huge amount of programs from the play store and they ALL work perfectly.
Game programs, drawing, weather station, weight loss, barcode, photo editing, etc. etc. etc. etc. etc.
ALL work perfectly.

However, I install "B4A bridge" and the first startup the screen goes blank. The second startup works fine.
The same thing happens with my programs. They ALL go blank on first boot, and then on the second try some start and some do not. Even a program that has only one button does the same thing.

And, I repeat, ANY program I install from the play store works perfectly.
But "B4A bridge" does not.
And neither do those created by me with B4A.
 
Upvote 0

MicroDrie

Well-Known Member
Licensed User
Longtime User
The Serial data received is sporadic, throughout an entire day there could be one stream of data as there could be 200 streams of data, so I have ruled out any issues with the USB Serial connection.

The problem is that in the Samsung tablet I mentioned above, this app seems to run very slow, most of the time if freezes up, rendering the tablet useless as it won't respond to the user's press of the menu buttons, as I mentioned the app runs entirely fine in all other devices, it's just the Samsung Tablet 8 SM-X205 that does this.
The problem with USB and Ethernet cards is that some vendors make "smart" drivers such as a "sleep" mode to save power if there has been no communication for a while. Especially if communication only takes place a few times a day, both the program and the USB driver are the first choice to put them in a "sleep" mode.
If that happens separately, that could be the reason for your application hanging. You may be able to add some sort of "keep it alive" mechanism into your program by sending something every now and then to prevent both the USB driver and the OS from putting the application and USB driver into a "sleep" state. . In addition, I would use all updates for the tablet, your IDE, all your libraries and also the latest SDK version to have any bug fixes implemented.

If that doesn't help I would create a USB test program that will test the communication between your IDE and the tablet. By taking longer and longer intervals, you can see when the problem occurs. Be aware that the moment of putting an application to "sleep" can be started by all kinds of things on the tablet. If power consumption isn't too much of a factor, you might consider sending a dummy query over the USB at regular intervals to keep it away from the "sleep".
 
Upvote 0

MicroDrie

Well-Known Member
Licensed User
Longtime User
And, I repeat, ANY program I install from the play store works perfectly.
But "B4A bridge" does not.
And neither do those created by me with B4A.
All forum members use the bridge program. I can't imagine that you are the only one where the Bridge program does not work. I advise you to remove your IDE and Java tools and then use them exactly according to the procedure in the default locations. Also remove your installed bridge software, and also all the programs you tried to install via your non-working bridge installation. Let us know how it goes next.
 
Upvote 0

vecino

Well-Known Member
Licensed User
Longtime User
Hi, I have uninstalled everything, B4A and java. I have reinstalled it according to the instructions here:
I have uninstalled from the tablet "B4A bridge", I have reinstalled it from the play store.
I have compiled my programs, installed them on my phone and two test tablets, it worked fine, as usual.

BUT, it still doesn't work "B4A bridge" on the android 11 tablets I have and my programs don't work either.
I have downloaded other programs randomly from the play store and they all work.

I am ALMOST convinced that there is some problem with android 11 and B4A.

This situation has no logic to it.
 
Upvote 0

vecino

Well-Known Member
Licensed User
Longtime User
How if you compile the release APK and host it somewhere then download it using web browser?
Just try remove the library one by one from the project.

I am doing it that way because B4A bridge does not work. I upload it with filezilla to my web server and download it with the tablet's web browser.

I'm going to try the remove libraries thing, see what I do with that.
 
Upvote 0

vecino

Well-Known Member
Licensed User
Longtime User
I think the problem is that it does not load the layout.
However, if I try again then it does load.

In my applications I have #IncludeTitle: False in all my applications.

However, I am doing a test and I have not changed that, i.e., it has #IncludeTitle: True

The application has only one button.
You can see that it does not show it when starting the program.

However, on the second try it does show it.

Therefore, I think, it seems to me, I think, that the problem is that the layout is not loaded.

I am going to link a video so that you can see what I mean.
 
Upvote 0

MicroDrie

Well-Known Member
Licensed User
Longtime User
1666606915159.png

Have you updated all your libraries to the latest version, especially the Dialog2 library you are using?
 
Upvote 0

vecino

Well-Known Member
Licensed User
Longtime User

I link a video to show you what happens with the blank screen.
In this case, as "includetitle=title" then the whole blank screen is not seen, the title is seen, but the rest is not seen, that is to say, the layout is not loaded. Which in this case is only a button.
 
Upvote 0

vecino

Well-Known Member
Licensed User
Longtime User
I have removed the layout and created the button by code.
The result is the same, the first time it does not show the button.
The next time it does.
 
Upvote 0

josejad

Expert
Licensed User
Longtime User
If you let the program with the blank page opened for a while, do you get some OS message telling the app doesn't respond or something like that?
 
Upvote 0
Top