1
Intent intent = getPackageManager().getLaunchIntentForPackage("com.google.android.apps.tachyon");
intent.setData(Uri.parse("tel:" + "phonenumber"));
startActivity(intent);

I could not pass the data to 'Google duo' app in the same way

Is there a way?

JSON C11
  • 11,272
  • 7
  • 78
  • 65
HUJIN SHIN
  • 63
  • 6

1 Answers1

1

Try this

    Intent duo = new Intent("com.google.android.apps.tachyon.action.CALL");
    duo.setData(Uri.parse("tel: " + phoneNumber));
    duo.setPackage("com.google.android.apps.tachyon");
    startActivity(Intent.createChooser(duo, "Duo is not installed."));
Igor
  • 62
  • 1
  • 7
  • 1
    While this may solve the problem, to make this useful to other readers, include some explaination as to why this would solve the problem. – georgeawg Aug 07 '18 at 15:45