Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,150,539 members, 7,808,991 topics. Date: Thursday, 25 April 2024 at 08:39 PM

ANDROID DEVELOPER. An SMS App That Sends Sms To A Specific Number - Software/Programmer Market - Nairaland

Nairaland Forum / Science/Technology / Programming / Software/Programmer Market / ANDROID DEVELOPER. An SMS App That Sends Sms To A Specific Number (1200 Views)

Professional Android Developer Needed / Are You Mobile Android Developer? Come In / Android Developer Needed (2) (3) (4)

(1) (Reply) (Go Down)

ANDROID DEVELOPER. An SMS App That Sends Sms To A Specific Number by beefsupreme: 5:24am On Feb 01, 2015
Hi,
please i need help with my creating an android app with a text field where users can enter phone number and a test and click send and the message is sent.
Re: ANDROID DEVELOPER. An SMS App That Sends Sms To A Specific Number by Urine: 7:50pm On Feb 01, 2015
beefsupreme:
Hi,
please i need help with my creating an android app with a text field where users can enter phone number and a test and click send and the message is sent.

Lol. I can create an app like that with a contact picker under 20 minutes. Google is your friend though.
Re: ANDROID DEVELOPER. An SMS App That Sends Sms To A Specific Number by MrFlexible(m): 10:46pm On Feb 01, 2015
Urine:

Lol. I can create an app like that with a contact picker under 20 minutes. Google is your friend though.



really, how??...please share.
Re: ANDROID DEVELOPER. An SMS App That Sends Sms To A Specific Number by Appguru(m): 12:57pm On Feb 02, 2015
@beefsupreme @mrflexible
I hope you have basic knowledge of android development.

1.) Add the permission to your manifest
<uses-permission android:name="android.permission.SEND_SMS" />

2.) Use this method to send sms

public void sendSMS (String tel, String message){

if (tel.trim().equalsIgnoreCase(""wink){
Toast.makeText(this, "Invalid telephone number!", Toast.LENGTH_SHORT).show();
}else{
Toast.makeText(this, "Sending ...", Toast.LENGTH_SHORT).show();
try {
SmsManager smsManager = SmsManager.getDefault();
smsManager.sendTextMessage(tel.trim, null, message, null, null);
Toast.makeText(this,"SMS Sent!", Toast.LENGTH_SHORT).show();
} catch (Exception e) {
Toast.makeText(this,"SMS not sent, please try again later!", Toast.LENGTH_SHORT).show();
e.printStackTrace();
}
}
}

//where tel=recipient number, message=message body

3.) You then register a click listener for a button on your UI, and send the sms on clicking.
- In you onCreate() method.

TextView tel_textbox = (TextView) findViewById(R.id.tel);
TextView msg_textbox = (TextView) findViewById(R.id.tel);

Button sendSms= (Button)findViewById(R.id.send_sms);
sendSms.setOnClickListener(new OnClickListener(){
@Override
public void onClick(View v) {

String tel = tel_textbox.getText().toString();
String message = msg_textbox.getText().toString();
sendSMS (tel, message);

}});
Re: ANDROID DEVELOPER. An SMS App That Sends Sms To A Specific Number by kunletoks(m): 8:54pm On Apr 29, 2015
Do you want it to send the sms using a bulk sms portal?

(1) (Reply)

Hotel Software / Mark A New Beginning With Ios App Development Services / Are You A .NET Guru Based In Cross-river State?

(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.