Closed RaviKoradiya closed 3 years ago
Does Logcat print anything useful? This happens when the https://developer.android.com/reference/android/content/Context#bindService(android.content.Intent,%20android.content.ServiceConnection,%20int) call returns false.
Anyway, if you want to program for Flic 2 buttons rather than Flic 1, you should use https://github.com/50ButtonsEach/flic2lib-android instead.
I required both flic and flic2 support. so implemented both libraries.
registerReceiver(FlicButtonBroadcastReceiver(), IntentFilter("io.flic.FLICLIB_EVENT"))
Is it ok if register broadcast like this?
and also have a query,
what will be appId
in FlicManager.setAppCredentials(
?
Please see https://github.com/50ButtonsEach/fliclib-android#integrate-flic under 1.
for your second question and 4
for your first question. You should register the receiver in the manifest if you want the Flic app to wake up (i.e. start) your app when the button is pressed, in case the system killed your app due to inactivity.
I have followed those steps, but for 1.
It says that appId will be generated from the developer portal, but can't find it there.
and I have added a receiver in the manifest, but still getting FlicAppNotInstalledException
. Please guide me.
Logcat seems ok, can't find any useful solution from it.
Just press the developer portal link and login. Then it will look like this:
Are you sure it's this Flic app you have installed, and not another app by mistake? https://play.google.com/store/apps/details?id=io.flic.app
You could also try this app https://play.google.com/store/apps/details?id=io.flic.apps.flappyflic to see if you get the same error message. It works on my phone at least.
Lastly you could also try another phone, if something is strange with the one you have.
I found the issue with the latest android version.
as I mentioned that my app is targeting API level 30. Android introduced Package visibility in Android 11.
and the flic app's visibility is not open. so any app targeting API level 30 and above will get FlicAppNotInstalledException
.
as a quick fix currently I am decreasing the target API version to 29 for my app. but in the future, it will not work.
Thanks for your time and quick support.
Also please change appId to key in the document so that any developer does not get confused.
If you add
<queries>
<package android:name="io.flic.app" />
</queries>
in your manifest and you target API 30, does it work then?
Yes, that works, thanks.
I am developing an app for my client, Implemented library and followed all steps given in the document. still throwing
FlicAppNotInstalledException
even though the flic app is already installed and added a couple of flics as well into the app,Please guide me.
the app is built for version android 30 so target and min SDK both versions are 30. Testing on API level 30 (Android 11).