New extension for discovering BLE Beacons

220 views
Skip to first unread message

Piero Della Romanesca

unread,
Nov 13, 2019, 1:47:39 PM11/13/19
to MIT App Inventor Forum
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

Taifun

unread,
Nov 13, 2019, 2:45:19 PM11/13/19
to MIT App Inventor Forum
please ask in the open source community here https://community.appinventor.mit.edu/c/open-source-development
Taifun

Trying to push the limits of App Inventor! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun. 

Reply all
Reply to author
Forward
0 new messages