This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

SimpleLink Starter APP Android Repository Failed to Compile

Hi, I'm downloading the source code of SimpleLink Starter APP to try to compile, make some changes, and install it on my phone.

I got my code from git clone git.ti.com/.../sensortag-20-android
However, I think this is an old version of the app with changes dating 4-6 years, SENSORTAG-SW Support software | TI.com

Initially, I had the gradle problem and I solved it

Now, when I try to build, I find this error. Can someone help me to understand what's the problem? It seems the error point to background service for BLE not allowed to run on intent service.
I think this issues is related to the version of the app which is very old. 
So, is it possible to get link to the newest repository that can be compiled? 

D/AndroidRuntime: Shutting down VM
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.ti.ble.sensortag, PID: 9306
java.lang.RuntimeException: Unable to create application com.example.ti.ble.sensortag.SensorTagApplicationClass: android.app.BackgroundServiceStartNotAllowedException: Not allowed to start service Intent { cmp=com.example.ti.ble.sensortag/com.example.ti.ble.common.BluetoothLeService }: app is in background uid UidRecord{9078396 u0a256 SVC idle change:idle|uncached procs:0 seq(0,0,0)}
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6733)
at android.app.ActivityThread.access$1500(ActivityThread.java:247)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2057)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7842)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
Caused by: android.app.BackgroundServiceStartNotAllowedException: Not allowed to start service Intent { cmp=com.example.ti.ble.sensortag/com.example.ti.ble.common.BluetoothLeService }: app is in background uid UidRecord{9078396 u0a256 SVC idle change:idle|uncached procs:0 seq(0,0,0)}
at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1861)
at android.app.ContextImpl.startService(ContextImpl.java:1817)
at android.content.ContextWrapper.startService(ContextWrapper.java:774)
at com.example.ti.ble.sensortag.SensorTagApplicationClass.startBluetoothLeService(SensorTagApplicationClass.java:174)
at com.example.ti.ble.sensortag.SensorTagApplicationClass.onCreate(SensorTagApplicationClass.java:118)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1211)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6728)
at android.app.ActivityThread.access$1500(ActivityThread.java:247) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2057) 
at android.os.Handler.dispatchMessage(Handler.java:106) 
at android.os.Looper.loopOnce(Looper.java:201) 
at android.os.Looper.loop(Looper.java:288) 
at android.app.ActivityThread.main(ActivityThread.java:7842) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003) 

Thanks and have a great day!

  • Hi Satria,

    I will attempt to loop in an expert to further assist with this issue.  Meanwhile, what Android dependencies are you using?  The SensorTag Android manifest.html mentions Android Package 5.01 and Paho MQTT Android 1.0.2 (understood that these dependencies are old/deprecated).

    Regards,
    Ryan

  • Hey Satria,

    Unfortunately, there is no planned update for the release mobile app source code. This code is meant to help customers get started and to use the source code as a reference. However, I don't have the expertise in developing mobile apps to assist in this area.

    I would recommend posting in a separate forum for help developing the mobile app further.

  • Hi Thanks for the answer
    Android 5 (Lollipop) is already very old (about 5-6 years ago) so I used the Android 9 (Pie) 
    As for Paho MQTT I just followed the stock code 

    We do want to use the source code as a reference, however if the code can't be compiled it's a bit harder on us to know which part to follow and what would the runtime execution looks like
    If this is the only repository and there's no newer code, where does the code that get published in App Store and iOS comes from? 
    Since I think the last update on this app was still updating up to 2 weeks ago Simplelink Starter - Apps on Google Play

  • Hey Satria,

    We are posting updates/bug fixes to the Simplelink Starter where necessary, but unfortunately are no longer providing the source code.