Code example for File

Methods: fromFile

0
		@Override 
		protected void onPostExecute(Boolean status) {
			dialog.dismiss();
			if (status) {
				Intent intent = new Intent(Intent.ACTION_VIEW);
				intent.setDataAndType(Uri.fromFile(new File(Environment.getExternalStorageDirectory() + "/download/" + "WhatAndroid.apk")),
						"application/vnd.android.package-archive"); 
				context.startActivity(intent);
			} else { 
				Toast.makeText(context, "Update failed, install manually from http://bit.ly/git_wa_build/", Toast.LENGTH_LONG).show();
			} 
		} 
	} 
}