Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import java.io.IOException;

import android.content.Context;
import android.content.res.AssetManager;

public class Main {
    /**
     * To get all file inside folder
     * 
     * @return String[]
     */
    public static String[] getFileName(Context context, String folderName) {
        String[] files = null;
        try {
            AssetManager assetManager = context.getAssets();
            files = assetManager.list(folderName);
        } catch (IOException e1) {
        }
        return files;
    }
}