开发者

Android - How do I specify a location when calling the calendar with an intent?

开发者 https://www.devze.com 2023-02-18 18:56 出处:网络
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

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.


The location field is "eventLocation"

intent.putExtra("eventLocation", myAddress)
0

精彩评论

暂无评论...
验证码 换一张
取 消