Fixed
Status Update
Comments
gg...@google.com <gg...@google.com> #2
I've found this code fragment in the newest API 23 SDK's source code
WifiServiceImpl.java Line964
if (!canReadPeerMacAddresses && !isActiveNetworkScorer && !isLocationEnabled()) {
return new ArrayList<ScanResult>();
}
It could explain this issue.The method "isLocationEnabled" read Location settings then returns false at this condition, and getScanResults returns null.
WifiServiceImpl.java Line964
if (!canReadPeerMacAddresses && !isActiveNetworkScorer && !isLocationEnabled()) {
return new ArrayList<ScanResult>();
}
It could explain this issue.The method "isLocationEnabled" read Location settings then returns false at this condition, and getScanResults returns null.
ri...@soundcloud.com <ri...@soundcloud.com> #3
Thank you for your comment.
getScanResults() returns current results on Lollipop and older even if GPS is disabled.
Scan results should have no relation to GPS.
getScanResults() returns current results on Lollipop and older even if GPS is disabled.
Scan results should have no relation to GPS.
nk...@google.com <nk...@google.com> #4
I had confirmed the same with Nexus 5 Preview 3 (build num.: MPA44G).
br...@gmail.com <br...@gmail.com> #5
This is affecting App which need scanned wifi networks but not necessarily want GPS enabled. And by enabling GPS it is gonna drain the battery faster. Which may result in inefficient user experience..
Why location service is mandated now. Is google collecting geo location along with wifi networks for other project?
Why location service is mandated now. Is google collecting geo location along with wifi networks for other project?
[Deleted User] <[Deleted User]> #6
I also asked this problem on M-preview issue tracker.
On MRA58K, we still have to enable GPS to get ScanResults.
https://code.google.com/p/android-developer-preview/issues/detail?id=3163
For typical android users, it is may be quite difficult to find relation between Wi-Fi scanning and location settings.
ScanResults should be available if location permission is granted.
On MRA58K, we still have to enable GPS to get ScanResults.
For typical android users, it is may be quite difficult to find relation between Wi-Fi scanning and location settings.
ScanResults should be available if location permission is granted.
[Deleted User] <[Deleted User]> #7
Thanks for the suggestion. Our development team has looked into this bug and decided that it is working as per the design.
WifiManager#getScanResults() returns an empty list if location is turned off for the device.
WifiManager#getScanResults() returns an empty list if location is turned off for the device.
[Deleted User] <[Deleted User]> #8
Let me know the reason why it returns an empty list if GPS disabled.
It seems like degrading.
It seems like degrading.
fe...@gmail.com <fe...@gmail.com> #9
Also could you please mention this in documentation, currently it just mentions APP must have ACCESS_COARSE_LOCATION or ACCESS_FINE_LOCATION permission.
It doesn't mention Location must be turned on to get network list.
http://developer.android.com/reference/android/net/wifi/WifiManager.html#getScanResults()
It doesn't mention Location must be turned on to get network list.
fe...@gmail.com <fe...@gmail.com> #10
Any alternative method to get Wifi SSID's available for connection without switching on location
My application needs to connect to a specific wifi network in the background .
My application needs to connect to a specific wifi network in the background .
va...@theblueground.com <va...@theblueground.com> #11
I also was also suffering for more than 24 hours with the same contents. Cause look at this topic was found. However, it should not at all relevant to that thing and GPS to get a list of wifi has become ON. Is totally. I am pleased if you can explain why satisfactory.
Description
Version used: 1.0.1
How are you running your tests (via Android Studio, Gradle, adb, etc.)?
- Firebase Test Lab (not sure it matters, but we are running 99.99% of our tests there)
How are you running your tests (via Android Studio, Gradle, adb, etc.)?
- gcloud command line
How to reproduce:
- The issue is not happening consistently and I haven't find how to reproduce it.
What is the expected output? What do you see instead?
- I expect to see the test either passed or failed for an assertion failed in my code but I rather get the following error message:
Test instrumentation process crashed. Check com.my.package.MyTest#testName.txt for details.
Reading the logcat I can see this exception printed:
I/TestRunner(8940): ----- begin exception -----
I/TestRunner(8940): java.lang.IllegalStateException: Unable to send TestFailure status, terminating
I/TestRunner(8940): at android.support.test.orchestrator.instrumentationlistener.OrchestratedInstrumentationListener.testFailure(OrchestratedInstrumentationListener.java:136)
I/TestRunner(8940): at org.junit.runner.notification.SynchronizedRunListener.testFailure(SynchronizedRunListener.java:63)
I/TestRunner(8940): at org.junit.runner.notification.RunNotifier$4.notifyListener(RunNotifier.java:142)
I/TestRunner(8940): at org.junit.runner.notification.RunNotifier$SafeNotifier.run(RunNotifier.java:72)
I/TestRunner(8940): at org.junit.runner.notification.RunNotifier.fireTestFailures(RunNotifier.java:138)
I/TestRunner(8940): at org.junit.runner.notification.RunNotifier.fireTestFailure(RunNotifier.java:132)
I/TestRunner(8940): at org.junit.internal.runners.model.EachTestNotifier.addFailure(EachTestNotifier.java:23)
I/TestRunner(8940): at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:329)
I/TestRunner(8940): at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
I/TestRunner(8940): at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
I/TestRunner(8940): at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
I/TestRunner(8940): at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
I/TestRunner(8940): at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
I/TestRunner(8940): at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
I/TestRunner(8940): at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
I/TestRunner(8940): at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
I/TestRunner(8940): at org.junit.runners.Suite.runChild(Suite.java:128)
I/TestRunner(8940): at org.junit.runners.Suite.runChild(Suite.java:27)
I/TestRunner(8940): at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
I/TestRunner(8940): at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
I/TestRunner(8940): at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
I/TestRunner(8940): at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
I/TestRunner(8940): at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
I/TestRunner(8940): at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
I/TestRunner(8940): at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
I/TestRunner(8940): at org.junit.runner.JUnitCore.run(JUnitCore.java:115)
I/TestRunner(8940): at android.support.test.internal.runner.TestExecutor.execute(TestExecutor.java:58)
I/TestRunner(8940): at android.support.test.runner.AndroidJUnitRunner.onStart(AndroidJUnitRunner.java:375)
I/TestRunner(8940): at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1879)
I/TestRunner(8940): Caused by: android.os.TransactionTooLargeException: data parcel size 2495968 bytes
I/TestRunner(8940): at android.os.BinderProxy.transactNative(Native Method)
I/TestRunner(8940): at android.os.BinderProxy.transact(Binder.java:503)
I/TestRunner(8940): at android.support.test.runner.internal.deps.aidl.BaseProxy.transactAndReadExceptionReturnVoid(BaseProxy.java:65)
I/TestRunner(8940): at android.support.test.orchestrator.callback.OrchestratorCallback$Stub$Proxy.sendTestNotification(OrchestratorCallback.java:96)
I/TestRunner(8940): at android.support.test.orchestrator.instrumentationlistener.OrchestratedInstrumentationListener.sendTestNotification(OrchestratedInstrumentationListener.java:167)
I/TestRunner(8940): at android.support.test.orchestrator.instrumentationlistener.OrchestratedInstrumentationListener.testFailure(OrchestratedInstrumentationListener.java:134)
I/TestRunner(8940): ... 28 more
I/TestRunner(8940): ----- end exception -----