Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

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

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;

import java.io.Serializable;

public class Main {
    public static void ActivitySkipWithObject(Context context, Class<?> toClass, String key, Serializable obj) {
        Intent intent = new Intent();
        intent.setClass(context, toClass);
        Bundle bundle = new Bundle();
        bundle.putSerializable(key, obj);
        intent.putExtras(bundle);
        //        int id =((IdObj)bundle.getSerializable("  ")).getId();
        context.startActivity(intent);
    }
}