Please do not post the same thing multiple times. The board software automatically flags certain posts as needing moderator attention. This happens the most often for new users. I'm pretty sure this is made clear at the time you attempt to post. Posting the same thing over and over again just makes that many more posts the moderators have to weed through later. This makes us sad. Don't make us sad. If your post/thread doesn't appear, just wait a while. Don't post it again. If it hasn't shown up by the next day, then you can try again. I normally go through posts in the mornings, and try to check a few times throughout the day, but I'm not here 24/7. There will typically be a significant delay before posts are approved. Just be patient.
Howto programmatically turn on/off WiFi and Bluetooth?
Is there a programmatic way to turn on and off the WiFi and Bluetooth networks on the iPhone? I'm looking for the same functionality that Settings/[General/Bluetooth],WiFi/OnOff provides.
Is there a programmatic way to turn on and off the WiFi and Bluetooth networks on the iPhone? I'm looking for the same functionality that Settings/[General/Bluetooth],WiFi/OnOff provides.
There isn't a way using the APIs provided by the SDK. It's trivial to do if you use private frameworks, but if you use private frameworks, you will be in violation of Apple's SDK license agreement.
I've already written such an app for my own purposes (toggling Bluetooth on and off), but for obvious reasons I can't distribute it. Details can be found here if you are interested:
I'm interested about this: in the PhotoShare application, if the bluetooth is deactived, automatically is activated... so... how did you think that PhotoShare works??
Yep - the issue is private frameworks. Which means Apple will most definitely reject the app.
There are alternatives, however. The Jailbreak Community can always make use of apps like that. However, from what I've been seeing of late, the "Jailbreak Community" is dying off pretty fast, as a lot of the devs for it are either moving to the App Store, or simply charging obscene prices for once free apps. They either handle their records poorly, or simply don't care, and as a result many "buyers" of their apps have been completely screwed over. ZodTTD, I'm looking at you.
Thanks for the link but I was wondering actually how to do it (frameworks to import, maybe even some code).
You're going to find a hard time finding that code here, I would suggest you try searching through some cydia apps source code such as Bossprefs or Customize. You can also try searching through the "System" commands that the iPhone utilizes. For example:
This might not be useful to you, but I believe that if you use a GKPeerPicker to connect two iPhones together, it will automatically request that the user enable Bluetooth and provide a dialog box to do so. This isn't much use if, like me, you're making an app that needs to connect multiple clients to a single host.
Not sure if it helps, but there's a key that you can put into the application .plist called 'App requires Wifi' or something similar that I think should ensure that WiFi is available. Sadly it doesn't do the same for Bluetooth.
Replies
I've already written such an app for my own purposes (toggling Bluetooth on and off), but for obvious reasons I can't distribute it. Details can be found here if you are interested:
Stormy Productions: The most useful iPhone app I can't release
Cheers.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesomein the PhotoShare application, if the bluetooth is deactived, automatically is activated...
so... how did you think that PhotoShare works??
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesomejoe
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like AwesomeThere are alternatives, however. The Jailbreak Community can always make use of apps like that. However, from what I've been seeing of late, the "Jailbreak Community" is dying off pretty fast, as a lot of the devs for it are either moving to the App Store, or simply charging obscene prices for once free apps. They either handle their records poorly, or simply don't care, and as a result many "buyers" of their apps have been completely screwed over. ZodTTD, I'm looking at you.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like AwesomeCheck Out The Official Shmoopi LLC Website
iPrivateBrowser | <a href="http:
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like AwesomeYeah, I figured out how to toggle bluetooth
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome-Ash
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome-Ash
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome