Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump compileSdk, update dependencies, fix #18, #19 and #20 #33

Open
wants to merge 28 commits into
base: master
Choose a base branch
from

Conversation

Lej77
Copy link

@Lej77 Lej77 commented Dec 26, 2022

Previously I was using another app (Notification Memo) but it got a lot buggier in Android 13 so I searched for alternatives and found this app on F-Droid as well as another app called p!n. Of the apps I found I prefer most things in this app but it had some bugs and therefore I made some changes in order to fix those.

  • Updated app to work with latest Android Studio
    • Bumped compileSdk and targetSdk
    • Updated dependencies
    • Migrated to androidx from android.support.
    • Updated som tests that failed, mostly ParentPin tests that timed out on newer android versions.
    • Manually request permission to send notifications, required in Android 13 (sdk 33).
  • Allow more actions when multi-selecting text, such as searching the text online. (From AndroidManifest.xml in p!n)
  • Follow the system's night mode setting.
  • Fix styling of window background so that selecting text doesn't cause "popups", issue Selecting text causes white box to appear blocking view #20. (From styles.xml in p!n)
  • It seems that a change listener for the "show notifications action" checkbox was never registered, even though most of the code was written. So I registered that listener which should fix When you click a pinned note on notification, Show Notification Actions is reset. #18.
  • Make the content view scrollable if it gets too large, should fix Unable to scroll to Pin/Delete buttons, as overflow not handled #19.
    • You previously made a comment against this in PR scrollview in dialog #16. Not quite sure if that was only about the case where the dialog was always too large or if it was about the case where the dialog grew too large. Anyway I think a scrollable dialog should be fine according to the guidelines as long as the header and footer remain fixed (which they are in my implementation). Even if you disagree it should still be better than just breaking the app which is what happened before.
  • I created one notifications channel (category) per visibility level. This should make it easier to configure Android to actually hide the content from the lock screen (at least this is the case on my Samsung phone).
    • I also added a "public version" of the private notification as specified here. (I also used info from this blog post).
      • This allows the notification's title to still be shown on the lock screen while the content is hidden.
  • I changed the styling of the spinners so that their drop down's don't overlap with the widget itself. This makes it easier to use the gesture where you drag down on the spinner and then lift your finger at the option you want to select.
  • Finally I placed the text inputs vertically. I made this change last so that if you don't like it then its easy to skip.
    • This makes sense because the title is usually not multi line while the content definitively can be. If that happens and the inputs are in different columns (as they were previously) then most of the space in the dialog isn't used which isn't very efficient.

Edit:
I did some additional changes as I found more things to fix:

  • Set android:noHistory to true in order for the app to close when you back out of it. If this isn't done then tapping a notification to edit it after one previously backed out of creating a new pin causes weird behavior. Specifically the app is reopened with the unfinished new pin.
  • Changed the name of the app icon to "MicroPinner" from "New Pin". Should fix Name mixup #29.
  • Notifications were only restored after reboots despite the fact that the reboot receiver was invoked from the main activity at line 74 of MainDialog.java. This is because it failed the first check in the reboot receiver at line 21 of OnBootReceiver.java. I removed that check and added a different check so that the restore code only runs once after the app is started. Force stopping the app or restarting the phone should still cause the notifications to be restored. This fixes When upgrading app current pin notifications disappear until reboot. #23.

@dotWee
Copy link
Owner

dotWee commented Dec 26, 2022

Holy shit, thank you for your contribution!

It's been some time working for me with the Android SDK and i already considered this project as discontinued with no plans on keeping it updated, nor releasing another version.

Yet it looks like you put in serious work on fixing the open issues and updating the source to the current API standards.
This project is/was actually one of my first 'real' published dev projects, seeing someone still using it actually warms my heart haha.

I'm currently on a tight schedule with finals week coming closer, so it will probably take me a few weeks for a full review. After taking a deeper look at your changes, i'll merge it and release (maybe one last) version.

One question tho: Since this project doesn't serve me any use except nostalgia, would you interested in taking over this project, maybe even taking the ownership of the Google Play Store application / F-Droid project?

@Lej77
Copy link
Author

Lej77 commented Dec 27, 2022

Glad you liked the changes! I signed my own version of the app for private use so you don't have to hurry up a release for my sake. Still, it could be convenient to have an updated version for when I am using other devices and of course other people might appreciate these changes.

I don't have a Google Play developer account so I don't think transferring ownership is possible. Also I haven't really done much development on Android apps so don't know how appropriate I would be to manage it, even if I could probably figure it out.

@Lej77
Copy link
Author

Lej77 commented Dec 31, 2022

I started experimenting with some extra features on a new branch new-features, such as selecting the color of the notification and being able to select how notifications are grouped when there are a lot of them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants