http://developer.android.com/about/versions/marshmallow/android-6.0-changes.html#behavior-network


   - Your apps can now change the state of WifiConfiguration
   
<http://developer.android.com/reference/android/net/wifi/WifiConfiguration.html>
objects
   only if you created these objects. You are not permitted to modify or
   delete WifiConfiguration
   
<http://developer.android.com/reference/android/net/wifi/WifiConfiguration.html>
objects
   created by the user or by other apps.

-- K



2016-04-28 22:02 GMT+03:00 Hogga <[email protected]>:

> Really?
>
> So when I connect to a WiFi network via standard Android App, so via
> Android prefences, I only can delete this WiFi via Android prefences and
> not with any other App?
>
> Why? :-) And where is that decriped? Thanks!
>
>
>
>
> Am Donnerstag, 28. April 2016 20:51:19 UTC+2 schrieb Kostya Vasilyev:
>>
>> On 6.0 and above, a WiFi network can only be modified or removed by same
>> exact app as originally created this network.
>>
>> -- K
>>
>>
>> 2016-04-28 21:39 GMT+03:00 Hogga <[email protected]>:
>>
>>> Hi,
>>>
>>> I´ve an App in which I want to remove saved Wifi networks, by selecting
>>> a specific.
>>>
>>> Here is my code:
>>>
>>> List<WifiConfiguration> savedWifis = wifiMgr.getConfiguredNetworks();
>>>
>>> wifiMgr.removeNetwork(savedWifis.get(k).networkId);
>>>
>>> wifiMgr.saveConfiguration()
>>>
>>> "k" is the selected WiFi in a ListPrefence.
>>>
>>>
>>> My Problem:
>>> On one of my smartphones it works wihtout problems (Cyanogenmod 12.1,
>>> Android 5.1.1), BUT on an other device the selected WiFi is not deleted
>>> (Android 6.0.1).
>>> wifiMgr.saveConfiguration() returns "true".
>>>
>>>
>>>
>>> Any idea?
>>>
>>> Thanks a lot!
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/CAN7dqjAzARY%3DZBvwWHt23Qi45g7Wi%3DBXfQT%3D_OBr2wATa%2Bo2pA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to