Actually, I think what I meant to ask was: how to I get the dialer to
go to a different activity once the user hangs up? I'm now using
ACTION_CALL rather than ACTION_DIAL and now the dialer immediately
gets started, but, it seems that once the dialer starts, the code
continues running as seen by text.setText("lolz"); immediately running
and then the dialer popping up.

                String num1 = "tel:3334444";
                Intent intent;
                intent = new Intent(Intent.ACTION_CALL, Uri.parse(num1));
                startActivityForResult(intent, 0);
                text.setText("Lolz");

Basically, I'm just wondering if there's any way to pause the
application, go into calling mode & once the user presses the hang up
button or the back button, hang up and display a different activity?

Thank you for your time.

-Sean Neilan


On Nov 9, 2:42 am, kapsicom <kapsy...@gmail.com> wrote:
> Hello,
>
> I'm trying to start thedialerand to continue my work after the call
> is ended.
> I'm doing this :
>
> protected void onResume() {
>     Intent call = new Intent(Intent.ACTION_DIAL);
>     startActivityForResult(call, 0 );}
>
> protected void onActivityResult(int requestCode, int resultCode,
> Intent data) {
> if ( requestCode == 0 ) {
> ...
>     }
>
> }
>
> But it doesn't work. The log says that "Activity is launching as a new
> task, so cancelling activityresult".
> Also, the doc for startActivityForResult states "that this method
> should only be used with Intent protocols that are defined to return aresult."
> So it seems that the ACTION_DIAL is not defined to return aresult...
> So how can I know if the user has made a call ? (Couldn't find a
> convenient CALL_STATE to listen either)

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

Reply via email to