티스토리 뷰

카테고리 없음

apk 설치

[czar] 2013. 1. 11. 12:20
Boolean value = Environment.MEDIA_MOUNTED.equals(Environment.getExternalStorageState());
if(value){
Log.d("SDCARD", "__________ sd card is exist");
} else {
Toast.makeText(getApplicationContext(), "sd카드가 있어야 설치가 됩니다.", 0).show();
}

URL myFileUrl = null;
try {
            myFileUrl= new URL(fileUrl);
            myFileUrl_Global = new URL(fileUrl); 
} catch (MalformedURLException e) {
            e.printStackTrace();
}

File apkFile = new File(Environment.getExternalStorageDirectory()+ "/ListViewTest.apk");//HelloAndroid.apk
                  Log.d("file", apkFile.toString());
                  Uri apkUri = Uri.fromFile(apkFile);
                  Log.d("uri", apkUri.toString());      
                  try 
                  {
                  Intent intent = new Intent(Intent.ACTION_VIEW);
                  intent.setDataAndType( apkUri, "application/vnd.android.package-archive");
                  startActivity(intent);
                  ListViewActivity.this.finish();
                  
                  
                  
                  }
                  catch (Exception e) 
                  {
                  // TODO: handle exception]
                  Log.d("Exception", e.toString());
                  }



http://www.androidpub.com/1294511


http://neoroid.tistory.com/entry/%EB%8B%A4%EC%9A%B4%EB%A1%9C%EB%93%9C-%EB%B0%9B%EC%9D%80-pdf-%EB%82%98-apk-%ED%8C%8C%EC%9D%BC-%EC%8B%A4%ED%96%89%ED%95%98%EA%B8%B0



http://sdop.egloos.com/3630690

공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2025/07   »
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31
글 보관함