Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,153,141 members, 7,818,432 topics. Date: Sunday, 05 May 2024 at 03:32 PM

Android Programmers: Problem In ACTION_CALL - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Android Programmers: Problem In ACTION_CALL (1589 Views)

Top Android Programmers On Nairaland And Their Works / Gradle Problem In Android Studio / Solution To Tokenmismatchexception Problem In Laravel 5.1 (2) (3) (4)

(1) (Reply) (Go Down)

Android Programmers: Problem In ACTION_CALL by chukstem: 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
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: 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
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: 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: 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
@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: 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
*555# is lame
try *123# good and better and put MTN logos in the background and your icon .

(1) (Reply)

How To Counter A Hack / 7 Ways To Earn Money As Java Developer / Dear Freelancer, Do You Used Nigeria As Your Location?

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 9
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.