Also, the recommended way to change timezone is through Settings app, which
not not included in the current sdk ..
For now you can use the following:
AlarmManager alarm = (AlarmManager) getSystemService(Context.ALARM_SERVICE);
alarm.setTimeZone(timezone);
It works with <uses-permission
android:name="android.permission.SET_TIME_ZONE"></uses-permission>
2008/9/6 samlu <[EMAIL PROTECTED]>
>
> I added the following code to monitor the timezone changed events.
> I can see the ACTION_TIME_TICK every minute, but no
> ACTION_TIMEZONE_CHANGED when I called TimeZone.setDefault()
>
> m_br = new BroadcastReceiver() {
> public void onReceive(Context context, Intent intent)
> {
> Log.d("ac", "IntentReceiver=" + intent.getAction());
> }
> };
>
> IntentFilter filter = new IntentFilter();
> filter.addAction(Intent.ACTION_TIME_TICK);
> filter.addAction(Intent.ACTION_TIMEZONE_CHANGED);
> registerReceiver(m_br, filter, null, m_handler);
>
> On Sep 6, 2:39 am, "Megha Joshi" <[EMAIL PROTECTED]> wrote:
> > 2008/9/4 samlu <[EMAIL PROTECTED]>
> >
> > > I called TimeZone.setDefault() for changing system's timezone, but
> > > failed.
> >
> > Can you give more details about what you mean by "failed".Is it a logcat
> > error or exception or is it incorrect result?
> >
> >
> >
> > > Is there an API for me to change system's timezone?
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" 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-developers?hl=en
-~----------~----~----~----~------~----~------~--~---