This is the current mechanism:
android.intent.action.view
and my app listens for it, so I can start my app to show call log.The problem is, that a new instance of my app is being created, instead of taking the other into foreground. This is problem because loading the app again needs some time, and I need an instant, very fast action.
I would like to avoid the loading time, so this would be the ideal solution:
... 3. System fires intent, and my background app comes into foreground (instead of launching it again) and does it's job
I have read that posiibly it cannot be done because of security, but my app would start anyway, I just want to make it faster, so I hope there is a solution.
I solved it with new task flag and passing parameters in phonestatelistener. Interesting that sometimes phone state changes during calls almost "at random", so it gives a hard time to handle the cases on all phones and os versions.