Wifi native with metro style app (Windows 8) - wifi

I would like to know if it is a way to to manage a wifi configuration with metro apps ?
Basically I want my application to list and retrieve information about all the available wifis the phone detects. I saw that it was possible so far using the wlanapi.h but I can't figure out how to use it in this metro style app context.
If you have any idea, please tell me.
Cheers

According to this MSDN thread - it is not possible to list all wifi networks in range, but you can call NetworkInformation.GetConnectionProfiles() to list the known networks (or connection profiles) or NetworkInformation.GetInternetConnectionProfile() to access the one currently used for Internet access.

Related

See devices connect to my wifi router using Swift and allow/block wifi acces

In short i'm trying to build an App that will grant/block wifi access to my son's wifi for his Ipad and his PS4 remotely using an App. I researched the topic and can't figure out how this can be done. Ideally i'd like to be able to grant/block wifi access independently Ie. block wifi to the Ipad and allow PS4.
How can this be done, no need for the full code ( well if you insist i'll take it ) but just point me in the right direction.
Depending on the router you're using you're going to need to write something that interacts with the router's API, if it has one. If it doesn't, you will need to replace the firmware on your router with something like ddwrt that can be scripted. From there, you might be able to create an app that talks to the router's API.
TLDR: You're probably better off simply bookmarking the management page for the router and enabling/disabling access for the devices.
Edit:
It occurred to me that some mainstream consumer router/access point manufacturers (Linksys, Asus, etc) have companion apps for managing their devices from the LAN side. You should see if such an app exists for your router, and if not, perhaps consider getting a different router that supports such an app.

How to display custom text in ios wifi settings

I have a very specific question in programming an ios app.
In general when you open your ios wifi settings, there should be a list of available networks to choose.. so far..
now I want that in some cases, if a network meets specific requirements, a text is diplayed down below the network name (e.g. like "connect with WIFIAPP") and by clicking on the network you open the "WIFIAPP"..
Is there any possibility to do that and if yes, how? A framework or something like that?
Hope you guys understand my concern..
Thank you for any help!
Daniel
The feature you are after is implemented by the NEHotspotHelper class in the Network Extension Framework. In order to use this class you need to complete a questionnaire and be authorised by Apple.
More details are included in the Hotspot Network Subsystem Programming Guide, but essentially your app runs in the background and takes part in the network scanning process. It can provide an annotation for recognised networks and the user can invoke your app from Settings in order to complete the network authentication.
Unfortunately, access to wifi network parameters is completely closed from developers. From your app you can only tell apart if device is closed to wifi or 3G cellular network. Nothing more. I don't even say about native Settings app. You can do only some extra limited things outside of your app, like play music, or show your custom Widget.

WiFi Authentication Without MAC Address (iOS)

I’m currently working on a small project with the goal of using an iOS App to provide a secure, centralized login for a network of WiFi hotspots in small and medium sized businesses. The plan was to configure the routers as open networks and DHCP forward all the traffic from the router to our (cloud-hosted) server, where each query is authenticated and the user’s query is allowed to pass to its intended destination.
Our current problem is that in order to configure the server to know which users are accessing it we need the Mac Addresses of the users, which the Apple API requires they type in manually the first time they use the app (which is a lot of work) so we are trying to come up with a work around.
Any thoughts or suggestions would be hugely appreciated.
Thanks,
Alex
:)
Since iOS 7 you can no longer get the MAC Address. Based on what you are trying to do, I would recommend using one of the device identifiers available through iOS like identifierForVendor which will give you an unique id.
as per Apple Docs:
In iOS 7 and later, if you ask for the MAC address of an iOS device,
the system returns the value 02:00:00:00:00:00. If you need to
identify the device, use the identifierForVendor property of UIDevice
instead. (Apps that need an identifier for their own advertising
purposes should consider using the advertisingIdentifier property of
ASIdentifierManager instead.)

iOS: filesharing without iTunes?

