Re: [android-developers] Removing Saved WiFi Networks

2016-05-10 Thread Hogga
Didn´t find any information about deleting networks when the App is Device 
Adminstration...

Is that even possible?



Am Freitag, 29. April 2016 12:47:05 UTC+2 schrieb Hogga:
>
> Ok, it would be possbile if my App is a Device Adminstration App, right?
>
>
> Am Donnerstag, 28. April 2016 21:29:50 UTC+2 schrieb Kostya Vasilyev:
>>
>>
>> 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 <mlrt...@gmail.com>:
>>
>>> 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 <mlrt...@gmail.com>:
>>>>
>>>>> Hi,
>>>>>
>>>>> I´ve an App in which I want to remove saved Wifi networks, by 
>>>>> selecting a specific.
>>>>>
>>>>> Here is my code:
>>>>>
>>>>> List 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 android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
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/4100dd67-3d22-4c52-938c-0570d2da7b2a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-developers] Removing Saved WiFi Networks

2016-04-29 Thread Hogga
Ok, it would be possbile if my App is a Device Adminstration App, right?


Am Donnerstag, 28. April 2016 21:29:50 UTC+2 schrieb Kostya Vasilyev:
>
>
> 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 <mlrt...@gmail.com >:
>
>> 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 <mlrt...@gmail.com>:
>>>
>>>> Hi,
>>>>
>>>> I´ve an App in which I want to remove saved Wifi networks, by selecting 
>>>> a specific.
>>>>
>>>> Here is my code:
>>>>
>>>> List 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 android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
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/e092df69-b09d-45c5-a3f7-a6d005fc6a36%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-developers] Removing Saved WiFi Networks

2016-04-28 Thread Hogga
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 <mlrt...@gmail.com >:
>
>> Hi,
>>
>> I´ve an App in which I want to remove saved Wifi networks, by selecting a 
>> specific.
>>
>> Here is my code:
>>
>> List 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 android-developers+unsubscr...@googlegroups.com .
>> To post to this group, send email to android-d...@googlegroups.com 
>> .
>> 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/72a42b45-3656-4db3-a090-aad6a60cc57e%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/android-developers/72a42b45-3656-4db3-a090-aad6a60cc57e%40googlegroups.com?utm_medium=email_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
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 android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
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/8bd6626b-4ceb-41c3-8a4f-ecb4c15052d9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Removing Saved WiFi Networks

2016-04-28 Thread Hogga
Hi,

I´ve an App in which I want to remove saved Wifi networks, by selecting a 
specific.

Here is my code:

List 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 android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
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/72a42b45-3656-4db3-a090-aad6a60cc57e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.