[4.1+] PinNotif - Pin Important Notifications To Avoid Clearing Them Accidentally

Search This thread

Saturn2K

Senior Member
May 30, 2010
596
40
Pittsburgh
I get the pin and unpin options showing up, but they don't seem to do anything. If I pin a notification and then open it, it still gets removed.

I'm running c-rom 6.6.
 

GermainZ

Inactive Recognized Developer / Retired Forum Mod
Aug 3, 2012
6,170
8,805
I get the pin and unpin options showing up, but they don't seem to do anything. If I pin a notification and then open it, it still gets removed.

I'm running c-rom 6.6.
The goal is to keep you from accidentally removing them, not keeping them forever.
The app can still update or cancel the notification at any time. You can't.
 

halocon

Member
Aug 13, 2010
14
4
This is a wonderful module! Would it be possible to make it so tapping the pinned item doesn't remove it from being pinned and that you have to manually unpin it?

Thanks!
 

supergonkas

Senior Member
Jan 15, 2014
90
29
I`ve made the translantion of your app to Portuguense (Portugal)
The strings file goes attached
 

Attachments

  • strings.rar
    309 bytes · Views: 4
  • Like
Reactions: GermainZ

Publiuss

Senior Member
Jun 29, 2012
948
171
Hi

Module works, just report that in my logs I see multiple error (info) lines :
Code:
I/Xposed  (  658): java.lang.NullPointerException
I/Xposed  (  658):      at com.germainz.pinnotif.XposedMod$2.beforeHookedMethod(XposedMod.java:164)
I/Xposed  (  658):      at de.robv.android.xposed.XposedBridge.handleHookedMethod(XposedBridge.java:611)
I/Xposed  (  658):      at com.android.server.NotificationManagerService.enqueueNotificationWithTag(Native Method)
I/Xposed  (  658):      at android.app.INotificationManager$Stub.onTransact(INotificationManager.java:101)
I/Xposed  (  658):      at android.os.Binder.execTransact(Binder.java:351)
I/Xposed  (  658):      at de.robv.android.xposed.XposedBridge.invokeOriginalMethodNative(Native Method)
I/Xposed  (  658):      at de.robv.android.xposed.XposedBridge.handleHookedMethod(XposedBridge.java:631)
I/Xposed  (  658):      at android.os.Binder.execTransact(Native Method)
I/Xposed  (  658):      at dalvik.system.NativeStart.run(Native Method)
 

bagarwa

Senior Member
Feb 18, 2012
1,193
2,748
Bothell
play.google.com
It s randomly stopping working. :( Sometimes I get the pin option and sometimes I don't. I'm aware that persistent notifications won't get the pin option. But cleanable notifications too don't get the pin options sometimes.

I'm running stock 4.4.3 on a Nexus 5.
 

GermainZ

Inactive Recognized Developer / Retired Forum Mod
Aug 3, 2012
6,170
8,805
It s randomly stopping working. :( Sometimes I get the pin option and sometimes I don't. I'm aware that persistent notifications won't get the pin option. But cleanable notifications too don't get the pin options sometimes.

I'm running stock 4.4.3 on a Nexus 5.
Does it happen for a specific notification? Are you using another Xposed module that alters the long press menu (XHaloFloatingWindows or ViewInPlay)? Does the Xposed log show anything?
 

_jis_

Senior Member
Feb 5, 2012
1,469
530
That's the one I was using previously. That gives the play store link only in the app info page.
Me too, but I returned to it from ViewInPlay, because Play Store link in App info works without any problem and it has much smaller footprint than ViewInPlay.

ViewInPlay creates a link in Notification shade and recent apps screen too.
I use Play Store link in App info and have App Info link in both places too. :)
 

electricpete1

Senior Member
Aug 12, 2012
477
188
Simply outstanding work! This is the fourth GermainZ Xposed module that has earned a permanent place on my phone (out of only 11 total that have earned such distinction).

SUGGESTION: Revise the OP to state something like:
“This will not prevent notifications from being cleared by the application when you click on them. It simply prevents them from being cleared when you click 'clear all'."

WHY DO I SUGGEST THAT:
The average non-sophisticated user (like me), relates the word “pinned” to things like pinning an app to status bar in windows or pinning a post to the top of a forum....or even in the old days pinning a paper note on a corkboard. In all those cases, it stays pinned there until you deliberately unpin it. You have explained several times in the thread already why that’s not the case for notifications, but I’ll bet you’ll be answering that same question again and again if you don’t put it in the op. I read where you said "to prevent accidentally clearing", but that didn't tell the whole story for a simple minded person like me who expected it to remain pinned until deliberately unpinned.

Thanks again for all your great modules.
 
Last edited:
  • Like
Reactions: GermainZ

GermainZ

Inactive Recognized Developer / Retired Forum Mod
Aug 3, 2012
6,170
8,805
Simply outstanding work! This is the fourth GermainZ Xposed module that has earned a permanent place on my phone (out of only 11 total that have earned such distinction).

SUGGESTION: Revise the OP to state something like:
“This will not prevent notifications from being cleared by the application when you click on them. It simply prevents them from being cleared when you click 'clear all'."

WHY DO I SUGGEST THAT:
The average non-sophisticated user (like me), relates the word “pinned” to things like pinning an app to status bar in windows or pinning a post to the top of a forum....or even in the old days pinning a paper note on a corkboard. In all those cases, it stays pinned there until you deliberately unpin it. You have explained several times in the thread already why that’s not the case for notifications, but I’ll bet you’ll be answering that same question again and again if you don’t put it in the op. I read where you said "to prevent accidentally clearing", but that didn't tell the whole story for a simple minded person like me who expected it to remain pinned until deliberately unpinned.

Thanks again for all your great modules.
Added:
This will not prevent notifications from being cleared by the application when you open them, and the application can still control the notification at any time (including clearing it). It simply prevents them from being cleared when you tap the "clear all" button or when you try to swipe them away.
 
  • Like
Reactions: electricpete1

marbulas

Senior Member
Mar 22, 2011
863
290
Seoul
@GermainZ
How about setting toe priority of notifs?
This module can pin them but not make them the top of lists of notif panel.
(ongoing notifs goes there usually as we know)
 

bagarwa

Senior Member
Feb 18, 2012
1,193
2,748
Bothell
play.google.com
Feature request

Currently tapping any pinned notification removes it from the shade. :( Can we have an option where the notification will stay pinned even after taps and will get removed ONLY when it is un-pinned? That would be great.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 38
    Introduction
    This module allows you to pin important notifications to avoid clearing them by mistake. You do that by long pressing a notification then selecting "Pin." You can unpin pinned notification in a similar manner.
    This will not prevent notifications from being cleared by the application when you open them, and the application can still control the notification at any time (including clearing it). It simply prevents them from being cleared when you tap the "clear all" button or when you try to swipe them away.
    Originally requested here: http://www.reddit.com/r/xposed/comments/267hbt/request_pin_any_notification_so_that_it_cannot_be/

    Download
    http://repo.xposed.info/module/com.germainz.pinnotif

    Source Code
    https://github.com/GermainZ/PinNotif

    Notes
    • I have to override the long press menu for the notifications. In other words, if your ROM adds custom items, those will be lost.
    • This module is not compatible with XHaloFloatingWindow's feature that alters the notification long press menu. If you enable both, there's no guarantee which will override the notification menu first, so you might end up with XHaloFloatingWindow's long press menu (App Info/Open In Halo) or this module's (App Info/Pin.)
    • The goal of this module is to pin important notifications - not pin/unpin any notification at will. As such, ongoing notifications cannot be unpinned. This is by design.

    Changelog:
    1.3:
    • Compatibility fixes for 4.1.x and LG devices.
    1.1:
    • Compatibility fixes for pre-4.3 devices.
    • Don't fail when the notification contains large data (e.g. large icon.)
    • Other crash fixes.
    1.0:
    • Initial release.

    Attributions
    Icon made by Freepik from www.flaticon.com.

    Thanks
    • rovo89 and Tungstwenty for the Xposed framework;
    • zst123 for XHaloFloatingWindows from which this module takes some code.
    2
    Does the pinning survive a reboot?

    Sent from my Nexus 4 using XDA Free mobile app
    2
    Unfortunately, System UI has stopped. - Still doesn't work on SGNII 4.1.2 if I select App Info instead Pin/Unpin.
    Pin/Unpin works.
    Is it enough?
    I need your SystemUI.apk as well, please. It's usually in /system/app/ or /system/priv-app/.
    Alright, try the attached build and let me know if it works. If not, I need a log as before.
    It might be cm specific. I'm on beanstalk but I know it isn't on the new slim (or wasn't a while back).
    I'll look into it once the compatibility bugs are fixed.
    1
    I'd just like to let the dev know that I spent the last 2.5 hours attempting to recover my device which was stuck in a loop of "Unfortunately, system UI has stopped" messages every 2 seconds.

    I was about to perform a factory reset and repeatable flash my entire ROM, but thankfully I doubt a way to disable this module from TWRP. Even so, I had to go through a series of file deletes and a couple dozen reboot cycles to determine that this module was the one causing problems.

    This message is also for anyone that happens to stumble upon it before enabling this module to spare them stress. I am on a rooted OnePlus One with TWRP on COS 13.1 based on Android M and Xposed Framework v85.

    If the dev could please write a note in the module description warning about boot loops on Android M, I think that would be great. Thanks.


    +1.
    Went through the same just now.


    did uninstalling this app solve the crashing?
    i disabled xposed and the uninstalled this.still getting systemui crashes


    EDIT:turns out it was actually not uninstalled.Thought xposed installer did it.