getSettings() is not working

appium - 1.2.2
java-client - 1.7.0
android - 4.4.2
OS - Windows 7
below is the code

DesiredCapabilities capabilities = new DesiredCapabilities();

capabilities.setCapability(“appPackage”, “com.android.settings”);
capabilities.setCapability(“appActivity”, “.Settings”);

capabilities.setCapability(MobileCapabilityType.PLATFORM_NAME, “Android”);
capabilities.setCapability(MobileCapabilityType.PLATFORM_VERSION, “4.4.2”);
capabilities.setCapability(MobileCapabilityType.DEVICE_NAME, “Nexus 5”);

driver = new AppiumDriver(new URL(“http://0.0.0.0:4723/wd/hub”), capabilities);

System.out.println(driver.isLocked());
System.out.println(driver.getSettings());

it shows below error

org.openqa.selenium.UnsupportedCommandException: That URL did not map to a valid JSONWP resource
Command duration or timeout: 10 milliseconds
Build info: version: ‘2.42.2’, revision: ‘6a6995d’, time: ‘2014-06-03 17:42:03’
System info: host: ‘SYS0009’, ip: ‘169.254.247.45’, os.name: ‘Windows 7’, os.arch: ‘amd64’, os.version: ‘6.1’, java.version: ‘1.8.0_20’
Driver info: io.appium.java_client.AppiumDriver
Capabilities [{appPackage=com.android.settings, networkConnectionEnabled=true, warnings={}, databaseEnabled=false, deviceName=Nexus 5, platform=LINUX, appActivity=.Settings, desired={appPackage=com.android.settings, appActivity=.Settings, autoLaunch=false, platformVersion=4.4.2, platformName=Android, deviceName=Nexus 5}, autoLaunch=false, platformVersion=4.4.2, webStorageEnabled=false, locationContextEnabled=false, browserName=Android, takesScreenshot=true, javascriptEnabled=true, platformName=Android}]
Session ID: c5fc793f-0fed-4489-aebe-06d774f7d323
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:204)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:156)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:599)
at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:102)
at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:107)
at io.appium.java_client.AppiumDriver.getSettings(AppiumDriver.java:617)
at Napp.testCal(Napp.java:88)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

below are the logs

C:\Users\Raghuram>appium
info: Welcome to Appium v1.2.2 (REV cf6ff5939ddc6b4d45fcbabfbfe13c950e0058c4)
info: Appium REST http interface listener started on 0.0.0.0:4723
info: LogLevel: debug
info: --> POST /wd/hub/session {“desiredCapabilities”:{“appPackage”:“com.android
.settings”,“appActivity”:".Settings",“autoLaunch”:“false”,“platformVersion”:“4.4
.2”,“platformName”:“Android”,“deviceName”:“Nexus 5”}}
warn: Converting cap autoLaunch from string to boolean. This might cause unexpec
ted behavior.
info: [debug] Didn’t get app but did get Android package, will attempt to launch
it on the device
info: [debug] Creating new appium session c5fc793f-0fed-4489-aebe-06d774f7d323
info: [debug] Setting up Android for ‘autoLaunch: false’
info: [debug] Appium session started with sessionId c5fc793f-0fed-4489-aebe-06d7
74f7d323
info: <-- POST /wd/hub/session 303 9.823 ms - 9
info: --> GET /wd/hub/session/c5fc793f-0fed-4489-aebe-06d774f7d323 {}
info: [debug] Responding to client with success: {“status”:0,“value”:{“platform”
:“LINUX”,“browserName”:“Android”,“platformVersion”:“4.4.2”,“webStorageEnabled”:f
alse,“takesScreenshot”:true,“javascriptEnabled”:true,“databaseEnabled”:false,“ne
tworkConnectionEnabled”:true,“locationContextEnabled”:false,“warnings”:{},“desir
ed”:{“appPackage”:“com.android.settings”,“appActivity”:".Settings",“autoLaunch”:
false,“platformVersion”:“4.4.2”,“platformName”:“Android”,“deviceName”:“Nexus 5”}
,“appPackage”:“com.android.settings”,“appActivity”:".Settings",“autoLaunch”:fals
e,“platformName”:“Android”,“deviceName”:“Nexus 5”},“sessionId”:“c5fc793f-0fed-44
89-aebe-06d774f7d323”}
info: <-- GET /wd/hub/session/c5fc793f-0fed-4489-aebe-06d774f7d323 200 3.569 ms

  • 613 {“status”:0,“value”:{“platform”:“LINUX”,“browserName”:“Android”,“platformV
    ersion”:“4.4.2”,“webStorageEnabled”:false,“takesScreenshot”:true,“javascriptEnab
    led”:true,“databaseEnabled”:false,“networkConnectionEnabled”:true,“locationConte
    xtEnabled”:false,“warnings”:{},“desired”:{“appPackage”:“com.android.settings”,“a
    ppActivity”:".Settings",“autoLaunch”:false,“platformVersion”:“4.4.2”,“platformNa
    me”:“Android”,“deviceName”:“Nexus 5”},“appPackage”:“com.android.settings”,“appAc
    tivity”:".Settings",“autoLaunch”:false,“platformName”:“Android”,“deviceName”:“Ne
    xus 5”},“sessionId”:“c5fc793f-0fed-4489-aebe-06d774f7d323”}
    info: --> POST /wd/hub/session/c5fc793f-0fed-4489-aebe-06d774f7d323/appium/devic
    e/is_locked {}
    info: [debug] executing: adb shell “dumpsys window”
    info: [debug] Writing dumpsys output to C:\Users\Raghuram\AppData\Roaming\npm\no
    de_modules\appium.dumpsys.log
    info: [debug] Responding to client with success: {“status”:0,“value”:false,“sess
    ionId”:“c5fc793f-0fed-4489-aebe-06d774f7d323”}
    info: <-- POST /wd/hub/session/c5fc793f-0fed-4489-aebe-06d774f7d323/appium/devic
    e/is_locked 200 130.382 ms - 77 {“status”:0,“value”:false,“sessionId”:“c5fc793f-
    0fed-4489-aebe-06d774f7d323”}
    info: --> GET /wd/hub/session/c5fc793f-0fed-4489-aebe-06d774f7d323/appium/settin
    gs {}
    info: [debug] Responding to client that we did not find a valid resource
    info: <-- GET /wd/hub/session/c5fc793f-0fed-4489-aebe-06d774f7d323/appium/settin
    gs 404 4.840 ms - 47
    info: --> DELETE /wd/hub/session/c5fc793f-0fed-4489-aebe-06d774f7d323 {}
    info: Shutting down appium session
    info: [debug] Pressing the HOME button
    info: [debug] executing: adb shell “input keyevent 3”
    info: [debug] Cleaning up android objects
    info: [debug] Cleaning up appium session
    info: [debug] Responding to client with success: {“status”:0,“value”:null,“sessi
    onId”:“c5fc793f-0fed-4489-aebe-06d774f7d323”}
    info: <-- DELETE /wd/hub/session/c5fc793f-0fed-4489-aebe-06d774f7d323 200 629.35
    5 ms - 76 {“status”:0,“value”:null,“sessionId”:“c5fc793f-0fed-4489-aebe-06d774f7
    d323”}

I have the same problem ;( , but I m using dot net driver.