Comments (4)
You need not only foregroundServiceType=“location”
, but also a new pemission in manifest:
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_LOCATION" />
from android-beacon-library.
When targeting Android 14, every Foreground Service is required to specify a foregroundServiceType
in the manifest.
I agree that the library needs to be updated to add this specification. However, you can actually get around this problem by setting the foregroundServiceType
in your own manifest.
Try adding this within the <application>
block of your your AndroidManifest.xml
<service
android:name="org.altbeacon.beacon.service.BeaconService"
android:foregroundServiceType="location" />
Manifest entries our automatically merged so the result in the merged version would look something like this...
The lines that are unhighlighted are the lines we have in our main manifest and the lines that are highlighted are the lines merged from the manifest of a dependency.
This should solve your problem until the library is officially updated to support targeting Android 14. Hope it helps!
from android-beacon-library.
Thanks for this, @stephenruda. This is consistent with what I had planned to do to the library for Android 14 — essentially just adding that same foregroundServiceType=“location”
attribute to the library’s included manifest. My understanding is that this is the only change needed.
I hope to have this tested and in the library before Sept. 1, 2023 — I have been delayed testing Android 14 myself due to my eligible test phones being dedicated to other projects. But it is good to know your testing suggests this is a viable solution.
For anyone else waiting for official library support, please use Stephen’s solution above in the meantime.
from android-beacon-library.
Addressed in #1155
from android-beacon-library.
Related Issues (20)
- Gatt connections leak if app crashes HOT 6
- Upgrade from 2.19.5 to 2.19.6 - Error: Unsupported class file major version 61 HOT 1
- BLE Beacon scanning when app is killed HOT 1
- Stop detecting iBeacons when app is terminated after 30 minutes HOT 2
- RangedBeacon getFilter() HOT 13
- NPE crash in latest version (2.20.1) in StartupBroadcastReceiver HOT 1
- Range beacons when app is terminating HOT 7
- Beacons ranging not working on android 13 HOT 1
- App stops scanning right after screen is locked and starts giving the results right after unlocked HOT 1
- Android beacon library - multiple regions monitoring - unable remove regions HOT 2
- startForeground Exception when app is not in foreground HOT 3
- StartupBroadcastReceiver throws NullPointerException HOT 2
- No beacons after locked screen HOT 21
- Cannot parse iBeacons HOT 3
- BeaconService.startForegroundIfConfigured HOT 12
- TargetSdk 34 (android 14) Beacon foreground service no longer working due to new Google restriction HOT 1
- Do we have sample app to implement the library including the operation running in Background HOT 4
- Only a maximum of 2 beacons can be received at a time HOT 1
- java.io.FileNotFoundException android-distance.json HOT 3
- android-distance.json database not found
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from android-beacon-library.