clariusdev / mobileapi

Android API Allowing IPC with the Clarius App
https://www.clarius.com
BSD 3-Clause "New" or "Revised" License
12 stars 4 forks source link

Example app fails to bind with Clarius App 8.5.1 #12

Closed daudrain closed 2 years ago

daudrain commented 2 years ago

One of our Android device has the beta channel version of Clarius App installed.

The example app is unable to connect anymore and outputs the following log:

2021-09-28 11:09:30.989 10622-10622/me.clarius.example E/MobileApiHelper: Cannot bind to 'me.clarius.mobileapi.MobileApiService'

The app still lists the services exposed by Clarius App:

2021-09-28 10:53:28.142 31039-31039/me.clarius.example D/Main: Package 'me.clarius.clarius' with service(s): me.clarius.mobileapi.MobileApiService, me.clarius.live.ScreenCapturerService,
julien-l commented 2 years ago

Hello, the beta version from Google Play uses the same package name as the non-beta so the default package name should be correct.

Ensure the Clarius app is running before attempting to bind, otherwise it will fail with a the "cannot bind" error message. In addition, look for the following errors in the Android console with logcat:

2021-09-28` 10:16:45.816 31496-31496/? E/MobileApi: Failed to execute native function. Is the Clarius App started? java.lang.UnsatisfiedLinkError: No implementation found for void me.clarius.mobileapi.MobileApiService.onServiceStarted(java.lang.Object) (tried Java_me_clarius_mobileapi_MobileApiService_onServiceStarted and Java_me_clarius_mobileapi_MobileApiService_onServiceStarted__Ljava_lang_Object_2)
2021-09-28 10:16:45.817 31496-31496/? E/MobileApi: Refusing binding because the Clarius App is not running

This indicates the app is not running (we fixed the crash occurring when attempting to bind while the app was not running).

daudrain commented 2 years ago

Looks like Clarius App 8.5.1 was not started when I tested yesterday, it works ok after starting Clarius App.

Sorry!

julien-l commented 2 years ago

It's alright I am glad it is working now!