Java tutorial
//package com.java2s; import java.io.File; import android.content.Intent; import android.net.Uri; public class Main { private static Intent getAllIntent(String filePath) { Intent intent = new Intent(); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); intent.setAction(android.content.Intent.ACTION_VIEW); Uri uri = Uri.fromFile(new File(filePath)); intent.setDataAndType(uri, "*/*"); return intent; } }