Android Question Which change from Android 4.0.4 to Android 4.4.2...

LucaMs

Expert
Licensed User
Longtime User
.. may have caused this?

upload_2017-8-22_5-42-41.png



Logs of the same app / project and same "steps", of course.

The wanted behavior is the one you can see in the Tablet log.

[Activities Main and actRegLogin call Activity.Finish]


[Hard to answer without the source code, I know, but there so many geniuses in this site :rolleyes:]
 
Last edited:

LucaMs

Expert
Licensed User
Longtime User
I'm trying to follow the flow of this kind of "app template" that some stupid has designed (ME :p... but a long time ago and it was different, other activities are missing with their events!).

Main Activity uses a my class to run a splash-screen animation (Main contains a panel that is passed to the class). This class also has a check for an Internet connection (not the best way, downloading google.com).

At the end of these two things, an event "returns control" to Main.

Main calls actRegLogin (StartActivity ...) which, being momentarily a fake Activity, starts actRealMain from its Resume.

This works perfectly with Android 4.4.2 and does not work with Android 4.0.4.


I must add that the smartphone with Android 4.0.4 has always given me problems!
The best way to solve this problem is... make a collet and give me the latest and most expensive model on the market :p

(I'm joking, obviously, I "hope" that I'm not the only one with an old device so the problem may happen to millions of users of my appS).
 
Last edited:
Upvote 0

LucaMs

Expert
Licensed User
Longtime User
Try to reproduce this in a small project with only the activities management.
Done and attached.

[There are very few things added, just to make the project similar to the original one.
Do not give importance to the fact that you can not exit the app; is just to show the different behavior between the two Android versions].

Logs: [above the blue line they are identical]
upload_2017-8-22_21-29-35.png



I'm not asking for a solution or a workaround, I can and will change many things. I would understand why this different behavior, thinking it is due to the different Android versions.
 

Attachments

  • AppFlow test.zip
    8.4 KB · Views: 283
Last edited:
Upvote 0

lemonisdead

Well-Known Member
Licensed User
Longtime User
- unsure - this reminds me some troubles between not the Android's version but different processors (arm/Intel). Could it be the case - unsure -
 
Upvote 0

LucaMs

Expert
Licensed User
Longtime User
This code is dangerous:
B4X:
Sub Activity_Resume
   StartActivity(actRealMain)
   Activity.Finish
End Sub

Add Sleep(500) before you switch to a different activity.
I don't use this code, of course, it has no sense, since you will never want to start an activity which should do... nothing. Here the activity is just a "placeholder".


- unsure - this reminds me some troubles between not the Android's version but different processors (arm/Intel). Could it be the case - unsure -
I don't know if this could be the problem but maybe other hw components?

If someone has a device with android 4.0.4 and want to test the project ...
Thank you.
 
Upvote 0
Top