CallFilter: How is it done?

Put your problem here if it does not fit any of the other categories.

CallFilter: How is it done?

Postby donny » Thu Dec 17, 2009 9:25 pm

Working with Telephony the last few days and have problem rejecting an incoming call. I can detect the phone ring using a intentfilter for "android.intent.action.PHONE_STATE" but I can't reject the call and not sure how to kill the incoming call screen or kill the ringer thread in com.android.phone

I know the issue has been brought up and shot down so many time saying it can't be done with the current framework. Some said you need a "rooted" phone so that you can access com.android.phone for the hangup function.

But I know there is a way to do it and it works on a HTC Hero running Android 1.5 because there is an existing free app called "Call Filter" that does exactly that
http://www.telemarks.co.jp/en/products/callfilter.htm

I realized 5 system permissions are needed
- android.permission.CALL_PHONE
- android.permission.READ_PHONE_STATE
- android.permission.READ_CONTACTS
- android.permission.RECEIVE_BOOT_COMPLETED
- android.permission.MODIFY_PHONE_STATE

android.permission.CALL_PHONE looks interesting, so I tried making a call as soon as the phone ring. Doesn't work, got an exception instead:

INFO/ActivityManager(578): Starting activity: Intent { action=android.intent.action.DIAL data=111 flags=0x10000000 }
ERROR/||-===ERROR===-||(733): No Activity found to handle Intent { action=android.intent.action.DIAL data=111 flags=0x10000000 }

Pulling my hairs out here. Anyone have any clue how it might work?
donny
Freshman
Freshman
 
Posts: 2
Joined: Thu Dec 17, 2009 6:48 pm

Top

Postby SteffenL » Sat Dec 19, 2009 8:23 pm

I tried that CallFilter program, but it did not even work for me (in the emulator).
Tried with Android 1.5, 1.6 [s]and 2.0[/s].
Simulated incoming phone calls but nothing happened.
Last edited by SteffenL on Tue Dec 22, 2009 7:58 pm, edited 2 times in total.
Regards,
Steffen
SteffenL
Junior Developer
Junior Developer
 
Posts: 23
Joined: Wed Dec 16, 2009 9:52 am

Postby donny » Tue Dec 22, 2009 7:46 pm

Good thinking SteffenL. I never tried running it on DDMS. I will try it out and see I can confirm SteffenL's finding. Hopefully it will give me more insight on how it works.
donny
Freshman
Freshman
 
Posts: 2
Joined: Thu Dec 17, 2009 6:48 pm

Postby SteffenL » Tue Dec 22, 2009 7:56 pm

You will not be able to access the Android market by default in the emulator, but there's a guide on getting it working here.
I currently don't have an android device, so this is a big help for me to see what's available and even try them, before getting one. :)
Actually, I don't think I tried with Android 2.0 after all, but I tried with 1.5 and 1.6 at least.
Maybe there's something different in there making the application not work?
Regards,
Steffen
SteffenL
Junior Developer
Junior Developer
 
Posts: 23
Joined: Wed Dec 16, 2009 9:52 am

So....?

Postby Kibi » Wed Jan 27, 2010 3:49 pm

Did anyone find a way of doing this?

I really just want to write an app for my own phone so if it requires some odd permission I'm fine with that...but I can't figure out how to hang up programmatically - there's definitely apps which do it...so what's the magic sauce?
--
Kibi
Quidquid latine dictum sit altum viditur
Kibi
Once Poster
Once Poster
 
Posts: 1
Joined: Wed Jan 27, 2010 3:43 pm
Location: Israel

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: Yahoo [Bot] and 13 guests