I use the Calendar lib to put an event in the calendar, but I got a warning from Google about the use of the READ_CALENDAR and READ_CONTACTS permissions:
I want to remove the lib, the permissions and using an intent to put the entry in the calendar:
The calendar is opened to edit, but the options in putExtra don't work.
I based in this links:
Is possible to add the entry in calendar using this intent?
Thanks in advance for any tips to fix it.
App permissions best practices | Android Developers
developer.android.com
I want to remove the lib, the permissions and using an intent to put the entry in the calendar:
B4X:
Dim it As Intent
it.Initialize(it.ACTION_EDIT, "")
it.SetType("vnd.android.cursor.item/event")
it.putExtra("Events.TITLE", "New Event Title")
it.putExtra("Events.ALL_DAY", "True")
it.putExtra("Events.DESCRIPTION","Event Description")
it.putExtra("CalendarContract.EXTRA_EVENT_BEGIN_TIME", DateTime.Add(DateTime.Now, 0, 0, 1))
it.putExtra("CalendarContract.EXTRA_EVENT_END_TIME", DateTime.Add(DateTime.Now, 0, 0, 1))
StartActivity(it)
I based in this links:
Intents comuns | Android Developers
Uma intent permite iniciar uma atividade em outro app descrevendo uma ação que você quer realizar (como "ver um mapa" ou "tirar uma foto") em um objeto de intent. Esse tipo de intent é chamada de intent implícita porque...
developer.android.com
insert event to calendar using intent
I know this has been asked previously in this forum, but I tried everything written here and still nothing works for me. What I want to do is to insert an event to the calendar. Since there are sev...
stackoverflow.com
Is possible to add the entry in calendar using this intent?
Thanks in advance for any tips to fix it.