Activate airplane mode programmatically?
Asked Answered
V

2

7

Does anyone know how to de/activate the airplane mode programmatically on the iPhone (OS 2.1)?

Ventris answered 27/4, 2009 at 15:2 Comment(0)
G
5

It is not possible to do this with the public APIs, which means that Apple won't approve an app for the App Store that does this.

Of course, you generally shouldn't do this anyway. I'm curious to hear the reason you had in mind.

Graticule answered 27/4, 2009 at 15:44 Comment(4)
A customer asked me to do this. I gave him pretty much the same answer as you. Apart from this not being in the public API, Apple states elsewhere that apps shouldn't try to make decisions on events outside of their scope.Ventris
But more briefly: they thought the nature of the app was such that "users don't want to be interrupted".Ventris
My desk area at work has extremely poor cell coverage; I work within the center of an old building with a lot of metal in the walls. My iPhone runs out of batteries quickly because it is trying to reach the cell network constantly. I would like to write a utility that would look for a WiFi network with a particular name (say, "MyWorkplaceWiFiNetwork") during a defined schedule (say, 8am - 6pm, Monday through Friday) and if detected, enable airplane mode and WiFi. If the network is not detected, disable airplane mode. This would greatly increase my phone's battery life.Lowbrow
Sometimes 3G gets stuck here and the only way to bring it back to life is by switching the device into flight mode for a short while. For kiosk apps and similar it would be good to be able to use this API as a last resort.Guffey
H
0

Apple has made an organizational decision to block enterprise administration of iOS devices and limit the scope and interoperability of APIs. Because of this, iOS devices don't have the power or flexibility to be managed in this way. Android devices can be managed through flexible APIs and scripting. For our organization, we wanted to ensure that Railroad Engineers could not make or receive calls from the Engine. In the end we banned iOS devices from the railyards. I understand the airlines are doing the same thing.

Hymnology answered 24/3, 2017 at 22:41 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.