Java tutorial
//package com.java2s; import java.io.File; import android.content.Intent; import android.net.Uri; public class Main { private static Intent getHtmlFileIntent(File file) { Uri uri = Uri.parse(file.toString()).buildUpon().encodedAuthority("com.android.htmlfileprovider") .scheme("content").encodedPath(file.toString()).build(); Intent intent = new Intent("android.intent.action.VIEW"); intent.setDataAndType(uri, "text/html"); return intent; } }