I'm trying to develop a new AI2 extension making use of "Android Beacon Library" but I have problems starting the "beacon service": it doesn't start at all, in fact the callback method "onBeaconServiceConnect" is never invoked.
A possible cause of that is described in a forum where I found the following explanations:
"A failure to receive a callback to onBeaconServiceConnect
is usually caused by an incorrect AndroidManifest.xml
setup to declare the BeaconService
. The library uses manifest merging to automatically merge these definitions into your app's AndroidManifest.xml
from the library's AndroidManifest.xml
at compile time. If manifest merging is not enabled, the service will never be declared and the app will not get the onBeaconServiceConnect
callback."
"Just solved the problem by adding services declaration to manifest...
Adding following helps:
<service android:enabled="true"
android:exported="true"
android:isolatedProcess="false"
android:label="beacon"
android:name="org.altbeacon.beacon.service.BeaconService">
</service>
<service android:enabled="true"
android:name="org.altbeacon.beacon.BeaconIntentProcessor">
</service>"
How can I manage to get such manifest modification through my Java code and/or some directive to insert in the appinventor environment I'm using for developing custom extensions ?
Thank you