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.app.PendingIntent;

import android.content.Context;
import android.content.Intent;

public class Main {
    private static final String INTENT_TYPE_EVENT = "vnd.android.cursor.item/event";

    public static PendingIntent createNewEventPendingIntent(Context context) {
        Intent intent = createNewEventIntent();
        return PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);
    }

    public static Intent createNewEventIntent() {
        Intent intent = new Intent(Intent.ACTION_EDIT);
        intent.setType(INTENT_TYPE_EVENT);
        return intent;
    }
}