Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Open Source License 

import android.content.Intent;

import android.net.Uri;

public class Main {
    private static Uri lastCameraImageSaved = new Uri.Builder().build();

    public static Uri getImageUri(Intent data) throws Exception {
        Uri imageUri;
        if (data == null) {
            imageUri = lastCameraImageSaved;
        } else {
            imageUri = data.getData();
        }
        return imageUri;
    }
}