Seems reasonable enough that one could write a different interface for
changing this setting.  "Rings Extended" is a great example of such an
improvement.  I suggest checking out the android source and seeing how
this is done in the settings app.  For instance, in packages/apps/
Settings/src/com/android/settings/AirplaneModeEnabler.java , this is
done with the following code:

        Settings.System.putInt(mContext.getContentResolver(),
Settings.System.AIRPLANE_MODE_ON,
                                enabling ? 1 : 0);
        Intent intent = new Intent
(Intent.ACTION_AIRPLANE_MODE_CHANGED);
        intent.putExtra("state", enabling);
        mContext.sendBroadcast(intent);

This would most certainly require to add security requirements to the
AndroidManifest of your app.

I'm not 100% certain that this possible to do even with the proper
security flags, and I agree that you shouldn't do this without
specific action by the user, as it affects system elements outside of
your particular app.

-Steve

On Jan 19, 5:29 am, Jean-Baptiste Queru <[email protected]> wrote:
> You shouldn't. Changing such a setting is the user's responsibility.
>
> JBQ
>
> On Sun, Jan 18, 2009 at 10:02 PM, Naeem <[email protected]> wrote:
>
> > Hi All,
> > I want to switch on/off airplane mode programmatically. How can I do
> > this. Anybody can help me.
>
> > Thaks
>
> --
> Jean-Baptiste M. "JBQ" Queru
> Android Engineer, Google.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to