murgo / IrssiNotifier

notifies android phones from irc private messages
Apache License 2.0
171 stars 63 forks source link

Build fixes/debugging instrumentation #198

Closed stwalkerster closed 6 years ago

stwalkerster commented 6 years ago

This hotfixes a number of build issues encountered while debugging #195, published as requested in that thread.

It is not:

  1. well written
  2. tested beyond reproducing #195
  3. working well to reproduce #195
  4. up to date with current requirements

This updates the Minimum SDK version to v14 (Ice Cream Sandwich), so any users on older devices will be unable to use the app from this point onwards. Given those devices are 6-7 years old at this point I suspect that is reasonable, but exactly how that affects the current userbase is something you'll only be able to see from the Google Play Console.

It also updates the target API version to 25, which as of 2018-10-31 was sufficient to build, while not introducing the extra dependencies within AccountManager for access to accounts, and also sufficiently new for the app to be publishable in the Play store. However, "from November" (it's unclear which end of November), it appears the minimum will become API 26 which introduces further requirements - see https://developer.android.com/about/versions/oreo/android-8.0-changes#aaad for more information here. This basically means that my change to UserHelper will need to be further modified once the API version is pushed to 26. Note that the dependencies for the support libraries will also need to be updated with the move to API 26.

It's also worth noting that my changes to UserHelper work only on the second attempt - the first attempt is used to get the permission, then the next launch manages to successfully use that permission - it's clunky but workable for development/debugging.

I'm also throwing a generic Exception in GCMIntentService - this is bad and I should be using a more specific exception, but it's debugging code so hey. I'll leave this to you to fix if GCM is vanishing.

The changes to IrssiNotifierActivity to move off Sherlock and onto AppCompat are completely untested, as I can't get that far into the app. It compiles though, so it's unlikely to be too broken. Likewise with the theme updates to AppCompat, it's mostly untested apart from the registration screen appears to me mostly OK; message boxes render interestingly.

murgo commented 6 years ago

Thanks! I'll start merging the stuff and testing the issue on this weekend.

There's bunch of other PRs too in the backlog which I've been neglecting, I guess it's time to clean this project up a bit.

murgo commented 6 years ago

Working from your base helped a lot, thanks. The UI broke down a little bit with the removal of ActionBarSherlock which I'll need to fix, and we have to drop support for Android 2.x but I guess that's pretty whatever at this year.