I tried to add the incoming number, just like it works for outgoing calls. The result is that it crashes as before. Can't find a matching Activity for this Intent, basically.
// Intent doesn't match anything - crashes Uri parsedPhoneNumber = Uri.parse("tel:" + incomingNumber); Intent myIntent = new Intent(Intent.ACTION_ANSWER, parsedPhoneNumber); myIntent.setFlags( // Intent.FLAG_ACTIVITY_SINGLE_TOP | // Intent.FLAG_DEBUG_LOG_RESOLUTION | // Intent.FLAG_ACTIVITY_CLEAR_TOP | // Intent.FLAG_ACTIVITY_NEW_TASK | // will crash without this Intent.FLAG_FROM_BACKGROUND // ).addCategory(Intent.CATEGORY_DEFAULT); On Dec 10, 6:03 pm, "Xavier Mathews" <xavieruni...@gmail.com> wrote: > You would think that ACTION _ ANSWER would work. Why does it keep ringing? > > On 12/10/2008, dreamerBoy <paul.hube...@gmail.com> wrote: > > > > > > > Of course, now, ACTION_ANSWER Activity doesn't do anything. It > > doesn't pick up the phone. The phone state is still RINGING - sigh... > > > Any thoughts are appreciated. > > > On Dec 10, 3:53 pm, dreamerBoy <paul.hube...@gmail.com> wrote: > >> I did an upgrade to SDK r2 but it appears to be a Manifest file > >> problem: > > >> <intent-filter> > >> <action > >> android:name="android.intent.action.ANSWER" /> > >> <category > >> android:name="android.intent.category.DEFAULT" /> > >> </intent-filter> > > >> appears to fix the crash. > > >> On Dec 9, 6:04 pm, dreamerBoy <paul.hube...@gmail.com> wrote: > > >> > 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); > >> > ftaContext.startActivity(myIntent); > >> > } > >> > catch (Exception e) > >> > { > >> > cleanup(); > >> > return; > >> > } > > >> > This is called from an ordinary ("raw") thread. I simulate an > >> > incoming call with: > > >> > > telnet localhost 5554 > >> > > gsm call 1234567 > > >> > result: > > >> > 12-09 17:50:26.731: VERBOSE/IntentResolver(52): Resolving type null > >> > scheme null of intent Intent { action=android.intent.action.ANSWER > >> > flags=0x3000000c } > >> > 12-09 17:50:26.731: VERBOSE/IntentResolver(52): Action list: > >> > [ActivityIntentInfo{433df190 com.android.phone.InCallScreen}] > >> > 12-09 17:50:26.731: VERBOSE/IntentResolver(52): Matching against > >> > filter ActivityIntentInfo{433df190 com.android.phone.InCallScreen} > >> > 12-09 17:50:26.731: VERBOSE/IntentResolver(52): Filter matched! > >> > match=0x108000 > >> > 12-09 17:50:26.731: WARN/IntentResolver(52): resolveIntent failed: > >> > found match, but none with Intent.CATEGORY_DEFAULT > >> > 12-09 17:50:26.731: VERBOSE/IntentResolver(52): Final result list: > >> > 12-09 17:50:26.731: INFO/ActivityManager(52): Starting activity: > >> > Intent { action=android.intent.action.ANSWER flags=0x3000000c } > >> > 12-09 17:50:26.741: ERROR/FTAvoiceCmdMt_call_setup3(32178): error > >> > answering call > >> > 12-09 17:50:26.741: ERROR/FTAvoiceCmdMt_call_setup3(32178): > >> > android.app.Instrumentation.checkStartActivityResult > >> > (Instrumentation.java:1472) > >> > 12-09 17:50:26.741: ERROR/FTAvoiceCmdMt_call_setup3(32178): > >> > android.app.Instrumentation.execStartActivity(Instrumentation.java: > >> > 1442) > >> > 12-09 17:50:26.741: ERROR/FTAvoiceCmdMt_call_setup3(32178): > >> > android.app.ApplicationContext.startActivity(ApplicationContext.java: > >> > 596) > >> > 12-09 17:50:26.741: ERROR/FTAvoiceCmdMt_call_setup3(32178): > >> > android.content.ContextWrapper.startActivity(ContextWrapper.java:236) > >> > 12-09 17:50:26.741: ERROR/FTAvoiceCmdMt_call_setup3(32178): > >> > cta.fta.fta_voice.FTAvoiceCmdMt_call_setup.waitForResult > >> > (FTAvoiceCmdMt_call_setup.java:610) > >> > 12-09 17:50:26.741: ERROR/FTAvoiceCmdMt_call_setup3(32178): > >> > cta.fta.fta_voice.FTAvoiceCmdMt_call_setup.access$2 > >> > (FTAvoiceCmdMt_call_setup.java:508) > >> > 12-09 17:50:26.741: ERROR/FTAvoiceCmdMt_call_setup3(32178): > >> > cta.fta.fta_voice.FTAvoiceCmdMt_call_setup$1.run > >> > (FTAvoiceCmdMt_call_setup.java:496) > >> > 12-09 17:50:26.741: ERROR/FTAvoiceCmdMt_call_setup3(32178): > >> > java.lang.Thread.run(Thread.java:935) > > >> > Can anyone see what I'm doing wrong? > > >> > Thanks so much. > > >> > dreamer > > -- > Xavier A. Mathews > Student/Browser Specialist/Developer/Web-Master > Google Group Client Based Tech Support Specialist > Hazel Crest Illinois > xavieruni...@gmail.com¥xavieruni...@hotmail.com¥truestar...@yahoo.com > "Fear of a name, only increases fear of the thing itself." --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---