set Notification Content Text - Android Android OS

Android examples for Android OS:Notification

Description

set Notification Content Text

Demo Code


import android.app.Notification;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.support.v4.app.NotificationManagerCompat;
import android.support.v7.app.NotificationCompat;
import android.text.TextUtils;

public class Main{
    public static NotificationCompat.Builder setContentText(
            NotificationCompat.Builder mBuilder, String content) {
        if (!TextUtils.isEmpty(content))
            mBuilder.setContentText(content);
        return mBuilder;
    }// w  w w . j a  v  a 2 s. c o m
}

Related Tutorials