Commit 95a5ead9 authored by Sajal Narang's avatar Sajal Narang

Fix app crash on NotificationEventReceiver (possibly) (1)

parent dbd81883
...@@ -41,6 +41,12 @@ public class NotificationIntentService extends IntentService { ...@@ -41,6 +41,12 @@ public class NotificationIntentService extends IntentService {
super(NotificationIntentService.class.getSimpleName()); super(NotificationIntentService.class.getSimpleName());
} }
@Override
public void onCreate() {
super.onCreate();
startForeground(1, new Notification());
}
public static Intent createIntentStartNotificationService(Context context) { public static Intent createIntentStartNotificationService(Context context) {
Intent intent = new Intent(context, NotificationIntentService.class); Intent intent = new Intent(context, NotificationIntentService.class);
intent.setAction(ACTION_START); intent.setAction(ACTION_START);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment