0

I have been loading an Android app onto a Z10, and noticed the code that worked on Android is not working properly on the BlackBerry. Specifically, the following variable

boolean isAirplaneMode = Settings.System.getInt(getContentResolver(), 
                Settings.System.AIRPLANE_MODE_ON,0) != 0;

is set to false even though the Airplane mode is enabled. Is there any way to query the airplane mode on a blackberry?

Michael Donohue
  • 11,776
  • 5
  • 31
  • 44
T Lam
  • 162
  • 5
  • Which BB10 version are you running? According to [comment in accepted answer](http://stackoverflow.com/questions/4319212/how-can-one-detect-airplane-mode-on-android) it has changed in Android 4.2 to Settings.Global. If you have 10.2 leak it won't work. It shouldn't work on android 4.2 either – Bojan Kogoj Aug 04 '13 at 10:11
  • I can't seem to get it work either, sorry. But it doesn't seem to be [unsupported](https://developer.blackberry.com/android/apisupport/unsupportedapi_blackberry10_app_permissions.html) – Bojan Kogoj Aug 04 '13 at 10:40
  • The app was targeted for API level 10, not JB (4.1+). The code should work as intended, but does not. – T Lam Aug 04 '13 at 16:06

1 Answers1

-1

Spoke with a BB developer, and it seems to be currently not possible to do that programmatically.

T Lam
  • 162
  • 5