Start a phone call from Android application

/ Published in: Java
Save to your folder(s)

a 2-lines code to start a phone call from your Android application

Copy this code and paste it in your HTML
  1. try {
  2. Intent intent = new Intent(Intent.ACTION_CALL);
  3. intent.setData(Uri.parse("tel:+123456"));
  4. startActivity(intent);
  5. } catch (Exception e) {
  6. Log.e("SampleApp", "Failed to invoke call", e);
  7. }


Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.