nzbget / android

NZBGet Android Installer
GNU General Public License v2.0
12 stars 4 forks source link

Upgraded to API Level 28, Now opening MainActivity on service notification click #10

Closed kabukky closed 5 years ago

kabukky commented 5 years ago

The MainActivity will now be opened - or pushed into the foreground if already open in the background - if the NZBGet Daemon service notification is clicked by the user.

In the process, I had to upgrade the SDK to API Level 28 (Android 9) to be able to show the notification on devices with Android 8 and above.

This involves a few other code changes as well, mainly to accommodate for the different way to ask for the storage permission on Android 6 and above.

Everything should work as before. Since "minSdkVersion" stays at 21, the app still runs on Android 5 devices.

I think supporting Android 9 now is a good idea. We need to do it sooner or later anyway.

hugbug commented 5 years ago

Thank you very much! I'll test this on my Android 7 tablet.

Small suggestion: it would be better if the PR would contain only new commits and not the commit for merging from nzbget/master. I'm not sure how you would achieve this :) For this PR I can do "Squash and merge" but if it would contain multiple commits (like the previous PR) I would prefer to merge them with preserving history (not squash).

kabukky commented 5 years ago

Thanks. I'll look into the commit thing for the next PR.

hugbug commented 5 years ago

Works nice and without issues on Android 7 tablet. Thank you!