NotificationNotes icon indicating copy to clipboard operation
NotificationNotes copied to clipboard

Does not restore notifications after phone reboot and even after starting app

Open p5n opened this issue 7 years ago • 7 comments

Does not restore notifications after phone reboot and even after starting app. It is needed tap off/on to put them back to notification bar.

(Android 4.0.4)

p5n avatar Jul 10 '17 10:07 p5n

I tested this with Android 6.0.1 phone and with Android 4.0.3 emulator, and restoring of the notes after reboot worked for me in both. Do you have the latest version (1.5) of the app installed?

khuttun avatar Jul 23 '17 14:07 khuttun

Yes, it is 1.5 version.

I can also reproduce it without reboot:

  • add some notes
  • go to app manager and force application stop
  • start it again
  • notification bar still empty however application shows switched on notes

p5n avatar Jul 24 '17 07:07 p5n

I have the same "problem". But not after reboot! I still have a note created and enabled ...

  1. go to app manager and force application stop
  2. start app again
  3. notification bar still empty however application shows switched on notes

mesophoniac avatar Jul 24 '17 16:07 mesophoniac

I have added in NotesListAdapter.java on Line 100 setNotification(n);

Original @Override public void onBindViewHolder(ViewHolder holder, int position) { NotificationNote n = this.notes.get(position); holder.titleView.setText(n.title); holder.textView.setText(n.text); holder.switchView.setChecked(n.isVisible); setNotification(n); }

After FORCE STOP and starting the APP all the enabled (visible) Notes will show in the notification bar

mesophoniac avatar Jul 25 '17 12:07 mesophoniac

I can confirm that "setNotification(n);" fixes this issue.

PS. It fixes for stopping, but does not for reboot. I will test it more.

p5n avatar Jul 25 '17 14:07 p5n

onBindViewHolder is related to displaying the notes list within the app, it's not correct place to call the notification triggering code (setNotification).

When you do the force stop, Android warns you that the app "may misbehave". This is what's happening here, Notification Notes misbehaves as it's force stopped.

I believe the original issue with the rebooting is a different one.

khuttun avatar Jul 26 '17 19:07 khuttun

OS/version: Android 6.0.1 NNotes version: 1.5

Missing notifications after reboot. This kind of behavior seems invariable, rather inconsistent to reproduce with ease. But it still happens (from time to time).

4ut0-M-4t avatar Jul 25 '18 20:07 4ut0-M-4t