₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,324,995 members, 8,419,852 topics. Date: Thursday, 04 June 2026 at 02:52 AM

Toggle theme

Android Programmers: Problem In ACTION_CALL - Programming - Nairaland

Nairaland ForumScience/TechnologyProgrammingAndroid Programmers: Problem In ACTION_CALL (1688 Views)

1 Reply (Go Down)

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:
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:
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:
@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:
*555# is lame
try *123# good and better and put MTN logos in the background and your icon .
1 Reply

Top Android Programmers On Nairaland And Their WorksGradle Problem In Android StudioSolution To Tokenmismatchexception Problem In Laravel 5.1234

Learn Android App Development From These 7 Free Tutorial WebsitesI Need A Developer Who Can Integrate Paypal & Bitcoin Api On A Donation WebsiteHello Programmers In The House