code:

      try
      {
         // answer the phone
         Intent myIntent = new Intent(Intent.ACTION_ANSWER);
         myIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP //
               | Intent.FLAG_DEBUG_LOG_RESOLUTION //
               | Intent.FLAG_FROM_BACKGROUND //
               | Intent.FLAG_ACTIVITY_NEW_TASK).addCategory
(Intent.CATEGORY_DEFAULT);
         context.startActivity(myIntent);
      }
      catch (Exception e)
      {
         cleanup();
         return;
      }

// May need this intent-filter stanza as well
// <intent-filter>
// <action android:name="android.intent.action.ANSWER" />
// <category android:name="android.intent.category.DEFAULT" />
// </intent-filter>


This is called from an ordinary ("raw") thread.  I simulate an
incoming call with:



> telnet localhost 5554
> gsm call 1234567

Phone rings and rings but Answer Activity never picks up - phone state
never goes to OFF_HOOK.
--~--~---------~--~----~------------~-------~--~----~
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