Search code examples
androidcalendartitaniumappceleratorappcelerator-mobile

view android calendar in titanium


I'm trying to use "Titanium.Android.Calendar" API to view the device calendar (the native one), I've seen the examples in the website but it doesn't help ..

How can I display The device calendar when the user click a button

I tried this code


var intent = Ti.Android.createIntent({
    className: "com.android.calendar.LaunchActivity",
    packageName: "com.android.calendar"
});

Ti.Android.currentActivity.startActivity(intent);

but an exception appear that

ActivityNotFoundWxception: unable to find explicit activity class {com.android.calendar/com.android.calendar.launchActivity}; have you declare this activity in your AndroidManifest.xml?

any help in that area will be appreciated ..Thank you so much..


Solution

  • According to the documentation the function Ti.Android.createIntent() takes no arguments. You can modify an intent after it is created but not at creation point.

    In your case I would try this however.