Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Envoi d'un SMS sous Android
public class SendSmsActivity extends AppCompatActivity {
...
private void sendSms(String recipient, String message) {
try {
SmsManager smsManager = SmsManager.getDefault();
smsManager.sendTextMessage(recipient, null, message, null, null);
} catch (Exceptione e) {
e.printStackTrace();
}
}
...
<uses-permission android:name="android.permission.SEND_SMS" />
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.