UnsuportedOperationException in getApplicationInfo

Former Member
Former Member
When running sample comm application from Android BLE both on Android Device and Android Simulator and changing ConnectionIQ type to TETHERED I am able to see watch simulator on my device and see status as connected, However when i click on SIMULATOR in MainActivity PhoneApplication crashes in call to getApplicationInfo:

java.lang.RuntimeException: Unable to resume activity {com.garmin.android.apps.connectiq.sample.comm/com.garmin.android.apps.connectiq.sample.comm.DeviceActivity}: java.lang.UnsupportedOperationException
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2989)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3020)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2395)
at android.app.ActivityThread.access$800(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5257)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
Caused by: java.lang.UnsupportedOperationException
at com.garmin.android.connectiq.ConnectIQ.getApplicationInfo(ConnectIQ.java:796)

at com.garmin.android.apps.connectiq.sample.comm.DeviceActivity.onResume(DeviceActivity.java:87)
at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1257)
at android.app.Activity.performResume(Activity.java:6076)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2978)
************at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3020)
************at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2395)
************at android.app.ActivityThread.access$800(ActivityThread.java:151)
************at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
************at android.os.Handler.dispatchMessage(Handler.java:102)
************at android.os.Looper.loop(Looper.java:135)
************at android.app.ActivityThread.main(ActivityThread.java:5257)
************at java.lang.reflect.Method.invoke(Native Method)
************at java.lang.reflect.Method.invoke(Method.java:372)
************at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
************at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)

Any clues how could i fix the problem?
  • Former Member
    Former Member over 10 years ago
    Sample from ADB sdk is working for me. Does this means that I need to use different jar files building for watch simulator and real watch? And APIs also differs.
  • Former Member
    Former Member over 10 years ago
    You will need to use the Android ADB SDK if you want to use ADB to communicate with the simulator and the Android BLE SDK if you want to communicate with an actual watch using BLE. Both of these can be downloaded from this page.

    While both the ADB and BLE SDKs have options for tethered and wireless there are known issues with using tethered (ADB) in the BLE SDK and wireless (BLE) in the ADB SDK which is why they're distributed separately. In the future a single Android SDK will be available with both tethered (ADB) and wireless (BLE) communication support.
  • Former Member
    Former Member over 10 years ago
    ok,
    Thanks