I am new to work light. I want to create an application which shows me current available wifi network as a list and allow me to connect any of them and also it show the signal strength of the each network. I have studied the WL.Device.Wifi but it is not giving much help. Please provide your suggestions. I want to do this for iOS.
Asked
Active
Viewed 145 times
1
-
You can get them just with a private library, so your app can't be published on the app store. And I think you can only get the list, not connect to them – jcesarmobile Nov 18 '14 at 07:46
-
Thank you for your reply but i want to do this by using IBM Work light and my target platform is iOS. – TechChain Nov 18 '14 at 07:51
-
here you have more info about the private library. http://stackoverflow.com/questions/10317028/find-available-wi-fi-networks. You'll need to build a plugin – jcesarmobile Nov 18 '14 at 07:54
-
isn't it possible with WL.Device.wifi without using any plugin – TechChain Nov 18 '14 at 07:57
-
no, it's not possible. – jcesarmobile Nov 18 '14 at 08:25
2 Answers
2
Try this, It will give the currently connected network but not the list of available networks. Apple not supporting that.
NSArray *ifs = (__bridge_transfer id)CNCopySupportedInterfaces();
NSLog(@"%s: Supported interfaces: %@", __func__, ifs);
id info = nil;
for (NSString *ifnam in ifs)
{
info = (__bridge_transfer id)CNCopyCurrentNetworkInfo((__bridge CFStringRef)ifnam);
NSLog(@"%s: %@ => %@", __func__, ifnam, info);
if (info && [info count])
{
break;
}
}

Alex Andrews
- 1,498
- 2
- 19
- 33
-
Is there any solution using WL.Device.wifi API. and i want the list of available networks. – TechChain Nov 18 '14 at 07:44
0
There is limited support for what you're asking for, when using the WL.Device API in iOS.
You can see the following question&answer for more information about what is possible and any limitations: How to list the available Wifi access point in worklight
-
hello i was waiting for your reply to come. As you have worked a lot on this. So it means it is not possible in Work light. if not then is there any other way to do this ? – TechChain Nov 18 '14 at 08:41
-
1Maybe it is possible using a Cordova plug-in that will execute native code. See the other answer you were given. – Idan Adar Nov 18 '14 at 08:52
-
I have looked for iOS but it does not allow such type of functionality using public API. Cordova plugin is not helping out. – TechChain Nov 18 '14 at 09:14
-
-
For what purpose we use WL.Device.wifi i have studied it but it is not providing the clarity. – TechChain Nov 18 '14 at 09:20
-
WL.Device.wifi is a collection of a different methods. You can read more about it in the Location Services training module: http://public.dhe.ibm.com/software/mobile-solutions/worklight/docs/v620/10_04_Location_services_in_worklight_applications.pdf You can read more in the IBM Worklight Knowledge Center. – Idan Adar Nov 18 '14 at 09:26
-
-
location services are of different use and not full filling my requirement. – TechChain Nov 18 '14 at 10:28