iPhone app detecting wifi network while running in the background - iphone

does anyone know if there is a way for an iPhone app to continuously detect the presence of WiFi networks while running in the background? What are the limitations?
Cheers,
Marko

you can see all the details(all SSID, RSSI) of nearby WIFI hotspots but i dont know how to inject this code so that i can run on BG

Related

Get GPS from iPhone to wifi iPad via bluetooth?

Is it possible to transmit GPS data from a GPS-enabled iPhone to a wifi-only iPad? Does anyone have sample code to share that would do this?
How about getting GPS data from an Android via bluetooth, over to a wifi iPad?
Yes, but you would need to create an application for both devices that would communicate with each other. You cannot get the location over wifi without a custom application sending the data.
Have a look at the WiTap sample app. This app allows two devices to find each other and send data to each other using WiFi. You can adapt this code so one device sends location data it obtains to the other device instead of info about which rectangle was tapped.
I have no info for doing this with Android.

Private API to toggle wifi and 3G

I'm working on test automation for an app. I'm looking for a way to automate connectivity tests. For that I need to be able to toggle 3G and wifi. I've been going through the private api headers but I haven't found a method that would scream 'I do that!'.
Can anyone point me in the right direction, please?
I can't see this being possible. The iPhone 4 has a setting for 3g on or off in iOS 5, but the iPhone 4s doesn't. If it was possible to turn off 3g in the iPhone 4s I think Apple would have retained that ability in iOS 5.
I assume you've seen the reachability sample code
Thinking about this laterally, iOS connects to known WiFi hotspots when available - so you don't necessarily have to run this on the phone. You could just toggle your WiFi hotspot which you're connecting to on/off, and iOS should automatically switch (as long as any other known WiFi access points aren't in range) to 3G and WiFi respectively.

Is iphone simulator geolocation features working with the Ethernet/Wired network connection only?

I'm trying to develop an iPhone application which uses the geolocation libraries. Is this feasible for the iphone simulator to simulate the GPS functionality without the use of my PC's Wi-Fi infrastructure? Does anyone know if the iphone simulator can spot your location using your IP-address only (so only the Ethernet cable connection is required)?
Thanks in advance.
You should test that functionality on an actual device. I believe the simulator will always show Cupertino, CA as the location.
No it won't work using ethernet. Core location appears to only work with WIFI even though at the end is the same router.
CoreLocation doesn't work in the simulator, but there are options
http://github.com/futuretap/FTLocationSimulator
Simulator doesn't have this functionality, but iSimulate has (it's not mine :-( ). It connects the device and simulator per WiFi and sends location events to the application within simulator: real GPS events and a few predefined locations around the world. Pretty cool!

is iphone capable of switch between Wifi & 3G?

this is really important for me to switch between Wifi & 3G on iphone via code .
so is there any possibility any backdoor or some way to crack. i can scan all the wifi hot spot and can drag their details but i need a background process that help me to scan 3g also and allow me to auto-switch whenever it finds wifi
You dont need to do this in code.
The iPhone does this automatically for you anyway. As long as you have a wifi enabled on the iphone, it will pick up the wigi signal and when it can connect will automatically switch to the wifi signal.
Hope this helps.
Let me know if it did a little. thanks
PK

iPhone Background App in Ad-hoc distribution?

I need to be able to ensure that the iphone is always connected to a network. If it loses reception I need to be able to warn the user. Since the only way I see this working is using a background process is it possible to use private APIs so that the app can run in the background.
I know it can be done with Jailbroken phones but I would rather not Jailbreak the phones.
If you mean having this behavior while running an app; check out the Reachability sample.
If you mean having this behavior while not running an app; check out Android.
There is currently no way to run a background process.
You can send notifications to the phone while it is connected to a network, but obviously there is no way to send a notification when it is disconnected.