how to integrate google calendar in my android application? -
i trying integrate google calendar in app add events google calendar not know how integrate. please 1 me in advance
if want use calendar in app directly, can use github library offers lot of customization:
but if wish use calendar, should work these intents:
try in code:
calendar cal = calendar.getinstance(); intent intent = new intent(intent.action_edit); intent.settype("vnd.android.cursor.item/event"); intent.putextra("begintime", cal.gettimeinmillis()); intent.putextra("allday", true); intent.putextra("rrule", "freq=yearly"); intent.putextra("endtime", cal.gettimeinmillis()+60*60*1000); intent.putextra("title", "a test event android app"); startactivity(intent);
add permission..
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android"...> <uses-sdk android:minsdkversion="14" /> <uses-permission android:name="android.permission.read_calendar" /> <uses-permission android:name="android.permission.write_calendar" /> ... </manifest>
as google calendar access, best way use google calendar api.
Comments
Post a Comment