Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import android.content.Intent;
import android.os.Bundle;

public class Main {
    private static final String KEY_PARAMETER = "IMAGE_ID";

    public static int getParameter(Intent i) {
        final Bundle extras = i.getExtras();
        if (extras == null)
            return -1;
        return extras.getInt(KEY_PARAMETER, -1);
    }
}