Tasks: add tasks app package to PRODID
Closed this issue ยท 2 comments
Currently, we're adding the mutators (the calendar apps that edited an event) to the PRODID like this:
# VEVENT
PRODID:DAVx5/4.2.3.4-ose ical4j/3.2.5 (org.withouthat.acalendarplus)
so that we can see from the ICalendar which calendar app has created the event.
There's no equivalent for tasks and journals. I suggest to add the package name of the used tasks backend to the PRODID like this:
# VTODO
PRODID:DAVx5/4.2.3.4-ose ical4j/3.2.5 (tasks.app.here)
- Move
userAgents
fromEvent
up toICalendar
- Add task app package name from
taskList.provider
totask.userAgents
inAndroidTask.populateTask()
- Extract
ical4android/src/main/java/at/bitfire/ical4android/Event.kt
Lines 213 to 216 in 6d87d43
ICalendar.prodId()
which generates thePRODID
with the userAgents (instead ofvar prodId
). - Call this
prodId()
method inEvent.write()
andTask.write()
- Similarly add jtx Board package name to
- Adapt
PRODID
test inTaskTest.testWrite()
@patrickunterwegs Where should we add the test in JtxICalObjectTest?
@rfc2822 @patrickunterwegs I'm not sure if this is the best way to add jtx Board as an agent:
Is a constant defined somewhere with the package name? Or should it be hardcoded?
Hi @ArnyminerZ , @rfc2822 ,
there's only the authority in a constant available:
const val AUTHORITY = "at.techbee.jtx.provider"
But I think it's better to keep the package name there and I would also leave it just hardcoded as it's the only place where it's needed in the code. ๐
Thank you ๐