Android Programmers: Problem In ACTION_CALL - Programming - Nairaland
Nairaland Forum › Science/Technology › Programming › Android Programmers: Problem In ACTION_CALL (1688 Views)
| Android Programmers: Problem In ACTION_CALL by chukstem(op): 4:41am On Dec 14, 2015 |
Plz i am new to android. I am having prob trying to initiate this as it removes the # from the string. It will only dial *556. try { String uri = "tel: *556#"; Intent intent = new Intent(Intent.ACTION_CALL, Uri.parse(uri)); startActivity(intent); } catch (Exception e) { Log.e("Exception", e.getMessage()); } all comments are welcomed |
| Re: Android Programmers: Problem In ACTION_CALL by Nobody: 6:37am On Dec 14, 2015*. Modified: 7:18am On Dec 14, 2015 |
private void call() { Intent phoneIntent = new Intent(Intent.ACTION_DIAL); phoneIntent.setData(Uri.parse("tel:05966667888" )); try{ startActivity(intent); } |
| Re: Android Programmers: Problem In ACTION_CALL by chukstem(op): 7:00am On Dec 14, 2015 |
D prob is dat it omites d # string |
| Re: Android Programmers: Problem In ACTION_CALL by Nobody: 7:30am On Dec 14, 2015*. Modified: 8:26am On Dec 14, 2015 |
private void call() { String encodedHarsh = "*" + "556" + Uri.encode("#" ); startActivity(new Intent ("android.intent.action.CALL", Uri.parse("tel:" + encodedHarsh))); } |
| Re: Android Programmers: Problem In ACTION_CALL by Nobody: 7:33am On Dec 14, 2015 |
It is because it is a USSD number |
| Re: Android Programmers: Problem In ACTION_CALL by chukstem(op): 8:18am On Dec 14, 2015 |
Still didnt work bro. |
| Re: Android Programmers: Problem In ACTION_CALL by Nobody: 8:24am On Dec 14, 2015 |
wat's the error |
| Re: Android Programmers: Problem In ACTION_CALL by chukstem(op): 9:30am On Dec 14, 2015 |
No error bro, just still omits d # |
| Re: Android Programmers: Problem In ACTION_CALL by Nobody: 9:46am On Dec 14, 2015 |
| Re: Android Programmers: Problem In ACTION_CALL by Nobody: 9:57am On Dec 14, 2015*. Modified: 10:49am On Dec 14, 2015 |
@Override public void onClick( ) { // TODO Auto- generated method stub String ussd = "*556*" + Uri.encode("#" ) ; startActivity(new Intent (Intent.ACTION_CALL, Uri.parse("tel:" + ussd))); |
| Re: Android Programmers: Problem In ACTION_CALL by chukstem(op): 10:52am On Dec 14, 2015 |
Finally works. thanks sir |
| Re: Android Programmers: Problem In ACTION_CALL by Nobody: 10:55am On Dec 14, 2015 |
u are welcome . |
| Re: Android Programmers: Problem In ACTION_CALL by Nobody: 5:47pm On Dec 15, 2015*. Modified: 1:33pm On Dec 16, 2015 |
*555# is lame try *123# good and better and put MTN logos in the background and your icon . |
Top Android Programmers On Nairaland And Their Works • Gradle Problem In Android Studio • Solution To Tokenmismatchexception Problem In Laravel 5.1 • 2 • 3 • 4
Learn Android App Development From These 7 Free Tutorial Websites • I Need A Developer Who Can Integrate Paypal & Bitcoin Api On A Donation Website • Hello Programmers In The House