I was told to suggested to import the ITelephony.aidl file from the
kernel and invoke the call() (or  answerRingingCall() directly - which
is not elegant but seems to be an option.

The problem I have trying this is to get a pointer to telephony
service form my activity:

ITelephony sPhone = ITelephony.Stub.asInterface
(ServiceManager.checkService("phone"));
ITelephony phoneServ = getPhoneInterface();

This code does not work betcause the ServiceManager is not exposed by
the SDK so I don't know how to bind the aidl interface of ITelephony I
imported from the kernel.



On Jul 29, 12:20 am, Ola <stens...@gmail.com> wrote:
> > So my question is: does anyone know how I could programmatically exit
> > the call log activity as ways to be able to submit another ACTION_CALL
> > intent ?
>
> I am also interested in this same thing. I would like to
> programmatically exit the DialtactsActivity from my service and return
> to the home screen.
>
> BR,
> //Ola
>
> On Jul 26, 3:45 pm,flohier<floh...@gmail.com> wrote:
>
>
>
> > Dear All,
>
> > I wrote an app that places an outgoing call via the ACTION_CALL
> > intent.
>
> > After the call is placed, the dialer enters the call log window and at
> > that point, my application cannot re-submit an outgoing call without
> > having the user exit the call log activity.
>
> > From the kernel source, InCallScreen.java shows implements the
> > delayedCleanupAfterDisconnect() method where one can read:
>
> >        .....
>
> >                 // If this is a call that was initiated by the user,
> > and
> >                 // we're *not* in emergency mode, finish the call by
> >                 // taking the user to the Call Log.
> >                 // Otherwise we simply call finish(), which will take
> > us
> >                 // back to wherever we came from.
> >                 if (mShowCallLogAfterDisconnect && !
> > isPhoneStateRestricted()) {
> >                     if (VDBG) log("- Show Call Log after
> > disconnect...");
> >                     final Intent intent = PhoneApp.createCallLogIntent
> > ();
> >                     startActivity(intent);
> >                     // Even in this case we still call finish()
> > (below),
> >                     // to make sure we don't stay in the activity
> > history.
> >                 }
>
> >                 finish();
>
> > The mShowCallLogAfterDisconnect is a boolean also in InCallScreen.java
> > that reads:
>
> >     // Flag indicating whether or not we should bring up the Call Log
> > when
> >     // exiting the in-call UI due to the Phone becoming idle.  (This
> > is
> >     // true if the most recently disconnected Call was initiated by
> > the
> >     // user, or false if it was an incoming call.)
> >     // This flag is used by delayedCleanupAfterDisconnect(), and is
> > set by
> >     // onDisconnect() (which is the only place that either posts a
> >     // DELAYED_CLEANUP_AFTER_DISCONNECT event *or* calls
> >     // delayedCleanupAfterDisconnect() directly.)
> >     private boolean mShowCallLogAfterDisconnect;
>
> > If I trust the comment properly, the dialer will enter the call log
> > activity unless we had an incoming call triggering InCallScreen. I
> > presume that by "call was initiaited by the user" also means other
> > activity invoking ACTION_CALL.
>
> > So my question is: does anyone know how I could programmatically exit
> > the call log activity as ways to be able to submit another ACTION_CALL
> > intent ?
>
> > Thanks for any pointers or suggestions here.- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to