2013-02-04 1 views

답변

2

이 하나의 시도 :

Intent installIntent= new Intent(Intent.ACTION_VIEW) 
    installIntent.setData(Uri.parse("file:///path/to/your.apk")) 
    installIntent.setType("application/vnd.android.package-archive"); 
    installIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); 
    startActivity(installIntent); 

그것은 설치 프로그램-보기 메시지를 표시합니다. 앱이 PackageManager와 동일한 키로 서명되지 않은 경우에는 직접 자동 설치가 불가능합니다.

+0

예외가 발생했습니다. 'android.content.ActivityNotFoundException : 의도를 처리 할 활동이 없습니다. {act = android.intent.action.VIEW typ = application/vnd.android.package-archive}' –

+0

'installIntent'를 추가했습니다. setFlags (Intent.FLAG_ACTIVITY_NEW_TASK); 그리고 모든 것이 잘됩니다! –

관련 문제