Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expedite Samsung Screen Off Detections #941

Merged
merged 3 commits into from
Jan 26, 2020

Conversation

davidgyoung
Copy link
Member

This change is designed to solve the problem reported in #936 where a Samsung Device will be slow do detect a beacon (it will take an extra full scan period) if the app is put to the background with the screen on, then subsequently the screen goes off.

This is caused by the fact that an empty scan filter is set up when the app is pushed to the background, then disallowed by Samsung once the screen goes off. The required non-empty screen off scan filter is not set up until the next scan cycle ends.

The solution is to start a BroadcastReceiver on Samsung devices for this case to look for screen off events before the next scan cycle starts. If a screen off is detected, switch immediately to a non-empty scan filter.

This is a work in progress as I have not yet tested it on a Samsung device.

… on Samsung to quicly switch to a non-empty scan filter if the screen goes off.
@atotalnoob
Copy link

Can I get a beta with this change and I can start testing?

@paulpv
Copy link
Contributor

paulpv commented Jan 4, 2020

@atotalnoob You'd probably have to clone or fork and test yourself.

One concern I have is that there is a difference between ACTION_SCREEN_OFF and the screen being locked, the latter which I have users complain devices are not scanned when their screen is locked but on (ex: plugged in charging).
Again, I am not currently using this library; just hoping to help y'all and perhaps me by talking this through.

You might need to test for both screen off || screen locked.

@paulpv
Copy link
Contributor

paulpv commented Jan 4, 2020

((KeyguardManager) context.getSystemService(Context.KEYGUARD_SERVICE)).isKeyguardLocked()

@davidgyoung
Copy link
Member Author

Thanks for the feedback about the locked screen, @paulpv. Indeed, I have not tested whether a screen that is locked but turned on currently prevents detections with this library. If it does, then the code that decides whether to use an empty scan filter or a non-empty scan filter may need to be augmented to check for isKeyguardLocked() as you suggest, and the broadcast receiver added in this PR might also have to be augmented somehow to listen for a different event associated with a screen lock vs. SCREEN_OFF. On first glance, I do not see any broadcast events specific to a lock vs. turning the screen off.

Any help testing this PR would be appreciated, @atotalnoob and @paulpv. I am on travel for the next few weeks and don't have access to a Samsung device. I will try testing on other Android devices with the Samsung check stubbed out to see that it doesn't break anything, but that won't help test it against Samsung, which is what it is designed to help.

I'm also a little worried about state/timing bugs with this change, so if initial testing goes well, I think it is a good idea to get this out in the wild bundled with apps as a beta release and look for any new crash reports caused by this change before merging this PR. I'll roll that beta release after I do my initial testing, and I can put it into a couple of apps I have in the Play Store. Any help doing the same would be appreciated.

@davidgyoung
Copy link
Member Author

Unfortunately, testing has uncovered a fundamental problem with this solution. On Android 8+ apps are not allowed to run for more than a few minutes in the background without a foreground service. If the user puts the app doing beacon scanning to the background, but keeps the screen on, then turns the screen off a bit later, the application will no longer be active to respond to the Broadcast event to change to a non-empty scan filter for the screen being off.

A different solution is necessary.

@paulpv
Copy link
Contributor

paulpv commented Jan 9, 2020

It shouldn't be required that this library provide that solution.
The app/library calling this library should provide the foreground service and required notification.
I do that in all of my apps and never expect that from a library. The notification needs to be custom/branded to the app and possibly change info/text based on state. By the time you add that flexibility in to this library the user will have found it simpler to just do it themselves.

@paulpv
Copy link
Contributor

paulpv commented Jan 9, 2020

Simplest example of creating a service I have come up with: https://github.com/paulpv/ForegroundServiceAPI26/blob/master/app/src/main/java/com/github/paulpv/foregroundserviceapi26/MainService.kt

No other logic needs to be in the service.
Some other headless logic class would exist to call this as necessary.

@stepheaw
Copy link

