Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Apache License 

import android.net.Uri;

import java.io.File;

public class Main {
    /**
     * Convert a file to a Uri
     * @param file
     * @return
     */
    public static Uri convertFileToUri(File file) {
        if (file == null) {
            return null;
        }
        Uri imgUri = Uri.fromFile(file);
        return imgUri;
    }
}