Android Question Delay when startActivity is used when app is paused by home key

Jmu5667

Well-Known Member
Licensed User
Longtime User
Hello

I have a very strange behavior.

We have a PTT app, and it runs on all types of devices. Some devices have a PTT button built into them which we can use via intent handling. The PTT button triggers an intent which is received into a service(set in the manifest file) and when we get PTT down intent to call startactivity(main) and the app pops up instantly.

The above is generally true when the user press's the back key, however when the home key is pressed, that is a 3 second delay before the app pop's up.

some info: https://stackoverflow.com/questions...oid-home-key-and-back-key-and-their-behaviour

Any advice on this ?

Regards

John.
 
Last edited:

Jmu5667

Well-Known Member
Licensed User
Longtime User
Right now, your logging shows an extra step (svc_service) for the home button push that the back button push does not have. Is that for testing purposes only and even without this extra step you have a 3 second delay? Without svc_service, is the log the same (all the steps) for both back button and home button cases with the only difference being the delay?

The svc_service was put in to see if it would make a difference, it did'nt. Originally, I was making the same call regardless of back/home button press in the intent handler.

Also, does it matter what application is on top when the home button is pushed - is the PTT app always up on top or can others be? - trying to see if it is an issue with the PTT app or all apps (if others can be on top)

Really good point, did not think of that, and just tested it, the result is the same. Loaded chrome browser, when the home button is pressed, chrome goes away, press PTT button and there is a delay before the app pops up. Same test using the back button, app pops up immediately.
 
Upvote 0

OliverA

Expert
Licensed User
Longtime User
Two other tests:

1) Start ptt -> back button -> start chrome -> home button -> push ptt button

2) Start ptt -> start 2nd app -> start 3rd app -> push back button (2nd app should be up) -> push ptt button. Do not use back button in ptt app to start second app!

What are the results?
 
Upvote 0
Top