stepheaw commented Jan 9, 2020

Even with foreground service, I am seeing this issue with Samsung that it stops monitoring when the screen is off. I have not pulled down this branch however because I have yet to upgrade to AndroidX, so not sure if this will fix the problem

@paulpv
Copy link
Contributor

paulpv commented Jan 9, 2020

@stepheaw correct. Background scanning requires multiple things, one being a usable filter that appears to behave differently on Samsung (undefined if others), two being a foreground service, three being a PendingIntent scan, and perhaps others.

@paulpv
Copy link
Contributor

paulpv commented Jan 9, 2020

For the record, I have all three and an still unable to reliably scan in the background on many models, not just Samsung.
Again, I am not currently using this library, just hoping to help and learn.

@stepheaw
Copy link

stepheaw commented Jan 9, 2020

I have all three of these pretty sure but as soon as I click the screen off on Samsung it stops working. On the Pixel its working fine, On the OnePlus I needed to pin the app

@atotalnoob
Copy link

@paulpv I would advise you look into the capabilities of this library. If one provides a notification to it, it is able to launch scanning as a foreground service.

@paulpv
Copy link
Contributor

paulpv commented Jan 9, 2020

Thanks @atotalnoob, I was just going by @davidgyoung 's comments. If he intimates a concern that this library doesn't implement a foreground service, then I went with that.
If it actually does, then great!
I will revisit this library and brush up on its current capabilities.

@davidgyoung
Copy link
Member Author

On further thought, it is possible to do this, because the empty scan filter is only used during an active scan cycle when the application is guaranteed to be active, either via a foreground service or by running in the foreground. I have tested the results and found it to work as expected on a Google Pixels 3a with the Samsung manufacturer check stubbed.

I will put this into a beta test release.

@davidgyoung
Copy link
Member Author

@davidgyoung davidgyoung changed the title WIP: Expedite Samsung Screen Off Detections Expedite Samsung Screen Off Detections Jan 9, 2020
@atotalnoob
Copy link

atotalnoob commented Jan 9, 2020

I've been testing this beta for a few hours, works like a dream on my samsung T-380 and T-387.

There is a slight pause when the screen turns off, but I'd say it's probably <1 second and doesn't make much of a difference, anyway.

@davidgyoung Would you like some logs?

@paulpv
Copy link
Contributor

paulpv commented Jan 10, 2020

This may be unrelated to this PR, but my below comment is related to PendingIntent scans, which I think would be critical for successful prolonged background scanning.

In reviewing the code I am a little concerned about the usage of getScanCallbackIntent() in both ScanHelper's startAndroidOBackgroundScan and stopAndroidOBackgroundScan().

getScanCallbackIntent() is called independently in both methods.

                    int result = scanner.startScan(filters, settings, getScanCallbackIntent());
                   scanner.stopScan(getScanCallbackIntent());
    PendingIntent getScanCallbackIntent() {
        Intent intent = new Intent(mContext, StartupBroadcastReceiver.class);
        intent.putExtra("o-scan", true);
        return PendingIntent.getBroadcast(mContext,0, intent, PendingIntent.FLAG_UPDATE_CURRENT);
    }

getScanCallbackIntent() allocates a new instance each time it is called.
I would think that calling stopScan with a different PendingIntent instance than what was passed to startScan will result in the started scan not stopping (basically a no-op).

Furthermore, if your app was actively scanning when it is force-closed (via user-solicited, app-update, permission-change, and confirmed this even happens when stopping the process while paused in the debugger) then the started PendingIntent will never be re-createable and thus will never be able to be stopped; ie: orphaned/leaked.
When a matching scan comes in the OS will re-start the closed process and call onReceive and the app/library would need to handle that, perhaps unexpectedly.
Put a log line in your onReceive method, start a scan and then kill the process (simply stop it in the IDE) and you will see the OS start onReceive again.

