• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps return to my activity once the call has ended

Soheb143

Lurker
I am currently calling the dialer from within my activity using the
following code
"Intent dialIntent = new Intent(Intent.ACTION_DIAL);
startActivity(dialIntent);"
is it possible to return to my activity once the call has ended? When the dialer is shown, i want to block the home button, back button etc. so that user cant go anywhere.. is this possible??
2 days ago
 
Not sure this is possible...

But you could try startActivityForResult(Intent i, int resultCode); And FLAG_ACTIVITY_NEW_TASK in your intent.

This may or may not return them to your app after the call (they may still end up on the call log screen of the dialer), but it should bring them back if they hit the back button.

hth
 
I should add that it is impossible to override the HOME button unless you specify your app as a home screen replacement in the manifest.
 
Back
Top Bottom