Comments (9)
Well, that's understandable. Older versions don't have offloaded scanning, they have to run the service and even filter devices using CPU. I would even say, that for long lasting scanning the minimum Android version should be 8, where the option with Pending Intent was added. On older phones it is not possible to have all the features: background scanning, quick responses, filtering, and good battery lifetime.
from android-scanner-compat-library.
Hi @schlachtzeuger,
I am facing the same issue, even I have used pendingintent for background scan for a while but it scanning for around 30 mins. is there any way to scan continuously for hours and hours?
Thanks.
from android-scanner-compat-library.
I think the design is to prevent the battery from dying. You may have a Task in TaskManager that will start and stop scanning every now and then if you really need to.
from android-scanner-compat-library.
Yeah, what if I need to scan continuously? And how we can achieve it by library?
from android-scanner-compat-library.
The goal of the library is to mimic the behavior of the latest Android version on older phones. I'm rather thinking of focusing on saving battery for pre-Oreo phones, than on allowing long lasting continuous scan for newer.
from android-scanner-compat-library.
Thank you @philips77
from android-scanner-compat-library.
@ndrjt : After reading my request I'm not sure if I explained my issue comprehensible: My issue is not that it stops after some time but that it literally kills the battery on older Android versions.
from android-scanner-compat-library.
That's exactly why I was asking if we could throttle background scanning on pre-Oreo devices a bit. Thus we could have some sort of background scanning, maybe with a higher delay but without killing the battery.
from android-scanner-compat-library.
There is this method to trim scan and rest intervals:
I'm closing the issue due to inactivity. Sorry that it took me so long to reply.
from android-scanner-compat-library.
Related Issues (20)
- Is there a non AndroidX version? HOT 1
- If the app is repeatedly killed, the device cannot be scanned
- Filter does not update in run time (using Pending intent) HOT 1
- Cannot stop scan when using PendingIntent.FLAG_IMMUTABLE or PendingIntent.FLAG_MUTABLE HOT 1
- NoClassDefFoundError: Failed resolution HOT 4
- Scan occassionally returns no results until restarted HOT 3
- Attempt to invoke virtual method 'int java.lang.String.hashCode()' on a null object reference HOT 1
- Android 12 cannot scan out beacon devices HOT 2
- (Long Range (Bluetooth 5.2)) LE Coded PHY HOT 3
- setUseHardwareBatchingIfSupported HOT 4
- No scan results - Pixel 6a Android 13 HOT 3
- 广播名没有修改
- Failed to resolve BluetoothLeScannerCompat when used through a library
- Hit
- Leaked scan callback when app be killed by task manager
- Could not find no.nordicsemi.android:thingylib:2.0.0. HOT 2
- Hello, I may need your help
- Not discovering "Limited Discoverable" devices in Android
- BLE Scanner not working in Android 14
- An error occurred when quickly switching Bluetooth on and off and stopping scanning status. HOT 1
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-scanner-compat-library.