0

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?

aynber
  • 22,380
  • 8
  • 50
  • 63
rishabh
  • 1,155
  • 1
  • 10
  • 17

1 Answers1

1

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.

Waynn Lue
  • 11,344
  • 8
  • 51
  • 76