When that re-started process wants to legitimately start a new scan, it will probably create a new PendingIntent instance that will also get onReceive, which can multiply the number of scan results.
There is a bit of convoluted logic required to handle this [admittedly edge, but it will happen] condition and make sure that the re-opened process can properly resume and handle unexpected scan results and start new scans.
Basically an app in this state that wants to start scanning needs to just let the stop ignoring the orphaned scan.

The only way to stop the incoming PendingIntents is to turn off Bluetooth and then back on.

This issue was a big deal for the Android-Scanner-Compat-Library to fix.
Feel free to peruse its code and see:
https://github.com/NordicSemiconductor/Android-Scanner-Compat-Library/blob/master/scanner/src/main/java/no/nordicsemi/android/support/v18/scanner/BluetoothLeScannerImplOreo.java
https://github.com/NordicSemiconductor/Android-Scanner-Compat-Library/blob/master/scanner/src/main/java/no/nordicsemi/android/support/v18/scanner/PendingIntentReceiver.java
The passed PendingIntent is wrapped by a "fixed" PendingIntent that is then evaluated for integrity in onReceive.
I think even this implementation may be susceptible to process termination.
I toyed with this a few months ago in an experimental library of mine (that used RxAndroidBle):
https://github.com/paulpv/AndroidBleTool/blob/master/app/src/main/java/com/github/paulpv/androidbletool/BleTool.kt#L990

This problem affects any caller of the PendingIntent version of startScan and stopScan, and is not limited to any specific library implementation(s).

@paulpv
Copy link
Contributor

paulpv commented Jan 10, 2020

Belay some of my concern. I was speaking from memory of many different tests/experiments, but testing raw Android OS calls I am not seeing it as bad as I stated above, but these still are areas to test w/ any implementation.

@stepheaw
Copy link

stepheaw commented Jan 13, 2020

Just to follow up on this, I've been testing the latest changes to this branch on a Samsung S9+. I've found that the broadcast receiver that was added is able to keep my app detecting beacons in the background (with foreground service). Amazing work, thank you so much!

@davidgyoung
Copy link
Member Author

@stepheaw, thank you for the feedback.

Can you please explain what symptoms you saw before with a foreground service but without this change? Did your app really stop detecting? Anything custom on your configuration like scan periods and such.

@stepheaw
Copy link

stepheaw commented Jan 13, 2020

@davidgyoung for a little bit of background, I am taking this library and generating a Xamarin binding library, so not sure how that affects things from the start. My use case for beacons is that I am turning on and off a piece of beacon hardware, and I want to wake up my app even if the app is force closed, and preform some action. Right now, I do not have any custom configuration regarding scan periods and I have setEnableScheduledScanJobs set to false. Although, I think I tried every variation I could to get this to work a few weeks ago.

On previous versions of this library, on a Samsung phone, my app would be monitoring beacons just fine with the app open - until I hit the power button. Once I hit the power button, the adb logs had absolutely no output with anything related to beacons at all. When I hit the power button again to wake the app up, then I start to get logs that things are happening.

I did not see this behavior on my pixel devices and was related to Samsung only.
After pulling the latest changes to this branch (the initial commit on this branch did not work), but the latest does) I do not see the issue anymore. When I hit the power button and screen goes off, I am still seeing logs from this library and I am able monitor for beacons with the screen off. In previous versions, there was no logs from this library at all with the screen off.

@davidgyoung
Copy link
Member Author

Thanks. @stepheaw. I think this makes sense. However I would expect that prior to this change you would eventually see logs again (maybe after 5 mins or so) after a full scan cycle completed with the screen off.

@stepheaw
Copy link

stepheaw commented Jan 13, 2020

@davidgyoung Maybe I was too impatient before to realize this - so I'm not sure. I haven't extensively gone though all the capabilities of this library until now, so I'm not as knowledgeable as some of the other folks on some of the nuances.

@atotalnoob
Copy link

@davidgyoung what still needs to be tested in order to get this merged?

@davidgyoung
Copy link
Member Author

