java - Android - 如何在有意调用日历时指定位置?

标签 java android calendar android-intent

我正在创建一个 Intent 以从我的应用程序创建一个新的日历事件。我试图弄清楚如何指定日历项目的“Where”字段中应该包含什么,以便我可以在其中放置一个地址,但我尝试过的方法不起作用。有谁知道吗

//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);

我已尝试设置“where”,如上所示,但这不起作用。

最佳答案

位置字段是“eventLocation”

intent.putExtra("eventLocation", myAddress)

关于java - Android - 如何在有意调用日历时指定位置?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5352876/

相关文章:

android - 在android中实现双向 ListView 的正确方法

android - 如何在 kotlin 的 xml 标签中自动添加相同的 xml 代码?

android - 如何从我的应用程序打开谷歌日历应用程序?

iphone - 有什么方法可以添加在 iCal 中添加的标识符或标记自定义事件吗?

python - 如何定期检查程序中的当前日期?

java - 循环行为无法捕获传入消息

java - 将日期对象转换为 yyyy-MM-dd hh :mm:ss

java - 私有(private)方法内的私有(private)字段 VS 从公共(public)方法传递它们

java - Spring 抛出错误 : Bean definition is abstract

android - 使用 ViewHolder 类在 getview() 中设置 onClickListener