Springe zum Hauptinhalt

iCAL STATUS Support In Fossify Android App

Using shared calendars with my wife is a very productive aspect of todays digital tools. As we coordinate more and more things in this domain, I have learned to love the STATUS property of iCalendar entries. It immediately tells me if a calendar entry is a reafl, fixed and confirmed entry or if it is just a blocker so that other planning can take into account that the dates are not yet finalized. The usual calendar apps (NextCloud Calendar, Thunderbird, Fossify) display this information in an intuitive manner, but I found out that the Android app fossify (fork from simple-tools), does not allow editing this property of an entry.

Whenever I need something in a Free Software project, but it is not there, I eventually come to the conclusion that I could implement it myself if I need it "bad enough".

So let's find out how Free Software empowers the users with this example.

Searching GitHub, we quickly find the GitHub Fossify repository. Cloning it onto our local machine is easy:

dzu@krikkit:/opt/src/git$ git clone https://github.com/FossifyOrg/Calendar.git
Cloning into 'Calendar'...
remote: Enumerating objects: 76437, done.
remote: Counting objects: 100% (1181/1181), done.
remote: Compressing objects: 100% (293/293), done.
remote: Total 76437 (delta 816), reused 1128 (delta 782), pack-reused 75256
Receiving objects: 100% (76437/76437), 131.78 MiB | 16.21 MiB/s, done.
Resolving deltas: 100% (43789/43789), done.
dzu@krikkit:/opt/src/git$ cd Calendar
dzu@krikkit:/opt/src/git/Calendar (master)$

Let's use the GitHub cli tool gh to look at the pull requests:

dzu@krikkit:/opt/src/git/Calendar (master)$ gh pr list

Showing 7 of 7 open pull requests in FossifyOrg/Calendar

ID    TITLE                                       BRANCH                                     CREATED AT       
#204  Fixed dimming incomplete past tasks in ...  Aga-C:fix-dim-past-tasks                   about 13 days ago
#200  Initial support for event STATUS attribute  myxor:status_attribute                     about 13 days ago
#186  Corrected widget's event list button to...  apoumier:fix-event-list-widget-gototod...  about 22 days ago
#183  long click->new Event on day in month view  gitmacer:LongClickForNew                   about 26 days ago
#178  Translations update from Hosted Weblate     weblate:weblate-fossify-calendar           about 29 days ago
#176  [Holiday generator] Generate all holida...  tswistak:holiday-generator-timezone-fix    about 1 month ago
#173  Holidays update                             create-pull-request/patch                  about 1 month ago
dzu@krikkit:/opt/src/git/Calendar (master)$

Ok, we want to test #200, so let's check it out into our work tree:

dzu@krikkit:/opt/src/git/Calendar (master)$ gh pr checkout 200
remote: Enumerating objects: 110, done.
remote: Counting objects: 100% (110/110), done.
remote: Compressing objects: 100% (51/51), done.
remote: Total 110 (delta 41), reused 100 (delta 36), pack-reused 0
Receiving objects: 100% (110/110), 86.28 KiB | 2.78 MiB/s, done.
Resolving deltas: 100% (41/41), completed with 1 local object.
From https://github.com/FossifyOrg/Calendar
 * [new ref]             refs/pull/200/head -> status_attribute
Switched to branch 'status_attribute'
dzu@krikkit:/opt/src/git/Calendar (status_attribute)$ 

Hooray. Now we need to compile and test it on our Android device. With the Debian tools for developing on Android installed, we can attempt building the app for our phone. Gradle does all the heavy lifting here, so let's initialize it by listing the available "targets":

dzu@krikkit:/opt/src/git/Calendar (status_attribute)$ ./gradlew tasks
Downloading https://services.gradle.org/distributions/gradle-8.4-bin.zip
....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Unzipping /home/dzu/.gradle/wrapper/dists/gradle-8.4-bin/1w5dpkrfk8irigvoxmyhowfim/gradle-8.4-bin.zip to /home/dzu/.gradle/wrapper/dists/gradle-8.4-bin/1w5dpkrfk8irigvoxmyhowfim
Set executable permissions for: /home/dzu/.gradle/wrapper/dists/gradle-8.4-bin/1w5dpkrfk8irigvoxmyhowfim/gradle-8.4/bin/gradle

Welcome to Gradle 8.4!

Here are the highlights of this release:
 - Compiling and testing with Java 21
 - Faster Java compilation on Windows
 - Role focused dependency configurations creation

For more details see https://docs.gradle.org/8.4/release-notes.html

Starting a Gradle Daemon (subsequent builds will be faster)

> Configure project :
w: file:///opt/src/git/Calendar/build.gradle.kts:9:21: 'getter for buildDir: File!' is deprecated. Deprecated in Java

> Task :tasks

------------------------------------------------------------
Tasks runnable from root project 'Calendar'
------------------------------------------------------------

Android tasks
-------------
androidDependencies - Displays the Android dependencies of the project.
signingReport - Displays the signing info for the base and test modules
sourceSets - Prints out all the source sets defined in this project.

Build tasks
-----------
assemble - Assemble main outputs for all the variants.
assembleAndroidTest - Assembles all the Test applications.
assembleCore - Assembles main outputs for all Core variants.
assembleDebug - Assembles main outputs for all Debug variants.
assembleFoss - Assembles main outputs for all Foss variants.
assemblePrepaid - Assembles main outputs for all Prepaid variants.
assembleRelease - Assembles main outputs for all Release variants.
assembleUnitTest - Assembles all the unit test applications.
build - Assembles and tests this project.
buildDependents - Assembles and tests this project and all projects that depend on it.
buildKotlinToolingMetadata - Build metadata json file containing information about the used Kotlin tooling
buildNeeded - Assembles and tests this project and all projects it depends on.
bundle - Assemble bundles for all the variants.
bundleCore - Assembles bundles for all Core variants.
bundleDebug - Assembles bundles for all Debug variants.
bundleFoss - Assembles bundles for all Foss variants.
bundlePrepaid - Assembles bundles for all Prepaid variants.
bundleRelease - Assembles bundles for all Release variants.
clean - Deletes the build directory.
compileCoreDebugAndroidTestSources
compileCoreDebugSources
compileCoreDebugUnitTestSources
compileCoreReleaseSources
compileCoreReleaseUnitTestSources
compileFossDebugAndroidTestSources
compileFossDebugSources
compileFossDebugUnitTestSources
compileFossReleaseSources
compileFossReleaseUnitTestSources
compilePrepaidDebugAndroidTestSources
compilePrepaidDebugSources
compilePrepaidDebugUnitTestSources
compilePrepaidReleaseSources
compilePrepaidReleaseUnitTestSources

Build Setup tasks
-----------------
init - Initializes a new Gradle build.
wrapper - Generates Gradle wrapper files.

Help tasks
----------
buildEnvironment - Displays all buildscript dependencies declared in root project 'Calendar'.
dependencies - Displays all dependencies declared in root project 'Calendar'.
dependencyInsight - Displays the insight into a specific dependency in root project 'Calendar'.
help - Displays a help message.
javaToolchains - Displays the detected java toolchains.
kotlinDslAccessorsReport - Prints the Kotlin code for accessing the currently available project extensions and conventions.
outgoingVariants - Displays the outgoing variants of root project 'Calendar'.
projects - Displays the sub-projects of root project 'Calendar'.
properties - Displays the properties of root project 'Calendar'.
resolvableConfigurations - Displays the configurations that can be resolved in root project 'Calendar'.
tasks - Displays the tasks runnable from root project 'Calendar' (some of the displayed tasks may belong to subprojects).

Install tasks
-------------
installCoreDebug - Installs the Debug build for flavor Core.
installCoreDebugAndroidTest - Installs the android (on device) tests for the CoreDebug build.
installFossDebug - Installs the Debug build for flavor Foss.
installFossDebugAndroidTest - Installs the android (on device) tests for the FossDebug build.
installPrepaidDebug - Installs the Debug build for flavor Prepaid.
installPrepaidDebugAndroidTest - Installs the android (on device) tests for the PrepaidDebug build.
uninstallAll - Uninstall all applications.
uninstallCoreDebug - Uninstalls the Debug build for flavor Core.
uninstallCoreDebugAndroidTest - Uninstalls the android (on device) tests for the CoreDebug build.
uninstallCoreRelease - Uninstalls the Release build for flavor Core.
uninstallFossDebug - Uninstalls the Debug build for flavor Foss.
uninstallFossDebugAndroidTest - Uninstalls the android (on device) tests for the FossDebug build.
uninstallFossRelease - Uninstalls the Release build for flavor Foss.
uninstallPrepaidDebug - Uninstalls the Debug build for flavor Prepaid.
uninstallPrepaidDebugAndroidTest - Uninstalls the android (on device) tests for the PrepaidDebug build.
uninstallPrepaidRelease - Uninstalls the Release build for flavor Prepaid.

Verification tasks
------------------
check - Runs all checks.
checkJetifier - Checks whether Jetifier is needed for the current project
checkKotlinGradlePluginConfigurationErrors - Checks that Kotlin Gradle Plugin hasn't reported project configuration errors, failing otherwise. This task always runs before compileKotlin* or similar tasks.
connectedAndroidTest - Installs and runs instrumentation tests for all flavors on connected devices.
connectedCheck - Runs all device checks on currently connected devices.
connectedCoreDebugAndroidTest - Installs and runs the tests for coreDebug on connected devices.
connectedFossDebugAndroidTest - Installs and runs the tests for fossDebug on connected devices.
connectedPrepaidDebugAndroidTest - Installs and runs the tests for prepaidDebug on connected devices.
deviceAndroidTest - Installs and runs instrumentation tests using all Device Providers.
deviceCheck - Runs all device checks using Device Providers and Test Servers.
lint - Runs lint on the default variant.
lintCoreDebug - Print text output from the corresponding lint report task
lintCoreRelease - Print text output from the corresponding lint report task
lintFix - Runs lint on the default variant and applies any safe suggestions to the source code.
lintFossDebug - Print text output from the corresponding lint report task
lintFossRelease - Print text output from the corresponding lint report task
lintPrepaidDebug - Print text output from the corresponding lint report task
lintPrepaidRelease - Print text output from the corresponding lint report task
test - Run unit tests for all variants.
testCoreDebugUnitTest - Run unit tests for the coreDebug build.
testCoreReleaseUnitTest - Run unit tests for the coreRelease build.
testFossDebugUnitTest - Run unit tests for the fossDebug build.
testFossReleaseUnitTest - Run unit tests for the fossRelease build.
testPrepaidDebugUnitTest - Run unit tests for the prepaidDebug build.
testPrepaidReleaseUnitTest - Run unit tests for the prepaidRelease build.
updateLintBaseline - Updates the lint baseline using the default variant.

To see all tasks and more detail, run gradlew tasks --all

To see more detail about a task, run gradlew help --task <task>

BUILD SUCCESSFUL in 1m 38s
1 actionable task: 1 executed
dzu@krikkit:/opt/src/git/Calendar (status_attribute)$ 

Ok, connecting our phone with debug enabled, we can compile and push the application:

dzu@krikkit:/opt/src/git/Calendar (status_attribute)$ export ANDROID_HOME=/usr/lib/android-sdk
Sie haben neue Post in /home/dzu/Maildir/.
dzu@krikkit:/opt/src/git/Calendar (status_attribute)$ ./gradlew installCoreDebug
Starting a Gradle Daemon (subsequent builds will be faster)

> Task :app:installCoreDebug
Installing APK 'calendar-4-core-debug.apk' on 'VTR-L09 - 9' for :app:core-debug
Installed on 1 device.

BUILD SUCCESSFUL in 27s
40 actionable tasks: 2 executed, 38 up-to-date
dzu@krikkit:/opt/src/git/Calendar (status_attribute)$ 

Summary

It took some time, but we were finally able to connect our microcontroller to the simcom modem.

Kommentare

Comments powered by Disqus