Sadly, restarting Android support doesn’t work for me on my XA2. I’ve also tried toggling airplane mode, restarting network services in settings/utilities and disabling wifi and mobile data and then reenabling just mobile data with wifi left disabled. None of that helps. For a while I had the mobile data protocol set to IP (v4) only and just restarting network services worked, but now, at least where I am in the UK, EE mobile data only works with ipv6, and now only a full reboot restores mobile data in Android apps.
Yeh, sorry, I forgot that sqlite3
is not installed by default, follow the advice from @amaretzek to install it. Then, does it happen that you have several “default” calendars ? Anyway, QML calendar bindings which are responsible to expose the (first) calendar marked as default should not return a default calendar that is invisible (unselected in the manage calendar page of the application). I’ll wait to better understand your case before submitting a PR correcting this particular behaviour.
About SQLite, it is a kind of “local” database. It is providing a database access to information stored in a single file. The library, that allows programs to access such information is of course installed on the system and used by many processes in SailfishOS, but also classical desktop Linux. The sqlite3
executable is a command line tool to access an SQLite database.
I’m not sure there’s a bug at all.
OP has already shown to be somewhat unable to troubleshoot their own problem.
I can confirm that the calendar chosen for an entry becomes the default calender when creating the next.
I can NOT confirm that this slips back after a reboot.
But could it have something to do with connectivity, since OP seems to have problems there as well? Maybe if the remote calendar is deemed terminally unavailable by the system, it falls back on the local?
Is the calendar synced properly at all?
I cannot confirm this. One of my calenders is named “Default” though.
So, after intstalling sqlite (thank you @dcaliste and @amaretzek) and running the requested commands I get:
Default | 0
Birthdays | 0
Personal | 0
Steve | 512
Karen | 0
Contact birthdays | 0
Nextcloud Tasks | 0
This would seem to be as @dcaliste hoped it would be?
Niether am I, which is why I did not report it as such. It may be the way it is supposed to work, but without any documentation or in-app help text how am I supposed to know?
I do the best I can with the limited technical knowledge about SFOS that I have. We can’t all be as brilliant as you. But then again, isn’t that what this forum is for - to share knowledge, ideas and help with SFOS?
Like many other users, I have had problems with connectivity on SFOS for years now and across many releases. There numerous bug reports on this forum attesting to these problems. But yes, its possible that if, for whatever reason SFOS can’t ‘see’ the Nextcloud calendar at the time I try to create a new event, it will fall back to using the only calendar it can ‘see’ (i.e. the local one). Maybe my observation that this issue occurs after a reboot is just a coincidence, or maybe when I try to create a calendar item immediately after a reboot the connection with the Nextcloud calendars has not yet been made (i.e. perhaps I have been trying to soon). As you so eloquently put it, my troubleshooting skills and ability are somewhat limited by my lack of technical knowledge.
If you mean the Nextcloud calendars - yes, they all sync fine and reliably.
I’ve checked again and observed two things.
Firstly that a Nextcloud calendar on the Settings/Nextcloud Account page which is unselected (and therefore presumably not sync’ed) is shown as available on the ‘Manage Calendar’ setting in the calendar app and can therefore be used to create new events in (see screenshots below for the Nextcloud ‘Personal’ calendar).
Secondly that, as described above, the on-device ‘Personal’ calendar appears sometimes (though, following all the posts above I am less clear of the circumstances) as the selected default calendar when creating a new event, even though it is deselected in the ‘Manage Calendars’ setting.
Ok, so the database is sane. No issue from that side. When you reboot, may you check that the default calendar is still “Steve”, or at least not “Default” ?
on the Settings/Nextcloud Account page which is unselected (and therefore presumably not sync’ed) is shown as available on the ‘Manage Calendar’ setting in the calendar app
Yep, as far as I remember, this is by design. Meaning that unchecking the calendar in the Nextcloud account setting page, is indeed stopping the calendar being synced. But if the calendar was previously synced and thus exist on the device, it is still possible to use it. It will act as a local calendar as long as it is kept unchecked in the setting page.
Secondly that, as described above, the on-device ‘Personal’ calendar appears sometimes (though, following all the posts above I am less clear of the circumstances) as the selected default calendar when creating a new event,
That’s an issue. In the event creation dialog, tapping on the calendar combo box can only list checked calendars (from the manage calendar in-app page), but there’s nothing in the code that restrain the initial value of the combo box to display a non-visible calendar. This initial value (bug excepted) is the default calendar as stored in the calendar database. If this default calendar is unchecked, it will be shown anyway. Which is a bad behaviour. I need to write a PR about this.
But before doing this, I would like to understand how you can end-up with a default calendar that is unchecked. Because the only way to setup the default calendar is to create an event and the chosen calendar will become the new default. But, it’s only possible to choose a checked calendar…
Regardless of how this happens (I will do some more testing when I have a little bit more time - I actually need to do some paid work now!), I think a point here is that, when this does happen, I am not actually choosing or selecting which calendar to put the new event in but simply ignoring that drop-down selection field altogether. So the event goes in whichever calendar the system has chosen for me ‘by default’. You can say that this is my fault or laziness, and that had I specifically selected the right calendar (‘Steve’) every time I created an event this problem would never occur.
The reason for the the existence of this thread in the first place was that, for me, ‘Steve’ was sometimes ending up as on-device ‘Personal’ as the target calendar for the new event without me having done anything to change it. Hence the desire to have some method of explicitly setting what I wanted my default calendar to be.
Whilst having SFOS remember the last calendar used as the ‘current default’ is a solution (provided it works of course) you still really need to check that its the right one each time. For example, I occasionally put entries in my wife’s (Karen) calendar for her. If I do this, then ‘Karen’ becomes the new ‘current default’ for me and next time when I want to put a new event in my own calendar I now have to remember to change it back to ‘Steve’ otherwise ‘Karen’ will find herself going to a rugby match or something!
So, in my view, the functionality would be much better if I could explicitly and persistently set my default calendar to ‘Steve’ so that I could fire-and-forget the vast majority of new entries into this calendar and only have to change it temporarily for a new event I wished to put into another calendar (‘Karen’).
You can say that this is my fault or laziness, and that had I specifically selected the right calendar (‘Steve’) every time I created an event this problem would never occur.
Not at all. It’s the system fault. There is a bug that makes the system presents to you the wrong default calendar. As far as I’m concerned, I never choose the calendar, it’s (almost) always the right “default” (which is not the local Default calendar). I can easily cure the symptom of this bug by modifying the QML binding function not to ever return the default calendar as an unchecked one. But before doing this, I would prefer to understand the root cause of this bug: how can the default calendar be stored as an unchecked calendar. Sadly, I cannot reproduce.
So, in my view, the functionality would be much better if I could explicitly and persistently set my default calendar to ‘Steve’ so that I could fire-and-forget the vast majority of new entries into this calendar and only have to change it temporarily for a new event I wished to put into another calendar (‘Karen’).
I see your point. The system tries to be smart by setting the last used calendar as the default. Like that, it helps to expose less options to the user (less code maintainance and less chance of breakage). But it’s not as convenient as it could be.