Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
Posts: 1,531
Registered: ‎07-14-2008
My Device: Z10

Re: Can we programatically off wifi in bb 10?


stardomains wrote:

I see this works for turning it on. But it returns -1 for turning it off. I saw the caveat in the api docs.

 

But the result being returned for:

 

resultf = wifi_set_sta_power(false); is -1 ,

 

and the errno is 1 which is EPERM. strerror(errno) returns string "Operation not Permitted"

 

This error is different than the api docks say you would encounter EBUSY. I have access_wifi_public in there and all is working for:

 

result = wifi_set_sta_power(true); . [turning wifi on]

 

Maybe there is another permission needed?

 

Developers and Developer Support Question:

 

Is there another undocumented wifi permission that is needed for turning wifi off? If so, is it possible to make documented for us?

 

I have also tried checking all permission on in the xml bar descriptor and granting them on install to no avail.


Apparently the developer of On Location app said in the app description he is able to turn wifi on and off. So it must be possbile with undocumented api or permission.

 

Developer
Posts: 190
Registered: ‎12-14-2009
My Device: Not Specified

Re: Can we programatically off wifi in bb 10?

Must be an old description. I have that app and in the settings it only has the option to turn it on.
Developer
Posts: 1,531
Registered: ‎07-14-2008
My Device: Z10

Re: Can we programatically off wifi in bb 10?


stardomains wrote:
Must be an old description. I have that app and in the settings it only has the option to turn it on.

Well then its false advertising but then SayIt developer also said he can turn wifi on and off with his app.

Developer
Posts: 190
Registered: ‎12-14-2009
My Device: Not Specified

Re: Can we programatically off wifi in bb 10?

Found this thread. I can't open the issue tracker for some reason. Has there been any updates to it lately?

http://supportforums.blackberry.com/t5/Cascades/1985329/m-p/1985329#M38330

https://www.blackberry.com/jira/browse/BBTEN-538
Developer
Posts: 190
Registered: ‎12-14-2009
My Device: Not Specified

Re: Can we programatically off wifi in bb 10?

I see the "Smart Tags" app can turn off Wifi. Can a developement adviser tell us if this uses the standard wifi API and if so what does it do that we are missing with our "resultf = wifi_set_sta_power(false);"?

 

Developer
Posts: 1,531
Registered: ‎07-14-2008
My Device: Z10

Re: Can we programatically off wifi in bb 10?


stardomains wrote:

I see the "Smart Tags" app can turn off Wifi. Can a developement adviser tell us if this uses the standard wifi API and if so what does it do that we are missing with our "resultf = wifi_set_sta_power(false);"?

 


Smart Tags is made by BlackBerry.  Of course they can do whatever they want.:Censored:

Developer
Posts: 190
Registered: ‎12-14-2009
My Device: Not Specified

Re: Can we programatically off wifi in bb 10?

Is there any change with 10.3 API for turning wifi off programatically?
Developer
Posts: 16,521
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: Can we programatically off wifi in bb 10?


stardomains wrote:
Is there any change with 10.3 API for turning wifi off programatically?

no

----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter