The code Written below works for me Intent intent = new Intent(Intent.ACTION_EDIT); intent.setType("vnd.android.cursor.item/event"); intent.putExtra("title","Hi this me"); intent.putExtra("description","Some description"); intent.putExtra("beginTime",eventStartInMillis); intent.putExtra("endTime",eventEndInMillis); startActivityForResult(intent,1);
我的问题是,我不能回到OnActivityResult的Android日历数据,我不知道为什么请帮我解决这个问题.
protected void onActivityResult(int requestCode,int resultCode,Intent data) { if (requestCode == 1) { if(resultCode == RESULT_OK){ String result=data.getStringExtra("title"); } And i am getting data.getExtras() is null !!!!!
解决方法
因为结果代码总是返回0在android日历活动结果的日历隐含意图尝试在onActivity结果中使用RESULT_CANCEL
public void onActivityResult(int reqCode,Intent data){
super.onActivityResult(reqCode,resultCode,data);
switch(reqCode){
if(resultCode == Activity.RESULT_CANCEL)
而你必须检查出Next Event ID它将工作
希望会帮助你..
戈文德