Skip to content

Commit c403d00

Browse files
committed
update documentation for recent changes
1 parent 5375690 commit c403d00

File tree

3 files changed

+33
-2
lines changed

3 files changed

+33
-2
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ open AltBeacons which fully support Android without any intellectual property re
1010
more information on how to migrate projects using the 0.x APIs to the 2.x APIs, see
1111
[API migration.](api-migrate.md)
1212

13-
**IMPORTANT: By default, this library will only detect beacons meeting the new AltBeacon specification.**
13+
**IMPORTANT: By default, this library will only detect beacons meeting the new AltBeacon specification.**
14+
15+
If you want this library to work with proprietary or custom beacons, see the [BeaconParser](http://altbeacon.github.io/android-beacon-library/javadoc/org/altbeacon/beacon/BeaconParser.html) class.
1416

1517
## What does this library do?
1618

api-migrate.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,29 @@ allows the library to work with multiple types of beacons.
7373
|int major = 1 |Identifier id2 = Identifier.parse("1")|
7474
|int minor = 1 |Identifier id3 = Identifier.parse("1")|
7575

76+
## Background Mode
77+
78+
The methods to set the background mode have been simplified, because the formerly "pro" library
79+
features have now been moved into the open source library. You can still use a method like below
80+
to directly set the background mode, but it is now global instead of specific to a BeaconConsumer.
81+
See the Pro Features section below for details on the preferred method of managing background mode.
82+
83+
|0.x |2.x |
84+
|:------------------------:|:------------------:|
85+
|iBeaconManager.setBackgroundMode(IBeaconConsumer c, boolean b)|beaconManager.setBackgroundMode(boolean b)|
86+
87+
## Pro Features
88+
89+
Features that were formerly part of the "pro" library are now included in the open source library.
90+
These include the ability to automatically set the background mode and the ability to launch your
91+
app automatically at phone startup, and the ability to restart it after being killed by the task
92+
switcher.
93+
94+
|0.x |2.x |
95+
|:------------------------:|:------------------:|
96+
|N/A (pro library)|org.altbeacon.powersave.BackgroundPowerSaver|
97+
|N/A (pro library)|org.altbeacon.startup.RegionBootstrap|
98+
7699

77100
## Ranging API 2.x code sample
78101

src/main/java/org/altbeacon/beacon/BeaconParser.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,13 @@ public BeaconParser() {
6060

6161
/**
6262
* <p>Defines a beacon field parsing algorithm based on a string designating the zero-indexed
63-
* offsets to bytes within a BLE advertisement. Three prefixes are allowed in the string</p>
63+
* offsets to bytes within a BLE advertisement.</p>
64+
*
65+
* <p>If you want to see examples of how other folks have set up BeaconParsers for different
66+
* kinds of beacons, try doing a Google search for "getBeaconParsers" (include the quotes in
67+
* the search.)</p>
68+
*
69+
* <p>Four prefixes are allowed in the string:</p>
6470
*
6571
* <pre>
6672
* m - matching byte sequence for this beacon type to parse (one allowed)

0 commit comments

Comments
 (0)