I am planning to drop a call and I find this as one of workaround for that. How do I activate the airplane mode via code?
This way I will drop the call based on so
public static boolean getAirplaneMode(Context context) { try { int airplaneModeSetting = Settings.System.getInt(context.getContentResolver(), Settings.System.AIRPLANE_MODE_ON); return airplaneModeSetting==1?true:false; } catch (SettingNotFoundException e) { return false; } }