Hi Mark -

Yes, thank you for that - ~so~ much better.  Call starts, screen
changes.. ooh aah.

However, still some issues -

Right off, PhoneStateListener callback isn't being invoked for one.
Still analyzing the logCat...

Frustrating for me that the API is so coy about what is a Thread, what
is a Process etc.  I feel as though I need to know what I'm dealing
with.

I would like to at least attempt to call finish on the
OutgoingCallBroadcaster activity to see if it hangs up the call.  The
problem now is to try to get a reference to it if that is possible.
Looking at ActivityManager and RunningTaskInfo ...

Paul

On Nov 12, 12:00 pm, Mark Murphy <[EMAIL PROTECTED]> wrote:
> dreamerBoywrote:
> > Uri parsedPhoneNumber = Uri.parse("tel:1234567");
> > Intent myIntent = new Intent(Intent.ACTION_CALL, parsedPhoneNumber);
> > Activity myPhoneTestActivity = new Activity();
>
> Don't do that third line. I'm surprised it even works -- I guess
> Activity isn't an abstract superclass like I would have expected.
>
> > myPhoneTestActivity.startActivityForResult(myIntent,
> > CALL_SETUP_ACTIVITY_ID);  <== Crashes here, NullPointer
>
> Use your already-existing Activity, the one with the button.
>
> > Thus, the ACTION_CALL is now being launched as a sub-Activity.
> > The behavior of this code inside an Activity is the same as it is
> > inside a Service - it crashes at the same place with a
> > NullPointerException (null mInstrumentation).
>
> Correct. myPhoneTestActivity isn't created by the Android framework.
>
> It may be easier to think of Activity as being a plug-in to Android more
> so than a "program" in the traditional sense. Most plug-in frameworks
> don't give you fully-working plugins just by instantiating them.
> Instead, the plugins need to be wired into the overall system, code that
> frequently is done by whoever is launching the plugin itself, outside
> the bounds of the plugin's own constructors or callbacks.
>
> > I'm attempting to launch this new Activity with the ACTION_CALL Intent
> > and Android does not ~appear~ anyway, to know what to do with it.  If
> > that theory is true, then no wonder the Activity is crashing...
>
> I've only tried ACTION_DIAL recently.
>
> However, it seems to work for this person:
>
> http://www.androiddevelopment.org/2008/10/21/android-development-demo...
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
>
> Android Training on the Ranch! -- Mar 16-20, 
> 2009http://www.bignerdranch.com/schedule.shtml
--~--~---------~--~----~------------~-------~--~----~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to