get Example Pending Intent - Android Intent

Android examples for Intent:Pending Intent

Description

get Example Pending Intent

Demo Code


import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;

public class Main{
    public static final String EXTRA_MESSAGE = "com.ihelp101.voiceminus.Voice.MESSAGE";
    public static PendingIntent getExamplePendingIntent(Context context,
            int messageResId) {
        Intent intent = new Intent(ReplyActivity.ACTION_EXAMPLE).setClass(
                context, ReplyActivity.class);
        intent.putExtra(EXTRA_MESSAGE, context.getString(messageResId));
        return PendingIntent.getBroadcast(context,
                messageResId /* requestCode */, intent,
                PendingIntent.FLAG_UPDATE_CURRENT);
    }/*from  w  w w  . j  av a 2 s  . c om*/
}

Related Tutorials