查看钛合金 Android 日历
我正在尝试使用“Titanium.Android.Calendar”API来查看设备日历(本机日历),我已经在网站上看到了示例,但它没有帮助..
如何在以下情况下显示设备日历:用户单击按钮
我尝试了此代码
var intent = Ti.Android.createIntent({
className: "com.android.calendar.LaunchActivity",
packageName: "com.android.calendar"
});
Ti.Android.currentActivity.startActivity(intent);
,但出现异常
ActivityNotFoundWxception: 无法找到显式活动类 {com.android.calendar/com.android.calendar.launchActivity};您是否在 AndroidManifest.xml 中声明了此活动?
在该领域的任何帮助将不胜感激..非常感谢..
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..
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据 文档 函数
Ti.Android.createIntent()
不带任何参数。您可以在创建意图后修改意图,但不能在创建时修改意图。在你的情况下,我会尝试这个。
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.