Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 10    Views: 67

jontonal
Android Fan
Profile
Posts: 12
Reg: Feb 18, 2012
Nottingham
4,720
08/07/13 08:06 AM (12 years ago)

Call Us

Hi I want to set up 'Call Us' so that it dials a number straight away without choosing which app to call with and missing out the step where it show the number and the user then has to press 'call'. Is there a way to change the code in Eclipse to make it a single click process? Thanks Jon
 
BandO
I hate code!
Profile
Posts: 153
Reg: Jan 23, 2012
Manhattan
1,530
like
08/07/13 05:47 PM (12 years ago)
I believe that built into the OS. The phone is not able to be accessed directly like on android. :(
 
jontonal
Android Fan
Profile
Posts: 12
Reg: Feb 18, 2012
Nottingham
4,720
like
08/08/13 01:54 AM (12 years ago)
Thanks - it's an Android app I'm working on. Just wondering if I can change the code in launchPhoneDialerWithScreenData and use an ACTION_CALL intent. Don't know that much about coding and not sure how to amend the AndroidManifest.xml permissions so that it uses the phone to dial. Any help would be much appreciated.
 
WolfTimJ
buzztouch Evangelist
Profile
Posts: 810
Reg: Feb 20, 2011
Rockwall, TX
17,400
like
08/08/13 01:16 PM (12 years ago)
I believe the new call us code does what you ask, much to my dismay. I wish it were back to the old way. What version u using?
 
jontonal
Android Fan
Profile
Posts: 12
Reg: Feb 18, 2012
Nottingham
4,720
like
08/08/13 01:28 PM (12 years ago)
Using 2.0. Seems to take a couple of clicks. First to choose app eg Skype or native dialler which I'd like to bypass and then it brings up the number before you click to call. Its an app about emergency and non emergency phone numbers in UK so want as few clicks as possible.
 
WolfTimJ
buzztouch Evangelist
Profile
Posts: 810
Reg: Feb 20, 2011
Rockwall, TX
17,400
like
08/08/13 01:34 PM (12 years ago)
Huh. Right up my alley. Self hosted? I can send you some code to change it I believe. Tim
 
jontonal
Android Fan
Profile
Posts: 12
Reg: Feb 18, 2012
Nottingham
4,720
like
08/08/13 01:44 PM (12 years ago)
Not yet. Only just got around to building some apps after coming to Buzztouch some time ago. Thanks for the offer. May well get a membership and go self hosted in the coming weeks as have lots of apps to build for work. Been googling for a solution and pretty sure I can fix in Eclipse. Just not experienced enough at the moment to do with confidence. Guess a few months practice and advice on these forums should do the trick.
 
WolfTimJ
buzztouch Evangelist
Profile
Posts: 810
Reg: Feb 20, 2011
Rockwall, TX
17,400
like
08/08/13 01:47 PM (12 years ago)
Lookup "intercepting menu taps" in the how to section. I believe you'll find your answer there. Tim
 
jontonal
Android Fan
Profile
Posts: 12
Reg: Feb 18, 2012
Nottingham
4,720
like
08/08/13 01:49 PM (12 years ago)
Thanks Tim. Will check that out and let you know how I get on.
 
jontonal
Android Fan
Profile
Posts: 12
Reg: Feb 18, 2012
Nottingham
4,720
like
08/09/13 03:46 AM (12 years ago)
Tim Looking through 'intercepting menu tap" but couldn't figure it out in that context. However, I've finally figured it out. Added 2 permissions to the AndroidManifest.xml: <uses-permission android:name="android.permission.CALL_PHONE" /> <uses-permission android:name="android.permission.READ_PHONE_STATE" /> Then in "launchPhoneDialerWithScreenData" uder the 'start phone call with screen data' comment I changed the intent from ACTION_VIEW to ACTION CALL' Then under the 'ask user for best app to use' - just changed that to 'parentActivity.startActivity(intent); - replacing the 'intent.createcChooser etc code. Seems to now work as required.
 
WolfTimJ
buzztouch Evangelist
Profile
Posts: 810
Reg: Feb 20, 2011
Rockwall, TX
17,400
like
08/09/13 05:12 AM (12 years ago)
Great!
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.