FHellmann / Uniatron

This project is part of the course Mobile Application Development at the University of Augsburg
https://play.google.com/store/apps/details?id=com.edu.uni.augsburg.uniatron
Apache License 2.0
0 stars 3 forks source link

App Crash after adding app to blacklist via notification #30

Closed leonpoint closed 6 years ago

leonpoint commented 6 years ago

Describe the bug App crash after adding App to blacklist via notification and then restarting app afterwards

To Reproduce Steps to reproduce the behavior:

  1. Install Uniatron App
  2. Install another App
  3. Tap the notification which asks to "add app to blacklist"
  4. Open Uniatron App
  5. Search through the App Blacklist. The recently installed App is not listed here.
  6. Kill Uniatron through task manager to check if problem has to do with caching of blacklist
  7. App crashes

FATAL EXCEPTION: main Process: com.edu.uni.augsburg.uniatron, PID: 22725 java.lang.RuntimeException: Unable to start service com.edu.uni.augsburg.uniatron.service.AddBlacklistEntryService@f9ebce2 with null: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.Intent.getStringExtra(java.lang.String)' on a null object reference at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3694) at android.app.ActivityThread.-wrap21(Unknown Source:0)



-----------
     Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.Intent.getStringExtra(java.lang.String)' on a null object reference
        at com.edu.uni.augsburg.uniatron.service.AddBlacklistEntryService.onStartCommand(AddBlacklistEntryService.java:24)

**Smartphone (please complete the following information):**
 - Device: S8

#17 #29