orgzly-android

Table of Contents

1. orgzly-android

1.1. Android Architecture Components

https://developer.android.com/topic/libraries/architecture
orgzly-android/app/schemas/com.orgzly.android.db.OrgzlyDatabase/

1.3. Sourcetrail

/usr/local/android-studio/jre/jre/lib/amd64/server/libjvm.so → preferences

1.4. Android Studio Setup

# You have to accept licenses manaually
cd ~/Android/Sdk/tools/bin/
export JAVA_HOME=/usr/local/android-studio/jre/jre
./sdkmanager --licenses

1.5. gradle cache

Sometimes the build fails
rm .gradle/x.y.z in the repo
Also rm ~/.gradle
Files>Invalidate cache and restart

1.6. build fails mergning with master

I had a build working with configurable-file-root, so I know it should work
git revert 7c6b75f6 worked (?)

1.7. Configurable root orgzly

Idealmente, interpertar ~ como /storage/emulated/0 porque los links relativos no van a funcionar si estoy en una subcarpeta (en org/roam es ../../Documents), si no tomar convenio de que estará en Inbox.org
Si hago todos los links por id en vez de por file, entonces no haría falta reemplazar nada (sólo reemplazar los links file: → id:) porque los links a los org funcionarían siempre
Si hago que todo sea un recurso, entonces puedo aplanar la estructura y esto ya no hace falta

1.8. Test org-protocol links / build something with them

org-protocol://org-id-goto?id=e95d62e7-b012-492d-8516-31d9e4a10e02

https://github.com/orgzly/orgzly-android/blob/master/app/src/main/java/com/orgzly/android/ui/main/OrgProtocol.kt

private const val ORG_PROTOCOL = "org-protocol"

private const val ORG_ID_GOTO = "org-id-goto"
private const val ORG_SEARCH = "org-search"
private const val ORGZLY_SEARCH = "orgzly-search"

private const val ID_PARAM = "id"
private const val Q_PARAM = "q"

1.9. Resolve orgzly merge conflicts for 1.8.6   project hold_20230330

NoteViewModelFactory has packed its arguments

bookId, noteId, place, title, content → initialData: NoteInitialData
bookId, noteId, place, title, content, attachmentUri → initialData: NoteInitialData

constructor

1.10. Add “publicly-accessible” receive   project try someday_20230330

https://github.com/orgzly/orgzly-android/pull/878
Exposes a lot of internal intents, which means a lot of (potential) automation
Useful to automate stuff with Android Auto

1.11. DONE review org-attachment PR

First option (link)
file: does not work with all files, for example ogg voicenote, pdf, apk
the second option
works ok, however i would like a file: link which also copies
the third option
does not copy correctly the file, there is a mismatch between path and link
99683722-CC47-4B70-89AF-6B134942438F99/683722-CC47-4B70-89AF-6B134942438F/file
(no term)
include screencast using scrcpy

1.12. DONE Review org-attachment changes

  • [ ] by allowing any kind of file type for the link method.
  • [ ] For the second option, “file:” link prefix should have been used instead of “attachment:” link prefix. Also added the surrounding brackets which fixed for spaces in filenames.
  • [ ] This path translation is actually expected of the org-attach behavior

1.13. DONE Launch activity when termux is closed on Android 10

Using Termux:Float works sometimes
I still get manual sync notifications, doesn’t work when the phone is locked
https://stackoverflow.com/questions/60767216/how-to-trigger-a-launch-activity-intent-when-my-app-is-closed-on-android-10-q
Then syncs wouldn’t have to be manual

1.13.1. DONE TermuxAm issue to open activity when termux is closed

1.13.2. CANCELLED Rootear el teléfono

1.13.3. DONE Otras soluciones menos drásticas

https://www.reddit.com/r/tasker/comments/dl47bt/tasker_android_10_starting_activities_without/

  • Draw over other apps
    Parece ser que marcando esta para termux, ya puede disparar notificaciones desde atrás
  • Notification Access
  • Accessibility Access
  • Device Admin

Author: Julian Lopez Carballal

Created: 2024-11-06 mié 12:53