android device capability detection

前端 未结 1 1119
眼角桃花
眼角桃花 2021-01-21 08:36

i\'m trying to determine if the device i\'m running on has the capability to send/receive phone calls, email, and SMS.

i found that i can use the TelephonyManager to ge

相关标签:
1条回答
  • 2021-01-21 09:13

    SMS is probably futile without a cell signal, so you can use your same trick for that.

    As for email (=networking), you can probably iterate through your devices in NetworkInterface.getNetworkInterfaces() and see if the device is connected. If you can connect to the internet, you can send emails.

    0 讨论(0)
提交回复
热议问题