I develop an enterprise application for iOS and the user should be able to add files from the desktop to the application.
I implemented this using filesharing, which works great.
Now this company wants to get rid of iTunes from their machines (which is quite understandable, iTunes is a very invasive process).
The question is, is it still possible to somehow use filesharing without iTunes? maybe with another application?
Or what other way is there to send files to the app (preferrably without the need of an internet connection)
//edit: must work on windows 7 and must not require to install iTunes (there are some other tools that allow access to the iPad filesystem, but they go through drivers installed by iTunes)
You could exchange data via the local wireless network (a connection to the internet is not required, just the iOS device and the Windows computer need to be on the same network).
One option:
You can then create a simple TCP/IP connection over sockets between an iOS app and a Windows application and exchange the data you want.
However you probably need to implement a suitable simple Windows application to do this.
An other, maybe simpler, solution:
You could start a webserver in your iOS-App and show it's IP on the screen. By entering this IP in a browser on the desktop computer you can access websites on the iOS device, which can make documents available for download or receive uploads.
For how to do this, have a look at this question.
There are a number of ways to achieve this, ranging from trivial to sophisticated.
Your question says that you would prefer to avoid an internet connection. Simple solutions may require it - if you want to abstract the difficult parts, you're going to have to let somebody do the dirty work, and that's probably going to be someone(thing) on the internet. Midrange solutions may require a network but not internet connection. A sophisticated solution could probably be whatever you want - but one thing I would say, is that trying to tap into the USB connector is either going to result in a hacktastic or very complicated solution to implement.
One method would be to integrate a third party framework that basically does what your looking for. Look at the Dropbox development kit, for example - allowing Windows (or any platform) users to drop files on their desktops into a shared dropbox, and this can then be read by an iOS application which includes the iOS drobox API.
Another method would be to setup a simple WebDAV server in your office. Host it on a windows box, or a cheap linux box. Give users desktop's access to the share via whatever protocol you want (eg, Windows File Sharing). Then you'd implement a WebDAV client in your app (eg, WTClient) to pull files.
Finally, you could build your own transmission system. A sophisticated example might involve Bonjour and TCP/IP, a simpler-but-custom solution may involve a simple JSON web service running off a local (or remote) server.
I have suggestion but that will require the Internet. I would suggest you to use the DropBox API in the windows and iPhone both. It's awesome to use and very simple for file sharing.
Now a days everybody have dropbox account and have files in it to share. So that shouldn't cost anything other than a bit of implementation (this learning can also be used in other file sharing applications).
Here are some guidance:
iOS
REST API
You can add apps and documents to USB-connected devices with the Apple Configurator
You may use a simple Ftp server installed on PC, so you can connect to server from Ios and upload/download files from iOS to PC....
http://developer.apple.com/library/ios/#documentation/Networking/Conceptual/CFNetwork/CFFTPTasks/CFFTPTasks.html
All work is done by Pc and your app will use IP (Intranet or Internet) of PC to share all files.
From Ios you can read all files in FTP server and work with them.
I use the FileBrowser app to get access to network shares over WiFi and will allow you to load supported files to the device. The company responsible is creating an API to allow you to do this within your own app: https://twitter.com/#!/Stratospherix/status/193114857271336960

Can Phonegap query the wifi system and return network names?

I checked the Phonegap API but what I would like to achieve, getting a list of available wifi networks, seems not supported.
Anyone knows if it's possible at all in the current state?
You cannot get a list of available wifi networks at the moment.
PhoneGap will support reading the currently connected network SSID via the system information api (http://www.w3.org/TR/system-info-api/#network).
If you wanted to list all the wifi networks today, you would have to write a PhoneGap plugin -- assuming those APIs are actually available on the devices in which you are interested.
Here is a PhoneGap plugin for wifi info https://github.com/HondaDai/PhoneGap-WifiInfoPlugin The code is in Java which means it's for Android. However,
WifiInfo wifiInfo = wifiManager.getConnectionInfo();
This only gives you result for the currently connected wifi network. To get a list of all wifi networks, I believe you can change the WifiInfoPlugin class and use wifiManager.getScanResults(), then store the results in an array or similar.
I recently did some research on this and found out it's still not supported.
It might be useful to have a look at the PhoneGap roadmap from time to time.

Resources