can anybody help me about what to insert in the eventTimezone value when adding an event to a calendar? this is my code:
Intent intent = new Intent(Intent.ACTION_INSERT);
intent.setType("vnd.android.cursor.item/event");
intent.putExtra("title", eventName);
intent.putExtra("beginTime", startCal.getTimeInMillis());
intent.putExtra("endTime", endCal.getTimeInMillis());
intent.putExtra("eventTimezone","Hong Kong");
startActivity(intent);
everything else works fine but the eventTimezone doesnt seem to change the option of the timezone to my desired timezone. what value do i need? ive tried "GMT+1" and "(GMT+8:00) Hong Kong" but they are not working.
This is how you get the timezone into it
TimeZone tz = TimeZone.getDefault();
intent.putExtra(Events.EVENT_TIMEZONE, tz.getID());
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With