I just released this beta into an app in the Google Play Store. I'd like to monitor the results over the next week or so to see if any new crashes reports pop up as a result of this change.

@davidgyoung davidgyoung merged commit 2cbd24f into master Jan 26, 2020
@davidgyoung
Copy link
Member Author

davidgyoung commented Jan 26, 2020

This is now in a 2.16.4 release.

I had the beta in a production app in the Play Store for a week and noticed no new crashes.

@paulpv
Copy link
Contributor

paulpv commented Jan 27, 2020

Hmmm...I am not seeing any devices scanned when I turn off my screen.
My full code is pushed to:
https://github.com/paulpv/android-beacon-library
https://github.com/paulpv/android-beacon-library-reference

When I turn off my screen the following is logged (issue highlighted w/ excessive ***** chars):

2020-01-27 15:26:48.358 28039-28039/org.altbeacon.beaconreference D/ViewRootImpl@9dff3ff[MonitoringActivity]: ViewPostIme pointer 0
2020-01-27 15:26:48.456 28039-28039/org.altbeacon.beaconreference D/ViewRootImpl@9dff3ff[MonitoringActivity]: ViewPostIme pointer 1
2020-01-27 15:26:48.476 28039-28039/org.altbeacon.beaconreference I/BeaconManager: Starting foreground beacon scanning service.
2020-01-27 15:26:48.528 28039-28039/org.altbeacon.beaconreference I/CycledLeScanner: Using Android O scanner
2020-01-27 15:26:48.783 28039-28039/org.altbeacon.beaconreference I/BeaconService: beaconService version unspecified is starting up on the main process
2020-01-27 15:26:48.791 28039-28039/org.altbeacon.beaconreference I/BeaconService: longScanForcingEnabled to keep scans going on Android N for > 30 minutes
2020-01-27 15:26:48.820 28039-28039/org.altbeacon.beaconreference W/ModelSpecificDistanceCalculator: Cannot find match for this device.  Using default
2020-01-27 15:26:48.820 28039-28039/org.altbeacon.beaconreference W/ModelSpecificDistanceCalculator: Cannot find match for this device.  Using default
2020-01-27 15:26:48.827 28039-28039/org.altbeacon.beaconreference I/BeaconService: starting with intent Intent { cmp=org.altbeacon.beaconreference/org.altbeacon.beacon.service.BeaconService }
2020-01-27 15:26:48.829 28039-28039/org.altbeacon.beaconreference I/BeaconService: starting with intent Intent { cmp=org.altbeacon.beaconreference/org.altbeacon.beacon.service.BeaconService }
2020-01-27 15:26:48.830 28039-28039/org.altbeacon.beaconreference I/BeaconService: binding
2020-01-27 15:26:48.853 28039-28039/org.altbeacon.beaconreference D/InputMethodManager: prepareNavigationBarInfo() DecorView@be28e3[MonitoringActivity]
2020-01-27 15:26:48.853 28039-28039/org.altbeacon.beaconreference D/InputMethodManager: getNavigationBarColor() -855310
2020-01-27 15:26:48.854 28039-28039/org.altbeacon.beaconreference V/InputMethodManager: Starting input: tba=org.altbeacon.beaconreference ic=com.android.internal.widget.EditableInputConnection@7cc24f4 mNaviBarColor -855310 mIsGetNaviBarColorSuccess true , NavVisible : true , NavTrans : false
2020-01-27 15:26:48.854 28039-28039/org.altbeacon.beaconreference D/InputMethodManager: startInputInner - Id : 0
2020-01-27 15:26:48.861 28039-28039/org.altbeacon.beaconreference I/InputMethodManager: startInputInner - mService.startInputOrWindowGainedFocus
2020-01-27 15:26:48.863 28039-28039/org.altbeacon.beaconreference D/InputTransport: Input channel constructed: fd=88
2020-01-27 15:26:48.863 28039-28039/org.altbeacon.beaconreference D/InputTransport: Input channel destroyed: fd=78
2020-01-27 15:26:48.940 28039-28039/org.altbeacon.beaconreference I/BeaconService: start monitoring received
2020-01-27 15:26:49.007 28039-28039/org.altbeacon.beaconreference D/BluetoothAdapter: STATE_ON
2020-01-27 15:26:49.008 28039-28106/org.altbeacon.beaconreference D/BluetoothAdapter: STATE_ON
2020-01-27 15:26:49.010 28039-28106/org.altbeacon.beaconreference D/BluetoothAdapter: STATE_ON
2020-01-27 15:26:49.011 28039-28106/org.altbeacon.beaconreference D/BluetoothAdapter: BLE support array set: 010011
2020-01-27 15:26:49.011 28039-28106/org.altbeacon.beaconreference D/BluetoothLeScanner: Start Scan with callback
2020-01-27 15:26:49.014 28039-28051/org.altbeacon.beaconreference D/BluetoothLeScanner: onScannerRegistered() - status=0 scannerId=22 mScannerId=0
2020-01-27 15:26:49.140 28039-28039/org.altbeacon.beaconreference E/BeaconReferenceApp: onNonBeaconLeScan: device=0E:06:E5:49:BD:B1, rssi=-94, scanRecord=05 09 46 4e 44 52 03 02 25 fa 08 ff 0e 06 e5 49 bd b1 01 05 09 46 4e 44 52 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
...
2020-01-27 15:26:50.448 28039-28039/org.altbeacon.beaconreference D/InputMethodManager: prepareNavigationBarInfo() DecorView@be28e3[MonitoringActivity]
2020-01-27 15:26:50.448 28039-28039/org.altbeacon.beaconreference D/InputMethodManager: getNavigationBarColor() -855310
2020-01-27 15:26:50.448 28039-28039/org.altbeacon.beaconreference V/InputMethodManager: Starting input: tba=org.altbeacon.beaconreference ic=com.android.internal.widget.EditableInputConnection@5bae443 mNaviBarColor -855310 mIsGetNaviBarColorSuccess true , NavVisible : true , NavTrans : false
2020-01-27 15:26:50.448 28039-28039/org.altbeacon.beaconreference D/InputMethodManager: startInputInner - Id : 0
2020-01-27 15:26:50.460 28039-28039/org.altbeacon.beaconreference I/InputMethodManager: startInputInner - mService.startInputOrWindowGainedFocus
2020-01-27 15:26:50.462 28039-28039/org.altbeacon.beaconreference D/InputTransport: Input channel constructed: fd=89
2020-01-27 15:26:50.462 28039-28039/org.altbeacon.beaconreference D/InputTransport: Input channel destroyed: fd=88
2020-01-27 15:26:50.463 28039-28039/org.altbeacon.beaconreference E/BeaconReferenceApp: onNonBeaconLeScan: device=57:86:C1:7D:EB:5E, rssi=-83, scanRecord=02 01 06 0a ff 4c 00 10 05 0b 1c f9 06 bf 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
...
2020-01-27 15:26:50.796 28039-28039/org.altbeacon.beaconreference I/BeaconService: set scan intervals received
2020-01-27 15:26:50.814 28039-28039/org.altbeacon.beaconreference I/CycledLeScanner: Adjusted scanStopTime to be 432789299
2020-01-27 15:26:50.816 28039-28039/org.altbeacon.beaconreference E/BeaconReferenceApp: onNonBeaconLeScan: device=0E:06:E5:F2:F9:B1, rssi=-94, scanRecord=05 09 46 4e 44 52 03 02 25 fa 08 ff 0e 06 e5 f2 f9 b1 01 05 09 46 4e 44 52 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
...
2020-01-27 15:26:50.827 28039-28039/org.altbeacon.beaconreference D/ViewRootImpl@9dff3ff[MonitoringActivity]: setWindowStopped(true) old=false
2020-01-27 15:26:50.855 28039-28039/org.altbeacon.beaconreference E/BeaconReferenceApp: onNonBeaconLeScan: device=1C:73:92:AD:75:7D, rssi=-80, scanRecord=1e ff 06 00 01 09 20 02 4c f1 d1 d4 8d 60 a9 9e 95 1b 13 9a 3e 60 10 94 da 58 78 b4 64 6e ab 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
...
2020-01-27 15:26:51.133 28039-28106/org.altbeacon.beaconreference D/BluetoothAdapter: STATE_ON

