Some devices ie. Galaxy Tablet 10.1 can only send SMS, but cannot call. Some other devices like Asus Transformer don't even have SIM card.
How can I detect if device can makes calls? And how can I detect if device can send SMS?
Some devices ie. Galaxy Tablet 10.1 can only send SMS, but cannot call. Some other devices like Asus Transformer don't even have SIM card.
How can I detect if device can makes calls? And how can I detect if device can send SMS?
Here is what I make to check is SMS available.
which is taken from developer.android.com.
And create an Intent to check like this:
You can use the below method to check if sms feature is supported or not:
You can just wrap your code in try/catch. It works in all cases, even with the last api changes about sms sending.
Maybe you can query the PackageManager whether the system contains any component that can respond to ACTION_CALL and ACTION_SENDTO intents? You might need to add the "tel:" and "smsto:" scheme in the URI.
That should do it:
Using this technic you can test all sorts of things too e.g. compass, is location available