Such a question: There is a dialer in the application. Can an app from the play market (or from an apk-file) be delivered to a device that does not support calls? Or will it be set and fall at startup?

PS Is there a simulator in the studio that does not support calls, i.e. without sim card?

  • one
    Will fall. But you can check through the if condition for permission to do something else. Or from surfing the excpetion through try catch Ps emulator any tablet starting with Nexus 7. - Tvester

2 answers 2

Depends on the SDK version where it was launched and how it was built: https://developer.android.com/guide/topics/permissions/overview#dangerous-permission-prompt Starting from version 23, you need to dub additional calls or use AppCompat.

To emulate an incoming call on the emulator, you can do:

adb -s <serialno> shell am start -a android.intent.action.CALL -d tel:555-5555 
  • Sorry, your answer as always about something not. - George Chebotarev

I found a tablet without a sim card, I launched it and it really fell. I found this method, to check whether the device has hardware support for "calling" (presence of a sim card):

 private static boolean isCallingSupported(Context context) { boolean result = true; PackageManager manager = context.getPackageManager(); Intent intent = new Intent(Intent.ACTION_DIAL, Uri.parse("tel:12345678912")); List<ResolveInfo> infos = manager.queryIntentActivities(intent, 0); if (infos.size() <= 0) { result = false; } return result; } 

Not quite a clean method (due to string number), but working.