Skip to content

Instantly share code, notes, and snippets.

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) {
<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