Hi all,
Please can someone point me in the direction of an activity starter code that can save an event to the phone calendar. If it’s possible
I found this
but I’m unsure on the implimentation
val intent = Intent(Intent.ACTION_INSERT)
.setData(CalendarContract.Events.CONTENT_URI)
.putExtra(CalendarContract.EXTRA_EVENT_BEGIN_TIME, startMillis)
.putExtra(CalendarContract.EXTRA_EVENT_END_TIME, endMillis)
.putExtra(CalendarContract.Events.TITLE, “Yoga”)
.putExtra(CalendarContract.Events.DESCRIPTION, “Group class”)
.putExtra(CalendarContract.Events.EVENT_LOCATION, “The gym”)
.putExtra(CalendarContract.Events.AVAILABILITY, CalendarContract.Events.AVAILABILITY_BUSY)
.putExtra(Intent.EXTRA_EMAIL, “[email protected] ,[email protected] ”)
startActivity(intent)
Thanks
t
Hi Dora
Im not sure Google calendar will do what I need it to do.
What I need is to save an appointment to the user phone.
Seems to me that google calendar will save it to MY calendar???
Thanks, I going to give it a bash.
was the “X” in front you or was this an extension??
t
dora_paz
(Dora)
August 23, 2021, 3:47pm
#5
1 Like
It works, sort of…
It calls the Calendar but it gives me a date of 1 Jan 2100 ???
Any idea why?
Also any idea how I can access the full range of things like
email
Alarm before
Repeats
Notes
Invites
t
Because you have did mistake in the procedure. Actually date stores in a caribe first , not in a label. But you ate trying to store the date displaying in the label to tinydb before it appears in the label so tinydb stores empty string. So use the same variable in tinydb as well as in label
I hope you can see the list of gmail used in the phone using taifun account manager extension
Thanks but Im using two different formats
One for a Label and one for a variable
The label has Appontment Date added the variable is just the date
So, I dont think thats the problem, bu thanks anyway
In your sample image we didnt see so i suggested… well, in such case what you have to do mean, replace block you have to use. because after picking the date in your lbl date text you are adding App date., so it may(of course, it is) created the problem. anyway you can use either method…
The value stored in the TinyDB I use here…
The values stored in the global variable I use here
No, I think the problem is in the Activity Starter block
This is the problem
not even this…
despiote removing “[” and “]” and “,”
dora_paz
(Dora)
August 24, 2021, 8:59am
#14
Topic closed at OP’s request
1 Like