2014-01-21 1 views
0
 Intent calIntent = new Intent(Intent.ACTION_VIEW); 
     calIntent.setData(CalendarContract.Events.CONTENT_URI); 
     startActivity(calIntent); 

매니페스트 파일에서 권한을 추가했지만 작동하지 않습니다. ,Android. 월보기로 항목을 표시하기 위해 일정 의도를 호출하는 방법은 무엇입니까?

// A date-time specified in milliseconds since the epoch. 
long startMillis; 
... 
Uri.Builder builder = CalendarContract.CONTENT_URI.buildUpon(); 
builder.appendPath("time"); 
ContentUris.appendId(builder, startMillis); 
Intent intent = new Intent(Intent.ACTION_VIEW) 
    .setData(builder.build()); 
startActivity(intent); 

불행하게도 :

답변

1

당신은 내가 참조를 위해 여기에 복사있어 즉, documentation에서 봐 가지고, (예를 들어, 당신이보기를 원하는 시간을 설정 같은) 몇 단계를 놓치고있어 나는 달보기에있는 달력 app를 강요하는 것이 가능하다고 생각하지 않는다. 위의 코드는 주어진 시간 동안 캘린더를 열지 만 사용자가 캘린더 앱을 주간보기 모드로 설정하면 할 수있는 일이별로 없습니다. 나는 그 마지막 비트에 대해 틀린 것으로 증명되고 싶다! :-)

관련 문제