andstatus / todoagenda

Android home screen widgets showing future (and past) calendar events and tasks
Apache License 2.0
130 stars 19 forks source link

loose tasks in widget #115

Open Joppla opened 1 year ago

Joppla commented 1 year ago

Hi, Everytime I loose the tasks in the widget. If I remove the app and reinstall it, they are back. But it is not the purpose of the app I presume.

yvolk commented 1 year ago

Hello @Joppla ! The widget shows those tasks that your "Tasks app" (one of supported by the widget) provides to it. The widget doesn't store tasks anywhere, doesn't cache them. Each time you update the widget, the widget retrieves the list of tasks from a tasks app. This means that your tasks can be "lost" anywhere between the interface, where you created them, in the "tasks app", in the widget code, and in the "Launcher app" that actually shows all Android widgets (including the "ToDo Agenda" widget).

If you want your case to be analyzed and maybe even fixed, much more information and tests from your side are needed.

As an example of one of possible problems (of showing tasks...) that we investigated recently, please see https://github.com/andstatus/todoagenda/issues/108

Joppla commented 1 year ago

hi @yvolk,

I m happy to hear that you want to try to analyse the problem.

I was using your app on my previous phone (Samsung S9) where it was working without any problems. That's the reason I like to use it again.

First I will tell you which apps I use:

Underneath you see the settings in my app. Niet gevonden = not found In the Open Task app I see the tasks and is it updated to the server.

Which tests or information do you need more?

Screenshot_20230215-090947_1

yvolk commented 1 year ago

@Joppla Could you start from reading https://github.com/andstatus/todoagenda/issues/108 and doing what we did ther

  1. Check and note a list of permissions ToDo Agenda app has, when it works correctly.
  2. When you don't see tasks: 2.1. please check permissions again and note them. 2.2. Try to disallow and then allow permissions as I described in https://github.com/andstatus/todoagenda/issues/108#issuecomment-1354711994
Joppla commented 1 year ago

Ok, I did this:

  1. There are two permissions mentioned, -Agenda and -Tasks, both were allowed.
  2. I disallowed both the permission.
  3. I refresh the widget
  4. Got message about permissions
  5. I allowed permissions for -Agenda and -Tasks
  6. Refresh the widget
  7. Only the Agenda items are shown on the widget, not the Tasks
  8. In the settings are the Tasks still "not found".
  9. In the settings I un-cheked the "not found" items.
  10. I refreshed the widget
  11. In the settings the items are not shown any more, see screenprint below.
  12. I disallow and allow the permissions for tasks again
  13. No difference in the settings
  14. I removed the widget
  15. I replaced the widget
  16. Still the same

What is left is to uninstall the app and reinstall it, but that is just what I don't want to do every time. Or do you have other suggestions?

Screenshot_20230215-114320

yvolk commented 1 year ago

How often do you have tasks disappearing? Did you notice any coincidence with any other events?

You can backup your widget settings as text (JSON) and restore them later, e.g. for another widget: Settings -> Feedback and Backup -> Backup settings (below it is "Restore settings from a backup")

yvolk commented 1 year ago

@Joppla I just thought that maybe this is Android system that disables some permissions when it thinks that app is unused?! See https://developer.android.com/about/versions/11/privacy/permissions

Joppla commented 1 year ago

How often do you have tasks disappearing? Did you notice any coincidence with any other events?

I just reinstalled the app, it was the 5th time in about two weeks. My phone is quite new, so I play a lot with settings of the phone. Not with the settings of the todo app. I also I reboot quite often. But I cannot connect it with a event.

You can backup your widget settings as text (JSON) and restore them later, e.g. for another widget: Settings -> Feedback and Backup -> Backup settings (below it is "Restore settings from a backup")

I know, should be worse if that isn't possible 😉

yvolk commented 1 year ago

@Joppla So far this looks like a bug of concrete Android system / firmware / version... I couldn't reproduce this on my devices (I have Android 7, 12 and 13 on them...)

yvolk commented 10 months ago

