GitHub Sample: Disc Golf IQ

Former Member
Former Member
We finally got everything setup on GitHub so we could push our disc golf sample app. The companion app allows you to create a disc golf course and send it to your watch. Then using the Connect IQ app you can score a round and send it back to your phone. Instead of going into full details here I'll just point you to the relevant webpages.

Blog post
Connect IQ App Store
Google Play Store
GitHub repository

We encourage any developers to take a look through the code on GitHub. If there are pieces you'd like to pull down and use you're welcome to so long as you follow the Apache license. If you've got improvements you'd like to contribute we'd love to see some pull requests created (any iOS developers out there? ;)).

One thing I'd like to note: The reason this is posted to the general Connect IQ forum instead of the showcase is that the whole point of the exercise is to get better content in the hands of our developers. We did submit both the Connect IQ and Android app to their respective stores but that was just to make it easier for developers to download and play around with them.
  • Great!
    Thank you a lot :)
    I´ll take a deeper look into the code, to see how you are handling the different views. And I´m sure, I´ll get some hints how to use Monkey C properly!
    (As a .Net, Arduino & ERP developer it has not been clear all the time, how to get things done right on MonkeyC)
  • Former Member
    Former Member over 10 years ago
    Thank you very much for this example. A lot to learn from. Given the somewhat limited depth of the SDK documentation, this is highly welcome!

    I have several questions:

    1) Why disc golf and what is the difference to conventional golf?

    2) Where is the iOS counterpart App?

    3) Is it possible to use the same Smartphone App with more than one Connect IQ App? Or, more concrete, could I extend my Golf_SC app such that it works with your Smartphone counterpart?
  • Former Member
    Former Member over 10 years ago
    1) Why disc golf and what is the difference to conventional golf?

    I'd heard a few people mention they'd enjoy having a disc golf app here at Garmin. Seeing as how we already have great ways to score rounds of traditional golf this seemed like a great idea. Other than the obvious differences they're pretty similar. If you're interested in learning more about disc golf this webpage has some good info. If you're into the general "golf" idea you might also like footgolf ;).

    2) Where is the iOS counterpart App?

    There isn't one. Like I said before, the whole point of this exercise was to get more detailed examples into the hands of developers. It is by no means a complete, end-to-end product. The Android app itself can be loosely considered an "app". There's really almost no logic in it. We were more focused on the Connect IQ app than the companion app.

    3) Is it possible to use the same Smartphone App with more than one Connect IQ App? Or, more concrete, could I extend my Golf_SC app such that it works with your Smartphone counterpart?

    Technically you could. If you read up on the Comm stuff you'll see that messages are sent via the communications library using the app UUID. If you wanted an app to communicate with more than one Connect IQ app you would have to include a way to select the UUID to send messages to. You could take the companion app code on GitHub and change the UUID messages are sent to so it matches you app's UUID.
  • Former Member
    Former Member over 9 years ago
    fantastic !, I 'm discgolf player and I'm happy to find this apps... do you think it will be also available for iOS ?
  • Former Member
    Former Member over 9 years ago
    do you think it will be also available for iOS ?


    No. If a developer wants to write an iOS equivalent app which uses the Connect IQ app's code from GitHub they sure could. :)
  • Former Member
    Former Member over 8 years ago
    Android app crashed

    The anrdoid app crashed when I clicked 'Select a Device' button in 'Setup Players' page:

    10/25 15:37:47: Launching app
    $ adb push /Volumes/Data/projects/connectiq-apps/apps/disc-golf/disc-golf-android/app/build/outputs/apk/app-debug.apk /data/local/tmp/com.garmin.android.apps.samples.disgolf
    $ adb shell pm install -r "/data/local/tmp/com.garmin.android.apps.samples.disgolf"
    pkg: /data/local/tmp/com.garmin.android.apps.samples.disgolf
    Success


    $ adb shell am start -n "com.garmin.android.apps.samples.disgolf/com.garmin.android.apps.samples.disgolf.CourseSetupActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
    Client not ready yet..Waiting for process to come online
    Connected to process 7428 on device sony-d6603-BH909E0W1L
    I/art: Late-enabling -Xcheck:jni
    I/art: Debugger is no longer active
    W/System: ClassLoader referenced unknown path: /data/app/com.garmin.android.apps.samples.disgolf-2/lib/arm
    W/ResourceType: Found multiple library tables, ignoring...
    I/InstantRun: Instant Run Runtime started. Android package is com.garmin.android.apps.samples.disgolf, real application class is null.
    I/System.out: engineVerify
    W/System: ClassLoader referenced unknown path: /data/app/com.garmin.android.apps.samples.disgolf-2/lib/arm
    D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true
    I/Adreno-EGL: <qeglDrvAPI_eglInitialize:379>: EGL 1.4 QUALCOMM build: Nondeterministic_AU_msm8974_LA.BF.1.1.3_RB1__release_AU (I741a3d36ca)
    OpenGL ES Shader Compiler Version: E031.29.00.00
    Build Date: 04/04/16 Mon
    Local Branch: mybranch19053788
    Remote Branch: quic/LA.BF.1.1.3_rb1.12
    Local Patches: NONE
    Reconstruct Branch: NOTHING
    I/OpenGLRenderer: Initialized EGL, version 1.4
    I/Timeline: Timeline: Activity_idle id: android.os.BinderProxy@43f52d5 time:309092864
    W/IInputConnectionWrapper: beginBatchEdit on inactive InputConnection
    W/IInputConnectionWrapper: getSelectedText on inactive InputConnection
    W/IInputConnectionWrapper: endBatchEdit on inactive InputConnection
    W/IInputConnectionWrapper: getTextBeforeCursor on inactive InputConnection
    W/IInputConnectionWrapper: getTextAfterCursor on inactive InputConnection
    W/IInputConnectionWrapper: beginBatchEdit on inactive InputConnection
    W/IInputConnectionWrapper: getSelectedText on inactive InputConnection
    W/IInputConnectionWrapper: endBatchEdit on inactive InputConnection
    W/IInputConnectionWrapper: getTextBeforeCursor on inactive InputConnection
    W/IInputConnectionWrapper: getTextAfterCursor on inactive InputConnection
    W/IInputConnectionWrapper: beginBatchEdit on inactive InputConnection
    W/IInputConnectionWrapper: getSelectedText on inactive InputConnection
    W/IInputConnectionWrapper: endBatchEdit on inactive InputConnection
    W/IInputConnectionWrapper: getTextBeforeCursor on inactive InputConnection
    W/IInputConnectionWrapper: getTextAfterCursor on inactive InputConnection
    W/IInputConnectionWrapper: beginBatchEdit on inactive InputConnection
    W/IInputConnectionWrapper: getSelectedText on inactive InputConnection
    I/Timeline: Timeline: Activity_idle id: android.os.BinderProxy@43f52d5 time:309104039
    W/IInputConnectionWrapper: endBatchEdit on inactive InputConnection
    W/IInputConnectionWrapper: getTextBeforeCursor on inactive InputConnection
    W/IInputConnectionWrapper: getTextAfterCursor on inactive InputConnection
    I/Timeline: Timeline: Activity_idle id: android.os.BinderProxy@43f52d5 time:309104709
    W/IInputConnectionWrapper: beginBatchEdit on inactive InputConnection
    W/IInputConnectionWrapper: getSelectedText on inactive InputConnection
    W/IInputConnectionWrapper: endBatchEdit on inactive InputConnection
    W/IInputConnectionWrapper: getTextBeforeCursor on inactive InputConnection
    W/IInputConnectionWrapper: getTextAfterCursor on inactive InputConnection
    I/Timeline: Timeline: Activity_launch_request id:com.garmin.android.apps.samples.disgolf time:309127477
    I/Timeline: Timeline: Activity_idle id: android.os.BinderProxy@4e24d34 time:309127751
    I/Timeline: Timeline: Activity_launch_request id:com.garmin.android.apps.samples.disgolf time:309137499
    D/SendRoundToDeviceActivity: sdk is ready
    D/AndroidRuntime: Shutting down VM
    E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.garmin.android.apps.samples.disgolf, PID: 7428
    java.lang.NullPointerException: name == null
    at android.os.Parcel.readException(Parcel.java:1636)
    at android.os.Parcel.readException(Parcel.java:1579)
    at com.garmin.android.apps.connectmobile.connectiq.IConnectIQService$Stub$Proxy.registerApp(IConnectIQService.java:380)
    at com.garmin.android.connectiq.ConnectIQDeviceStrategy.registerForRemoteAppEvents(ConnectIQDeviceStrategy.java:297)
    at com.garmin.android.connectiq.ConnectIQ.registerForAppEvents(ConnectIQ.java:603)
    at com.garmin.android.apps.samples.disgolf.SendRoundToDeviceActivity.registerWithDevice(SendRoundToDeviceActivity.java:211)
    at com.garmin.android.apps.samples.disgolf.SendRoundToDeviceActivity.populateDeviceList(SendRoundToDeviceActivity.java:167)
    at com.garmin.android.apps.samples.disgolf.SendRoundToDeviceActivity.onSdkReady(SendRoundToDeviceActivity.java:366)
    at com.garmin.android.connectiq.ConnectIQDeviceStrategy$1.onServiceConnected(ConnectIQDeviceStrategy.java:44)
    at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:1227)
    at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1244)
    at android.os.Handler.handleCallback(Handler.java:739)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at android.os.Looper.loop(Looper.java:234)
    at android.app.ActivityThread.main(ActivityThread.java:5526)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
    at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:102)
    Application terminated.


    I am running Android 6.0.1 on Sony Z3 and have Garmin Connect Mobile installed.

    Any idea?
  • Any idea?

    Yes. I believe this thread may be helpful.
  • Former Member
    Former Member over 8 years ago
    Yes. I believe this thread may be helpful.


    Thank you, Travis! That looks like the exact issue I have.
    I am pretty new to this Garmin SDK thing. Thank you so much for the help!