Skip to content

Commit

Permalink
Added the Geofence intents while registering broadcastReceiver
Browse files Browse the repository at this point in the history
  • Loading branch information
bhashkarsharma committed Aug 1, 2015
1 parent f5e0a1a commit 99afaa0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,10 @@ Please refer to the API documentation on the [Beaconstac developer hub](https://
<action android:name="com.mobstac.beaconstac.intent.action.EXITED_BEACON" />
<action android:name="com.mobstac.beaconstac.intent.action.TRIGGERED_RULE" />
<action android:name="com.mobstac.beaconstac.intent.action.ENTERED_REGION" />
<action android:name="com.mobstac.beaconstac.intent.action.EXITED_REGION" /> </intent-filter>
<action android:name="com.mobstac.beaconstac.intent.action.EXITED_REGION" />
<action android:name="com.mobstac.beaconstac.intent.action.ENTERED_GEOFENCE" />
<action android:name="com.mobstac.beaconstac.intent.action.EXITED_GEOFENCE" />
</intent-filter>
</receiver>
11. Add `provider` to the manifest. Please implement your own ContentProvider that extends `com.mobstac.beaconstac.provider.MSContentProvider`. From the `BeaconstacExample` app:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ protected void onCreate(Bundle savedInstanceState) {

// set region parameters (UUID and unique region identifier)
Beaconstac.getInstance(this).
setRegionParams("B9407F30-F5F8-466E-AFF9-25556B57FE6D", //"F94DBB23-2266-7822-3782-57BEAC0952AC",
setRegionParams("F94DBB23-2266-7822-3782-57BEAC0952AC",
"com.mobstac.beaconstacexample");
// start MSBLEService
Executors.newSingleThreadExecutor().execute(new Runnable() {
Expand Down Expand Up @@ -162,6 +162,8 @@ private void registerBroadcast() {
intentFilter.addAction(MSConstants.BEACONSTAC_INTENT_RULE_TRIGGERED);
intentFilter.addAction(MSConstants.BEACONSTAC_INTENT_ENTERED_REGION);
intentFilter.addAction(MSConstants.BEACONSTAC_INTENT_EXITED_REGION);
intentFilter.addAction(MSConstants.BEACONSTAC_INTENT_ENTERED_GEOFENCE);
intentFilter.addAction(MSConstants.BEACONSTAC_INTENT_EXITED_GEOFENCE);
registerReceiver(myBroadcastReceiver, intentFilter);
registered = true;
}
Expand Down

0 comments on commit 99afaa0

Please sign in to comment.