Hello @Joppla! Do you have any updates on this?

I decided to look at this again, test disabling/enabling permissions as you did. Oops, and I see that I already did this test. And tasks reappeared after re-enabling permissions, please see here: https://github.com/andstatus/todoagenda/issues/108#issuecomment-1354711994

yvolk commented 10 months ago

@Joppla in v.4.8.0 I improved permissions checks, this may help figuring out, what is wrong Please see https://github.com/andstatus/todoagenda/issues/80#issuecomment-1875279598

yvolk commented 10 months ago

Another reason why Tasks may disappear from a widget: https://github.com/andstatus/todoagenda/issues/66

Joppla commented 10 months ago

Just back home, I will review your remarks in the coming days.

2 jan. 2024 11:24:25 Yuri Volkov @.***>:

Hello @Joppla[https://github.com/Joppla]! Do you have any updates on this?

I decided to look at this again, test disabling/enabling permissions as you did.

— Reply to this email directly, view it on GitHub[https://github.com/andstatus/todoagenda/issues/115#issuecomment-1873843428], or unsubscribe[https://github.com/notifications/unsubscribe-auth/AGCJXNOYYX3YDURQKYE2P7TYMPN5PAVCNFSM6AAAAAAUYWOZXGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZTHA2DGNBSHA]. You are receiving this because you were mentioned. [Tracking afbeelding][https://github.com/notifications/beacon/AGCJXNLVKJIGN3LZ5E5QRZ3YMPN5PA5CNFSM6AAAAAAUYWOZXGWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTPWCKOI.gif]

Joppla commented 10 months ago

At this moment I haven't problems with the widget. Except that I got an error if I click on a task in the widget. In that case the OpenTasks-app doesn't open / close immediately. But for that I have to make a new issue once.

For your information, the phone is now updated to Android 13, maybe that helped.

yvolk commented 10 months ago

I'm testing with Android 13 mostly - it works. Maybe you have wrong default app chosen... Open with Tasks

Joppla commented 10 months ago

Maybe you have wrong default app chosen...

Maybe, how to check it? Or where to change it?

yvolk commented 10 months ago

Maybe you have wrong default app chosen...

Maybe, how to check it? Or where to change it?

Please look e.g. here: https://www.androidauthority.com/change-default-apps-android-2-633572/

Joppla commented 10 months ago

The OpenTasks is correct connected in my opinion. The first time when click on a task in the widget "nothing" happened. The second time I got the error message "OpenTasks stopt steeds" (="OpenTasks keep stopping"). That suggest that there is a correct connection to OpenTasks, but in the communication between the apps something fails. Seems me. But it can also be at the side of OpenTasks.

If you can't find it isn't a problem. I don't use it often.

yvolk commented 10 months ago

@Joppla This looks like an old bug in OpenTasks (or maybe they fixed it and you need to update it...). Please see https://github.com/andstatus/todoagenda/issues/69

Joppla commented 10 months ago

Hi,

I saw that OpenTasks is not developed anymore. I had the latest version. I changed to Task.Org and that seems to work.

Only to find out how to change the color of the "v" before the task in the widget.

9 jan. 2024 16:44:12 Yuri Volkov @.***>:

@Joppla[https://github.com/Joppla] This looks like an old bug in OpenTasks (or maybe they fixed it and you need to update it...). Please see

69[https://github.com/andstatus/todoagenda/issues/69]

— Reply to this email directly, view it on GitHub[https://github.com/andstatus/todoagenda/issues/115#issuecomment-1883294640], or unsubscribe[https://github.com/notifications/unsubscribe-auth/AGCJXNMH6Y6PKO75UPTO2HDYNVQUVAVCNFSM6AAAAAAUYWOZXGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOBTGI4TINRUGA]. You are receiving this because you were mentioned. [Tracking afbeelding][https://github.com/notifications/beacon/AGCJXNJ6G7O5BPVSC4IYD33YNVQUVA5CNFSM6AAAAAAUYWOZXGWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTQIDF3A.gif]