Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

Android 5.0 Build API 21 Service Intent must be explicit crash

RankRankRankRank

Total Posts: 122

Joined 2010-10-25

PM

I have received some crash reports from nexus 5.0 devices after the update to Android 5.0 and releasing code compiled against the latest API 21.

Caused by: java.lang.IllegalArgumentException: Service Intent must be explicit: Intent { act=com.dsi.ant.bind.AntService }
at android.app.ContextImpl.validateServiceIntent(ContextImpl.java:1674)
at android.app.ContextImpl.bindServiceCommon(ContextImpl.java:1773)
at android.app.ContextImpl.bindService(ContextImpl.java:1751)
at android.content.ContextWrapper.bindService(ContextWrapper.java:538)
at com.dsi.ant.a.a(SourceFile:200)

This is doing AntService.bindService(mContext, mAntRadioServiceConnection);

With earlier builds it's just a warning but Google have changed it to an exception with API 21 builds hence the crash. I will look at moving back an API version although that of course is not a long term solution.

I am not sure if the user has the ANT+ enabler app or some sort of Usb Host mode setup.      
RankRankRankRank

Total Posts: 313

Joined 2011-09-12

PM

Thanks ifor for the heads up. This is something we have found in internal testing too, and will be releasing a fix for it in the new version of the radio service next month. For now, unfortunately the only option is to compile to API lower than 21. We will post beta releases soon so everybody can test the fix.      

Signature

Dynastream Developer

RankRankRankRank

Total Posts: 313

Joined 2011-09-12

PM

For anyone visiting this thread, the SDK which supports Android 5.0 is now up on GitHub: https://github.com/ant-wireless/ANT-Android-SDKs/tree/master/ANT+_Android_SDK      

Signature

Dynastream Developer