Android Question [Solved] Android 8 and Traslucent and Portrait BUGS

Star-Dust

Expert
Licensed User
Longtime User
From November 1st google requested that the Apps be given the SDK TARGET the 28 (Android 9)

I among my apps I have one that allows you to take note of the daily expenses, so it did not require any changes except to change the number of SdkTarget in the Manifest (From 26 to 28).

Having done so and trying the App works well on Android 9 (Sdk 28) but everyone who has Android 8 (Sdk 26) does not start up anymore and makes a mistake. You can't even understand what a mistake it is.
To specify that when the SDK TARGET value was 26 it worked correctly on Android 8 devices, it does not work with I changed the SDK Target to 28

Unfortunately, not having a device with Android 8 and I can't do any of the tests.


Do you have any suggestions?
 
Last edited:

DonManfred

Expert
Licensed User
Longtime User
Do you have any suggestions?
Can you upload a apk to test (or app source to compile by myself)? I have an Device with Android 9 to test.
 
Upvote 0

Star-Dust

Expert
Licensed User
Longtime User
Thanks Don, but I have an Android 9 device and it works fine.

It doesn't work on Android 8 device, which I don't have.

PS. The device that told me that it doesn't work is Honor 10 View with Android 8
 
Upvote 0

Star-Dust

Expert
Licensed User
Longtime User
I contacted the client (which has a device with Android 8) and sent a version reporting sdk 26 (only this change) and now it works.

How do you explain it?

PS. I've tried on Android 5,6,7 and 9 devices and everything works fine. Unfortunately I don't have physical devices with Android 8

Update : I'm having several reports of the same problem on all those who have devices with Android 8
 
Upvote 0

rboeck

Well-Known Member
Licensed User
Longtime User
You can send me the apk file to test; my device is an ZTE Axon with Android 8.0.0. You can also send me some source to test.
As B4A user maybe i can see something in the log files.
 
Upvote 0

Star-Dust

Expert
Licensed User
Longtime User
You can send me the apk file to test; my device is an ZTE Axon with Android 8.0.0. You can also send me some source to test.
As B4A user maybe i can see something in the log files.
Thanks, I'm not in the office right now and can't send

Maybe it is an Android 8.1 device (sdk 27)?
It's possible
 
Last edited:
Upvote 0

Star-Dust

Expert
Licensed User
Longtime User
I add a detail that has emerged now, with Android 8.1 working properly, only with Android 8.0 crashes
 
Upvote 0

Star-Dust

Expert
Licensed User
Longtime User
Upvote 0

Star-Dust

Expert
Licensed User
Longtime User
It seems to be the manifest that crashes the App. And exactly the choice of the theme that in the version 8.0 sends in crash, while in the versions 5,6,7,8.1,9 it works

B4X:
SetApplicationAttribute(android:theme, "@android:style/Theme.Translucent")

Why?
 
Upvote 0

OliverA

Expert
Licensed User
Longtime User
It seems to be an Android 8 BUGS. If you have the Translucent theme, you cannot have a portrait orientation
More precise: With Android 8, when using the Translucent theme and SDK target of 27 and up, you cannot control your activities orientation (regardless of portrait or landscape). The Activity will have the same orientation as the non-translucent Activity behind it. See: https://stackoverflow.com/a/48871807
 
Upvote 0

Star-Dust

Expert
Licensed User
Longtime User
More precise: With Android 8, when using the Translucent theme and SDK target of 27 and up, you cannot control your activities orientation (regardless of portrait or landscape). The Activity will have the same orientation as the non-translucent Activity behind it. See: https://stackoverflow.com/a/48871807
That's not right, only with SDK 26. With Sed 27 and 28 they work as usual. I'm sure of it because I've tried it :p
 
Upvote 0
Top