I am Using adb command to get the status of airlane_mode_on in appium using python. But its always returning 'True' even when it is off. Below is the code snippet.
def getGlobalSettingsOperation(self):
self.__log.info('AndroidDevice.getGlobalSettingsOperation() [{}]: Performing get operation on global setting "{}"'.format(self.name(), flag))
try:
status = self.__adb.shell(['settings', 'get', 'global', 'airplane_mode_on'])
self.__log.info('AndroidDevice.getGlobalSettingsOperation(): value of getGlobalSettingsOperation with flag [{}] is: "{}"'.format(flag, status))
return status
except:
self.__log.exception('AndroidDevice.getGlobalSettingsOperation() [{}]: exception'.format(self.name()))
return False
The value of status is always True. But the same command when i am using for put operation, it is working fine.I tried in many android devices. Kindly help.
Try to use it with appium client function:
where