****************************************************************************************************************************************************************************
2020-01-27 15:26:55.678 28039-28039/org.altbeacon.beaconreference E/CycledLeScannerForLollipop: Scan failed: a BLE scan with the same settings is already started by the app
****************************************************************************************************************************************************************************

2020-01-27 15:26:55.705 28039-28039/org.altbeacon.beaconreference D/ViewRootImpl@9dff3ff[MonitoringActivity]: MSG_WINDOW_FOCUS_CHANGED 0 1
2020-01-27 15:26:55.706 28039-28039/org.altbeacon.beaconreference D/InputMethodManager: prepareNavigationBarInfo() DecorView@be28e3[MonitoringActivity]
2020-01-27 15:26:55.706 28039-28039/org.altbeacon.beaconreference D/InputMethodManager: getNavigationBarColor() -855310
2020-01-27 15:26:55.740 28039-28106/org.altbeacon.beaconreference D/BluetoothAdapter: STATE_ON
2020-01-27 15:26:55.741 28039-28106/org.altbeacon.beaconreference D/BluetoothLeScanner: Stop Scan with callback
2020-01-27 15:26:55.755 28039-28106/org.altbeacon.beaconreference D/BluetoothAdapter: STATE_ON
2020-01-27 15:26:55.760 28039-28106/org.altbeacon.beaconreference D/BluetoothAdapter: STATE_ON
2020-01-27 15:26:55.760 28039-28106/org.altbeacon.beaconreference D/BluetoothLeScanner: Start Scan with callback
2020-01-27 15:26:55.763 28039-28051/org.altbeacon.beaconreference D/BluetoothLeScanner: onScannerRegistered() - status=0 scannerId=22 mScannerId=0
2020-01-27 15:26:55.777 28039-28098/org.altbeacon.beaconreference D/OpenGLRenderer: eglDestroySurface = 0x71479fa100, 0x7158f01000
2020-01-27 15:26:55.809 28039-28039/org.altbeacon.beaconreference D/ViewRootImpl@9dff3ff[MonitoringActivity]: Relayout returned: old=[0,0][1080,2076] new=[0,0][1080,2076] result=0x5 surface={valid=false 0} changed=true
2020-01-27 15:26:58.042 28039-28106/org.altbeacon.beaconreference D/BluetoothAdapter: STATE_ON
2020-01-27 15:26:58.042 28039-28106/org.altbeacon.beaconreference D/BluetoothLeScanner: Stop Scan with callback
2020-01-27 15:26:58.063 28039-28106/org.altbeacon.beaconreference D/BluetoothAdapter: STATE_ON
2020-01-27 15:26:58.065 28039-28106/org.altbeacon.beaconreference D/BluetoothAdapter: STATE_ON
2020-01-27 15:26:58.066 28039-28106/org.altbeacon.beaconreference D/BluetoothLeScanner: Start Scan with callback
2020-01-27 15:26:58.069 28039-28123/org.altbeacon.beaconreference D/BluetoothLeScanner: onScannerRegistered() - status=0 scannerId=22 mScannerId=0
2020-01-27 15:27:04.868 28039-28106/org.altbeacon.beaconreference D/BluetoothAdapter: STATE_ON
2020-01-27 15:27:04.868 28039-28106/org.altbeacon.beaconreference D/BluetoothLeScanner: Stop Scan with callback
2020-01-27 15:27:04.876 28039-28106/org.altbeacon.beaconreference D/BluetoothAdapter: STATE_ON
2020-01-27 15:27:04.878 28039-28106/org.altbeacon.beaconreference D/BluetoothAdapter: STATE_ON
2020-01-27 15:27:04.878 28039-28106/org.altbeacon.beaconreference D/BluetoothLeScanner: Start Scan with callback
2020-01-27 15:27:04.881 28039-28123/org.altbeacon.beaconreference D/BluetoothLeScanner: onScannerRegistered() - status=0 scannerId=22 mScannerId=0
2020-01-27 15:27:04.895 28039-28039/org.altbeacon.beaconreference E/BeaconReferenceApp: onNonBeaconLeScan: device=0E:0E:A0:00:44:64, rssi=-88, scanRecord=02 01 04 1a ff 4c 00 02 15 d1 49 cb 95 f2 12 4a 20 8a 17 e3 a2 f5 08 c1 aa a0 00 44 64 bf 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
...
2020-01-27 15:27:05.865 28039-28039/org.altbeacon.beaconreference D/ViewRootImpl@9dff3ff[MonitoringActivity]: Relayout returned: old=[0,0][1080,2076] new=[0,0][1080,2076] result=0x1 surface={valid=false 0} changed=false
2020-01-27 15:27:05.867 28039-28039/org.altbeacon.beaconreference D/ViewRootImpl@9dff3ff[MonitoringActivity]: setWindowStopped(false) old=true
2020-01-27 15:27:05.873 28039-28039/org.altbeacon.beaconreference D/ViewRootImpl@9dff3ff[MonitoringActivity]: setWindowStopped(false) old=false
2020-01-27 15:27:05.892 28039-28039/org.altbeacon.beaconreference E/InputMethodManager: prepareNavigationBarInfo() rootView is null
2020-01-27 15:27:05.892 28039-28039/org.altbeacon.beaconreference V/InputMethodManager: Starting input: tba=org.altbeacon.beaconreference ic=com.android.internal.widget.EditableInputConnection@29d819f mNaviBarColor -855310 mIsGetNaviBarColorSuccess true , NavVisible : true , NavTrans : false
2020-01-27 15:27:05.893 28039-28039/org.altbeacon.beaconreference D/InputMethodManager: startInputInner - Id : 0
2020-01-27 15:27:05.909 28039-28039/org.altbeacon.beaconreference I/InputMethodManager: startInputInner - mService.startInputOrWindowGainedFocus
2020-01-27 15:27:05.912 28039-28039/org.altbeacon.beaconreference D/InputTransport: Input channel constructed: fd=80
2020-01-27 15:27:05.912 28039-28039/org.altbeacon.beaconreference D/InputTransport: Input channel destroyed: fd=89
2020-01-27 15:27:05.955 28039-28039/org.altbeacon.beaconreference E/BeaconReferenceApp: onNonBeaconLeScan: device=0E:06:E5:75:F0:AE, rssi=-72, scanRecord=05 09 46 4e 44 52 03 02 25 fa 08 ff 0e 06 e5 75 f0 ae 01 05 09 46 4e 44 52 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
...
2020-01-27 15:27:05.978 28039-28039/org.altbeacon.beaconreference D/ViewRootImpl@9dff3ff[MonitoringActivity]: Relayout returned: old=[0,0][1080,2076] new=[0,0][1080,2076] result=0x7 surface={valid=true 486823432192} changed=true
2020-01-27 15:27:05.983 28039-28098/org.altbeacon.beaconreference D/OpenGLRenderer: eglCreateWindowSurface = 0x71479fa100, 0x7158f01010
2020-01-27 15:27:05.989 28039-28039/org.altbeacon.beaconreference I/BeaconService: set scan intervals received
2020-01-27 15:27:06.000 28039-28039/org.altbeacon.beaconreference E/BeaconReferenceApp: onNonBeaconLeScan: device=0E:06:E5:D5:14:B1, rssi=-95, scanRecord=05 09 46 4e 44 52 03 02 25 fa 08 ff 0e 06 e5 d5 14 b1 01 05 09 46 4e 44 52 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
2020-01-27 15:27:06.000 28039-28106/org.altbeacon.beaconreference D/BluetoothAdapter: STATE_ON
2020-01-27 15:27:06.000 28039-28039/org.altbeacon.beaconreference E/BeaconReferenceApp: onNonBeaconLeScan: device=3C:71:BF:BF:AD:1E, rssi=-78, scanRecord=02 01 06 07 09 46 42 34 38 32 33 11 07 c1 06 ec f0 9a b4 43 b0 bc d6 28 25 10 02 b4 57 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
...
2020-01-27 15:27:06.006 28039-28039/org.altbeacon.beaconreference D/ViewRootImpl@9dff3ff[MonitoringActivity]: MSG_WINDOW_FOCUS_CHANGED 1 1
2020-01-27 15:27:06.006 28039-28039/org.altbeacon.beaconreference D/InputMethodManager: prepareNavigationBarInfo() DecorView@be28e3[MonitoringActivity]
2020-01-27 15:27:06.006 28039-28039/org.altbeacon.beaconreference D/InputMethodManager: getNavigationBarColor() -855310
2020-01-27 15:27:06.034 28039-28039/org.altbeacon.beaconreference D/InputMethodManager: prepareNavigationBarInfo() DecorView@be28e3[MonitoringActivity]
2020-01-27 15:27:06.034 28039-28039/org.altbeacon.beaconreference D/InputMethodManager: getNavigationBarColor() -855310
2020-01-27 15:27:06.034 28039-28039/org.altbeacon.beaconreference V/InputMethodManager: Starting input: tba=org.altbeacon.beaconreference ic=com.android.internal.widget.EditableInputConnection@3a631d8 mNaviBarColor -855310 mIsGetNaviBarColorSuccess true , NavVisible : true , NavTrans : false
2020-01-27 15:27:06.035 28039-28039/org.altbeacon.beaconreference D/InputMethodManager: startInputInner - Id : 0
2020-01-27 15:27:06.041 28039-28039/org.altbeacon.beaconreference I/InputMethodManager: startInputInner - mService.startInputOrWindowGainedFocus
2020-01-27 15:27:06.046 28039-28039/org.altbeacon.beaconreference D/InputTransport: Input channel constructed: fd=81
2020-01-27 15:27:06.047 28039-28039/org.altbeacon.beaconreference D/InputTransport: Input channel destroyed: fd=80
2020-01-27 15:27:06.047 28039-28039/org.altbeacon.beaconreference E/BeaconReferenceApp: onNonBeaconLeScan: device=3C:71:BF:BF:AD:1E, rssi=-78, scanRecord=02 01 06 07 09 46 42 34 38 32 33 11 07 c1 06 ec f0 9a b4 43 b0 bc d6 28 25 10 02 b4 57 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
...

****************************************************************************************************************************************************************************
2020-01-27 15:27:06.077 28039-28039/org.altbeacon.beaconreference E/CycledLeScannerForLollipop: Scan failed: a BLE scan with the same settings is already started by the app
****************************************************************************************************************************************************************************

2020-01-27 15:27:06.078 28039-28039/org.altbeacon.beaconreference E/BeaconReferenceApp: onNonBeaconLeScan: device=68:8F:91:8D:10:38, rssi=-72, scanRecord=02 01 06 0a ff 4c 00 10 05 01 1c 4c 91 a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
...

@AltBeacon AltBeacon deleted a comment from paulpv Jan 28, 2020
@AltBeacon AltBeacon deleted a comment from paulpv Jan 28, 2020
@AltBeacon AltBeacon deleted a comment from paulpv Jan 28, 2020
@AltBeacon AltBeacon deleted a comment from paulpv Jan 28, 2020
@AltBeacon AltBeacon deleted a comment from paulpv Jan 28, 2020
@davidgyoung
Copy link
Member Author

@paulpv, I created a new issue #944 so we can keep this PR cleanly about its described change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants