Android WebView + AlarmManager + Notification Tutorial

Andrew Ruffolo · 51K views · 2014 · 17:41

Open on YouTube

Software (other)Web developmenttutorialdated

Why Stack Overflow recommends it

Stack Overflow users link it as a quick worked example for scheduling a daily reminder notification with AlarmManager and a notification service.

Recommended by 1 people across 1 different months, 2014 to 2021.

What it is

A 2014 screencast by Andrew Ruffolo that builds a small Android app: a WebView inside a Fragment, a splash screen, and an AlarmManager that fires a daily midnight notification which relaunches the app. Source files are linked in the description.

What people said

Recommends Wicked161089 · 2014-07 · Stack Overflow · on “How to Create a Reminder Notification”

here is a little [this video] about daily notifications. You can find the source code in the description. This video is not made by myself. But I think its a quick help. Although i recommend some changes because the Notification.Builder is deprecated: 1. import android.support.v4.app.NotificationCompat; 2. // Change: Notification mNotify = new Notification.Builder(this) to Notification mNotify = new NotificationCompat.Builder(this) Have Fun!

Cites user3454910 · 2015-01 · Stack Overflow · on “Android AlarmManager Pass extra from activity to service”

I have tried to follow many links but no matter what my extras keep being null. First I have an activity (MainActivity) that will set up a notification using a service (NotifyService). I can get the service to be and the notification to appear at the appropriate time. However passing a string seems to be a problem. In MainActivity onCreate() I have: Intent myIntent = new Intent(this, NotifyService.class); //this is what I would like to pass over myIntent.putExtra("newtitle" ,"this is the new title"); myIntent.putExtra("newcontent" ,"this is the new content"); AlarmManager alarmManager = (AlarmManager)getSystemService(ALARM_SERVICE); PendingIntent pendingIntent = PendingIntent.getService(this

Cites Ravish Jha · 2021-06 · Stack Overflow · on “Service start error while using Android notifications”

I am trying to display a notification to the app users every day at 12pm and followed this [this video] example for the same. Nothing happens when the time reaches the target time. Why is this happening? Here's my NotifyService class: public class NotifyService extends Service { @Override public IBinder onBind(Intent intent) { return null; } @Override public void onCreate(){ Uri sound = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION); NotificationManager mNM = (NotificationManager)getSystemService(NOTIFICATION_SERVICE); Intent intent1 = new Intent(this.getApplicationContext(), MainActivity.class); PendingIntent pIntent = PendingIntent.getActivity(this, 0, intent1, 0); Notificatio