rishabh
rishabh

Reputation: 1165

MissingResourceException in Amazon Kindle due to Context.TELEPHONY_SERVICE

I'm getting a java.util.MissingResourceException due to the below code in Amazon Kindle Fire, which otherwise works perfectly fine ->

TelephonyManager tm = (TelephonyManager) cntx.getSystemService(Context.TELEPHONY_SERVICE);

Any insights please if I'm missing something, which can be rectified?

Upvotes: 0

Views: 40

Answers (1)

Waynn Lue
Waynn Lue

Reputation: 11375

The Kindle Fire is a tablet, so there isn't any available telephony service.

If you look at the documentation for getSystemService() it has this:

Returns

The service or null if the name does not exist.

Upvotes: 1

Related Questions