Ajout fonction appel téléphone radio
This commit is contained in:
@@ -3,8 +3,8 @@ package fr.svpro.radiomercure;
|
||||
import android.Manifest;
|
||||
import android.app.Dialog;
|
||||
import android.app.DownloadManager;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.res.Configuration;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
@@ -33,6 +33,7 @@ public class MainActivity extends AppCompatActivity {
|
||||
private TextView tv_close;
|
||||
private TextView tv_version;
|
||||
private static String versionName;
|
||||
private static final String NUMERO_TEL_RADIO = "0375411456";
|
||||
|
||||
static {
|
||||
versionName = BuildConfig.VERSION_NAME;
|
||||
@@ -156,6 +157,12 @@ public class MainActivity extends AppCompatActivity {
|
||||
dialog.show();
|
||||
return true;
|
||||
|
||||
case R.id.tel:
|
||||
Intent intent = new Intent(Intent.ACTION_DIAL);
|
||||
intent.setData(Uri.parse("tel:" + NUMERO_TEL_RADIO));
|
||||
startActivity(intent);
|
||||
return true;
|
||||
|
||||
default:
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user