Android examples for App:Assets File
Open a file in assets path
//package com.java2s; import android.content.Context; import java.io.IOException; import java.io.InputStream; public class Main { /**//from w ww . java 2 s .c o m * Open a file in assets path * * @param context * @param assetFilePath * @return */ public static InputStream open(final Context context, final String assetFilePath) { try { return context.getAssets().open(assetFilePath); } catch (IOException e) { return null; } } }