I'm using SL4A and running android scripts. .toggleAirplaneMode(True)
gives a null pointer exception.
Code:
import android
droid= android.Android()
droid.toggleAirplaneMode(True)
I have checked and found that flight mode for higher versions of Android 4.4 and above is moved to System.Settings.Global
and cannot be accessed.
Is there an alternative way to do enable/disable flight mode in python or using python script?