Get device settings


i am want to find the device settings such as ringer level ,Wifi On/Off…

when i try to use the "Drvier.GetSettings() " i get an exception :

“Unable to cast object of type ‘System.Collections.Generic.Dictionary`2[System.String,System.Object]’ to type ‘System.String’.”

anyone know how to fix it Or maybe another way the get/set settings without the UI


I’m able to execute Driver.GetSettings (or driver.get_settings, as I’m using ruby), but all it tells me is:

On a previous project, we used “adb shell dumpsys audio” to get the ringer level, but that’s not implemented in appium yet (see You can create your own connection to the device through adb to obtain this information. Be warned: Different platforms represent the ringer volume level, and you will have to take some care during testing that you handle those different representations. I never found documentation on how each vendor represents the ringer volume, so we came up with a solution through testing and analysis (read: trial and error).

You can get the wifi state with this command:
% adb shell dumpsys wifi |grep mPersistWifiState
mPersistWifiState 0
(wifi is off)
mPersistWifiState 1
(wifi is on)