Fixed
Status Update
Comments
jm...@google.com <jm...@google.com> #2
I have the same problem (used to work in 8.0 and stopped in 8.1 preview 1).
I call it from a `Fragment` attached as a headless-fragment (without any own view).
My Code (this returns always `<unknown_ssid>`):
```kotlin
private val wifiManager: WifiManager by lazy { context!!.applicationContext.getSystemService(Context.WIFI_SERVICE) as WifiManager }
private val isInCorrectWifi: Boolean
get() {
val connectionInfo = wifiManager.connectionInfo
if (SupplicantState.COMPLETED != connectionInfo.supplicantState) {
debug("isInCorrectWifi > not connected to any wifi")
return false
}
val dataReaderSSIDInMarks = "\"testWifi\""
if (dataReaderSSIDInMarks.isEmpty() || dataReaderSSIDInMarks != connectionInfo.ssid) {
debug("isInCorrectWifi: not connected to correct wifi (should be $dataReaderSSIDInMarks)")
return false
}
return true
}
```
I call it from a `Fragment` attached as a headless-fragment (without any own view).
My Code (this returns always `<unknown_ssid>`):
```kotlin
private val wifiManager: WifiManager by lazy { context!!.applicationContext.getSystemService(Context.WIFI_SERVICE) as WifiManager }
private val isInCorrectWifi: Boolean
get() {
val connectionInfo = wifiManager.connectionInfo
if (SupplicantState.COMPLETED != connectionInfo.supplicantState) {
debug("isInCorrectWifi > not connected to any wifi")
return false
}
val dataReaderSSIDInMarks = "\"testWifi\""
if (dataReaderSSIDInMarks.isEmpty() || dataReaderSSIDInMarks != connectionInfo.ssid) {
debug("isInCorrectWifi: not connected to correct wifi (should be $dataReaderSSIDInMarks)")
return false
}
return true
}
```
pr...@gmail.com <pr...@gmail.com> #3
It looks like you now need `android.permission.ACCESS_COARSE_LOCATION` (I think `ACCESS_FINE_LOCATION` will work as well).
I've tested it and it seems working now.
I've tested it and it seems working now.
jm...@google.com <jm...@google.com> #4
I added ACCESS_COARSE_LOCATION and ACCESS_FINE_LOCATION, it is not working. My case is different.
I think it cannot get the SSID if you are not running a activity. I think location permission is not required.
I think it cannot get the SSID if you are not running a activity. I think location permission is not required.
pr...@gmail.com <pr...@gmail.com> #5
Thank you for reporting this issue. For us to further investigate this issue, please provide the following additional information:
Steps to reproduce
Please provide source code or apk of a sample application to reproduce the issue.
Also kindly mention the steps to be followed for reproducing the issue with the given sample application.
Frequency
How frequently does this issue occur? (e.g 100% of the time, 10% of the time)
Steps to reproduce
Please provide source code or apk of a sample application to reproduce the issue.
Also kindly mention the steps to be followed for reproducing the issue with the given sample application.
Frequency
How frequently does this issue occur? (e.g 100% of the time, 10% of the time)
pr...@gmail.com <pr...@gmail.com> #6
Source:
Project for the test is attached.
---------------------------------------------
Step to reproduce the problem:
1. Connect to a WIFI network.
2. When you open this app manually, it start BGService and show the correct WIFI's SSID value using a notification.
3. Reboot the phone. Do NOT open the app this time. Wait and let boot complete receiver to start the same BGService in the background, and show WIFI's SSID value with the notification.
(this time the SSID value is "<unknown SSID>", which is incorrect)
---------------------------------------------
Frequency:
100%
Project for the test is attached.
---------------------------------------------
Step to reproduce the problem:
1. Connect to a WIFI network.
2. When you open this app manually, it start BGService and show the correct WIFI's SSID value using a notification.
3. Reboot the phone. Do NOT open the app this time. Wait and let boot complete receiver to start the same BGService in the background, and show WIFI's SSID value with the notification.
(this time the SSID value is "<unknown SSID>", which is incorrect)
---------------------------------------------
Frequency:
100%
pr...@gmail.com <pr...@gmail.com> #7
(sorry I used the wrong account to post the source, please use this one)
Source:
Project for the test is attached.
---------------------------------------------
Step to reproduce the problem:
1. Connect to a WIFI network.
2. When you open this app manually, it start BGService and show the correct WIFI's SSID value using a notification.
3. Reboot the phone. Do NOT open the app this time. Wait and let boot complete receiver to start the same BGService in the background, and show WIFI's SSID value with the notification.
(this time the SSID value is "<unknown SSID>", which is incorrect)
---------------------------------------------
Frequency:
100%
Source:
Project for the test is attached.
---------------------------------------------
Step to reproduce the problem:
1. Connect to a WIFI network.
2. When you open this app manually, it start BGService and show the correct WIFI's SSID value using a notification.
3. Reboot the phone. Do NOT open the app this time. Wait and let boot complete receiver to start the same BGService in the background, and show WIFI's SSID value with the notification.
(this time the SSID value is "<unknown SSID>", which is incorrect)
---------------------------------------------
Frequency:
100%
se...@gmail.com <se...@gmail.com> #8
yes, having the same issue with SSIDs https://issuetracker.google.com/issues/68498876
Using getConnectionInfo() to get the SSID (via getSSID) now retrieves <unknown SSID> or null. Tried with different SSIDs with the same result.
Using getConnectionInfo() to get the SSID (via getSSID) now retrieves <unknown SSID> or null. Tried with different SSIDs with the same result.
au...@gmail.com <au...@gmail.com> #9
I've already provided further information above, including the sample project src, steps to reproduce the problem, and frequency, but it seems that no one is following the issue. What should I do???
si...@sodaprojects.net <si...@sodaprojects.net> #10
I have been looking for workarounds as well, is there any other way to get this info or do we need additional permissions for 8.1. Any info would be appreciated :)
Thanks!
Thanks!
pr...@gmail.com <pr...@gmail.com> #11
Seems that this happens if the targetSdkVersion is 26. If it's set to `targetSdkVersion 25` it works fine
[Deleted User] <[Deleted User]> #12
No, I think it is not related to targetSdkVersion, my sample project provided is targeting 25, and my production project is targeting 22. My observation is if it is called from activity, it will return correct SSID. If this is called from a service, it will return <unknown SSID>.
jo...@undocumedia.org <jo...@undocumedia.org> #13
Hi Google, is anyone following this issue?
Android Version: 8.1.0
Model: nexus 5x
Security patch level: Oct 5, 2017
Build Number: OPP5.170921.005
Problem Description:
I notice that I cannot read connected WIFI network's SSID after reboot. I don't know what is the problem.
I have a service running in background and a boot complete receiver that start that service. There is also a MainActivity, it just start the service and do nothing. The service print print WIFI's SSID for every minute.
Results:
When the service is started from MainActivity, the service can print WIFI's SSID correctly for each iteration.
When the service is started from boot complete receiver (restart the phone), wifiInfo.getSSID() always return <unknown_ssid>. (which is not the correct SSID)
Expected results:
It should always print the correct SSID, no matter how I start the service
Step to reproduce the problem:
1. Connect to a WIFI network.
2. When you open this app manually, it start BGService and show the correct WIFI's SSID value using a notification.
3. Reboot the phone. Do NOT open the app this time. Wait and let boot complete receiver to start the same BGService in the background, and show WIFI's SSID value with the notification.
(this time the SSID value is "<unknown SSID>", which is incorrect)
---------------------------------------------
Frequency:
100%
Android Version: 8.1.0
Model: nexus 5x
Security patch level: Oct 5, 2017
Build Number: OPP5.170921.005
Problem Description:
I notice that I cannot read connected WIFI network's SSID after reboot. I don't know what is the problem.
I have a service running in background and a boot complete receiver that start that service. There is also a MainActivity, it just start the service and do nothing. The service print print WIFI's SSID for every minute.
Results:
When the service is started from MainActivity, the service can print WIFI's SSID correctly for each iteration.
When the service is started from boot complete receiver (restart the phone), wifiInfo.getSSID() always return <unknown_ssid>. (which is not the correct SSID)
Expected results:
It should always print the correct SSID, no matter how I start the service
Step to reproduce the problem:
1. Connect to a WIFI network.
2. When you open this app manually, it start BGService and show the correct WIFI's SSID value using a notification.
3. Reboot the phone. Do NOT open the app this time. Wait and let boot complete receiver to start the same BGService in the background, and show WIFI's SSID value with the notification.
(this time the SSID value is "<unknown SSID>", which is incorrect)
---------------------------------------------
Frequency:
100%
[Deleted User] <[Deleted User]> #14
Hi, my app still has this issue, more than a hundred user with Google Pixels. Tried several different ways including making sure that the SupplicantState is completed and no luck
[Deleted User] <[Deleted User]> #15
Engineering team have fixed a security loophole, so that when application is in background, it will not be able to access SSID.
Hence closing this issue as Working As Intended.
Hence closing this issue as Working As Intended.
pr...@gmail.com <pr...@gmail.com> #16
So the intention was to break things?
ar...@gmail.com <ar...@gmail.com> #17
Please add a user permission to allow this for specific tasks (especially Tasker). I rely on it in Tasker to
- automatically do automatically apply different settings and behavior while I'm at home
- provide a warning notification when WiFi is accidentally turned off (which my wife keeps accidentally doing when swiping down the notification bar)
- change headphone volumes based on connection to specific WiFi networks (as lower battery proxy for location)
I was considering upgrading my Nexus 6 to a Pixel 2 since the Nexus 6 isn't getting security updates any more, but I'll be forced to stick with my Nexus 6 (and keep my wife's Nexus 5x on Android 8.0) until this unwanted "bug" is removed from the latest code.
- automatically do automatically apply different settings and behavior while I'm at home
- provide a warning notification when WiFi is accidentally turned off (which my wife keeps accidentally doing when swiping down the notification bar)
- change headphone volumes based on connection to specific WiFi networks (as lower battery proxy for location)
I was considering upgrading my Nexus 6 to a Pixel 2 since the Nexus 6 isn't getting security updates any more, but I'll be forced to stick with my Nexus 6 (and keep my wife's Nexus 5x on Android 8.0) until this unwanted "bug" is removed from the latest code.
au...@gmail.com <au...@gmail.com> #18
Why did you break something like this? Not only does it stop programs from being able to read current internet status, it also immediately disconnects apps that were using the internet on screen off.
Please fix this immediately. Too many people rely on background data when the screen is off, that includes reading WiFi access.
I want 8.0 back until this is fixed!
Please fix this immediately. Too many people rely on background data when the screen is off, that includes reading WiFi access.
I want 8.0 back until this is fixed!
su...@gmail.com <su...@gmail.com> #19
Does this happen when NOT setting targetSdkVersion to oreo? Thinking of notification-channels, they are not needed until the app "says that it is supported" (by setting targetSdkVersion to the new version).
So when the app does not change, it should continue to work.
Or is this different and more like a "security fix" which affects all apps?
So when the app does not change, it should continue to work.
Or is this different and more like a "security fix" which affects all apps?
ha...@gmail.com <ha...@gmail.com> #20
Hi,
I can confirm asking for location permission solves the issue.
Like this
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
I didn't find any documentation that states that this should be the way to do it.
This should be a separate permission since asking for something so broad as the location can create distrust from the user.
Using a previous SDK version doesn't help either for devices with Android 8.1
Thanks!
I can confirm asking for location permission solves the issue.
Like this
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
I didn't find any documentation that states that this should be the way to do it.
This should be a separate permission since asking for something so broad as the location can create distrust from the user.
Using a previous SDK version doesn't help either for devices with Android 8.1
Thanks!
jm...@google.com <jm...@google.com> #21
I'm on Android 8.1.0 and can't read the SSID or BSSID from WifiManager in the foreground or background.
I can't read the SSID/BSSID from WifiManager.getConnectionInfo inside of a BroadcastReceiver or Activity, with or without ACCESS_FINE_LOCATION.
I *can* read the SSID (but not BSSID) via ConnectivityManager.getNetworkInfo inside an Activity and BroadcastReceiver, with or without ACCESS_FINE_LOCATION.
Changing build or target sdk versions does nothing.
This is a pain and will negatively impact my UI for users on 8.1 :/
I can't read the SSID/BSSID from WifiManager.getConnectionInfo inside of a BroadcastReceiver or Activity, with or without ACCESS_FINE_LOCATION.
I *can* read the SSID (but not BSSID) via ConnectivityManager.getNetworkInfo inside an Activity and BroadcastReceiver, with or without ACCESS_FINE_LOCATION.
Changing build or target sdk versions does nothing.
This is a pain and will negatively impact my UI for users on 8.1 :/
su...@indiegala.com <su...@indiegala.com> #22
@20
I submitted the feature request to restrict SSID/BSSID of the currently connected wifi network for apps without location permission.
A single valid BSSID is enough to deduce location with very good precision, hence coarse_location permission is needed and you need to educate your users.
This change has taken effective since 8.1.
I submitted the feature request to restrict SSID/BSSID of the currently connected wifi network for apps without location permission.
A single valid BSSID is enough to deduce location with very good precision, hence coarse_location permission is needed and you need to educate your users.
This change has taken effective since 8.1.
jo...@google.com <jo...@google.com>
ap...@google.com <ap...@google.com> #23
@22
I don't disagree that a permission is necessary, you are right and it's a loophole. The issue is that there's no documentation (for no one call it users or developers). Basically right now I have to send the users (savy ones) to a bug tracker so they can see that for themselves.
I don't disagree that a permission is necessary, you are right and it's a loophole. The issue is that there's no documentation (for no one call it users or developers). Basically right now I have to send the users (savy ones) to a bug tracker so they can see that for themselves.
Description
The error thrown up is: "There is an operation pending for this application. Please wait and try again."
I had earlier set up naked domain redirection in G-suite, but the G-suite account was deleted later. However, this error persists.
This error has been persisting for many days now, am not able to run the service on my naked domain.