Android - 在意图调用日历时如何指定位置?
我正在创建一个 Intent
来从我的应用程序创建一个新的日历事件。我试图弄清楚如何指定日历项目的“位置”字段中应包含的内容,以便我可以在其中添加地址,但我尝试过的方法不起作用。有谁知道
//Create our intent
Intent intent = new Intent(Intent.ACTION_EDIT);
intent.setType("vnd.android.cursor.item/event");
intent.putExtra("title", myTitle);
intent.putExtra("description", myDescription);
//Trying to get the where to wrk
intent.putExtra("where", myAddress);
startActivity(intent);
我尝试过设置“哪里”,如上所示,但这不起作用。
I'm creating an Intent
to create a new calendar event from my application. I'm trying to figure out how to specify what should be in the "Where" field on the calendar item so I can put an address in it but what I've tried isn't working. Does anyone know what
//Create our intent
Intent intent = new Intent(Intent.ACTION_EDIT);
intent.setType("vnd.android.cursor.item/event");
intent.putExtra("title", myTitle);
intent.putExtra("description", myDescription);
//Trying to get the where to wrk
intent.putExtra("where", myAddress);
startActivity(intent);
I've tried setting "where" as seen above but that is not working.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
位置字段是“eventLocation”
The location field is "eventLocation"