Skip to content
Snippets Groups Projects
SedentaryNotification.java 1.24 KiB
Newer Older
import android.annotation.TargetApi;
import android.app.NotificationChannel;
import android.os.IBinder;
import android.support.annotation.Nullable;
public class SedentaryNotification extends Notification {
    @Nullable
    @Override
    public IBinder onBind(Intent intent) {
        return null;
    protected NotificationCompat.Builder setParameters(NotificationCompat.Builder builder) {
        //Get parameters from settings? or set strings?
        builder.setSmallIcon(0);
        builder.setContentTitle("");
            builder.setContentText("");
                return builder;

    @TargetApi(26)
    protected NotificationChannel setChannelParameters(NotificationChannel nc) {
        nc.setDescription("");
        nc.enableLights(true);
// Sets the notification light color for notifications posted to this
// channel, if the device supports this feature.
        nc.setLightColor(Color.RED);
        nc.enableVibration(true);
        nc.setVibrationPattern(new long[]{100, 200, 300, 400, 500, 400, 300, 200, 400});
        return nc;