Return to original activity after call ends

Quickly share your Android Code Snippets here...

Return to original activity after call ends

Postby voidptr » Fri Jul 23, 2010 4:28 pm

Hi All,

Is there a way to get the control back to the main activity that launched the Dialer to make a call.
It opens the call log after that.

I used the code below, but that causes issues with being able to see missed calls

> <intent-filter>
> <action android:name="android.intent.action.VIEW" />
> <category
> android:name="android.intent.category.DEFAULT" />
> <data android:mimeType="vnd.android.cursor.dir/calls" /
>
> </intent-filter>


Any ideas ??

Regards.
voidptr
Freshman
Freshman
 
Posts: 2
Joined: Thu Jul 22, 2010 7:46 pm

Top

Re: Return to original activity after call ends

Postby blundell » Mon Jul 26, 2010 11:25 am

Hmm if it opens the call log after the dialer, maybe your calling the wrong intent to get the dialer open?
User avatar
blundell
Master Developer
Master Developer
 
Posts: 1610
Joined: Tue Nov 18, 2008 12:58 pm
Location: UK

Re: Return to original activity after call ends

Postby limteckchai » Thu Jul 29, 2010 2:59 am

Hi ,
Can any1 share how they called the dialer to open and returning to the activity after it is over???
Much Thanks
limteckchai
Experienced Developer
Experienced Developer
 
Posts: 92
Joined: Mon Jun 28, 2010 3:33 am

Re: Return to original activity after call ends

Postby r00t316 » Sun Aug 01, 2010 10:20 pm

Do you want to return to a specific activity or to whatever activity was last open ?

If you have a specific activity use broadcastreceiver and intent PHONE_STATE

Actually you can use the above for both, just figure out when the phone state changes what was the last activity then launch it when the phone state become idle again.
r00t316
Developer
Developer
 
Posts: 29
Joined: Tue Jul 27, 2010 12:35 pm
Location: Florida

Re: Return to original activity after call ends

Postby limteckchai » Tue Aug 10, 2010 3:59 am

r00t316 wrote:Do you want to return to a specific activity or to whatever activity was last open ?

If you have a specific activity use broadcastreceiver and intent PHONE_STATE

Actually you can use the above for both, just figure out when the phone state changes what was the last activity then launch it when the phone state become idle again.


Sorry to bother you, but do u know where i can find some hints on this ?? like code snippets or examples
limteckchai
Experienced Developer
Experienced Developer
 
Posts: 92
Joined: Mon Jun 28, 2010 3:33 am

Re: Return to original activity after call ends

Postby voidptr » Thu Aug 12, 2010 5:44 pm

I am using the following intent to start the dialer to make the call

Intent ii = new Intent(Intent.ACTION_CALL, Uri.parse("tel:" + number);
startActivity(ii);
voidptr
Freshman
Freshman
 
Posts: 2
Joined: Thu Jul 22, 2010 7:46 pm

Top

Re: Return to original activity after call ends

Postby limteckchai » Tue Aug 24, 2010 4:53 am

voidptr wrote:I am using the following intent to start the dialer to make the call

Intent ii = new Intent(Intent.ACTION_CALL, Uri.parse("tel:" + number);
startActivity(ii);


Haha .. i am using the same method, so is it solved yet?? Anyone can share how to reutnr to the original activity after the call ends?? :roll:
limteckchai
Experienced Developer
Experienced Developer
 
Posts: 92
Joined: Mon Jun 28, 2010 3:33 am

Top

Return to Code Snippets for Android

Who is online

Users browsing this forum: No registered users and 3 guests