Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android local fs implementation #933

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from

Conversation

ieugen
Copy link

@ieugen ieugen commented Jan 11, 2023

Got directory listing, file read/write and create working in the emulator.

Code is very messy and has lots of alert() calls for debugging.
Maybe we should add a log page for the app where we can log debug messages ?!

Next steps are to finish implementation, test and clean up the code.

I use this to build and start the app in the emulator

yarn build && rm -rf release/* && cp -r build/* release/ && ls -la release/ && npx cap run android

Closes #932

* Android app loads in emulator
* android tools to 7.3.1
* manifest namespace recommendation
* Dropped external capacitor plugins - not stable / usable
* Using custom Android plugin with Storage Access Framework
* Able to pick directory and list directory contents
* Interactions do not work, need to see why
@ieugen ieugen marked this pull request as draft January 11, 2023 09:51
@munen
Copy link
Collaborator

munen commented Jan 13, 2023

ieugen BIG congratulations to your success! From the screenshots, it looks like this feature is ready to go! 🎊

It would be good if anyone with an Android device can review it. Unfortunately, that's not me. Maybe @branch14 or @schoettl?

@branch14
Copy link
Member

I'll check this out later today. Looking forward to it. :)

@munen
Copy link
Collaborator

munen commented Jan 14, 2023

@branch14 Nice! If you want a pairing dude who has no clue of Android, call me in^^

@ieugen ieugen marked this pull request as ready for review January 14, 2023 10:16
@ieugen ieugen changed the title [WIP] Android local fs implementation Android local fs implementation Jan 14, 2023
@ieugen
Copy link
Author

ieugen commented Jan 14, 2023

I think the code is ready to merge and test.
We can fix any issues as they come.

@ieugen
Copy link
Author

ieugen commented Jan 14, 2023

I published the apk here for testing: https://github.com/ieugen/organice/releases/tag/android-local-fs.v1 .
cc @branch14

@ieugen
Copy link
Author

ieugen commented Jan 16, 2023

  1. There is an issue with caching:
    I had a conflict with a syncked file: cumparaturi.org
    I resolved the file in syncthing by restoring it on my PC and that created a second file for the old data file on phone: comparaturi-.org
    For some reason, organice was showing cumparaturi-.org contents whenever I wanted to open my cumparaturi.org file.

I believe (at least) directory listing is cached and it should not be this way. ?!

  1. There should be a way to chose another storage implementation without clearing the cache and all data.
    This makes a lot of sense for Android.
  2. We could use organice as a target to open an org files, so I can 'Open with organice' a file ?!

@munen
Copy link
Collaborator

munen commented Jan 16, 2023

I believe (at least) directory listing is cached and it should not be this way. ?!

In organice (on master), directory listing is not cached. Files are, directories are not. I'm not aware if this logic has changed in any of the later pull requests to develop.

@ieugen
Copy link
Author

ieugen commented Dec 23, 2023

I've been using my Android build for ~50 weeks now for weekly meal planning + grocery shopping.
Any chances the code is going to be merged in organice main?
And maybe released ?

I am asking because I have seen a couple of people asking for something like this. latest one is https://mas.to/@[email protected]/111626626576736657

My workflow is as follows:

  • I make a list on computer when we plan.
  • I sync the whole org dir using syncthing to my android phone
  • I check the items on my phone while I shop
  • Files are synced back to computer while Syncthing is running

A week (48) looks like this (for the curios)

** DONE S48
*** DONE Mâncare [0/1]
**** Mic dejun [2/2]
- [X] Ovăz cu fructe confiate
- [X] [[id:015512ab-930b-405f-9b5b-ab27e5c6a445][Chec aperitiv]]
**** Prânz / seară [3/3]
- [X] [[id:62d82506-5df0-436f-8ed4-722380f7581f][Pulpe de pui cu gutui la tigaie]] - 4-5 porții
- [X] [[id:86c94454-719e-40f0-b0b3-82fa6629dfd7][Salată orientală]] - 4-5 porții
- [X] [[id:b2df5272-6ba2-4994-98b0-e46258a0293a][Supă cremă de legume cu ardei copți]] - 6 porții
*** DONE Cumpărături [16/19]
- [X] Hârtie igienică
- [ ] Mâncare căței
- [X] 1/2 Pâine ?!
- [X] 300ml smântână
- [X] 10 ouă
- [X] 200g Șuncă de praga
- [X] Cașcaval (Gouda de la Lidl ?)
- [X] 1 pachet unt
- [X] 1 legătură pătrunjel
- [X] 500g morcovi
- [X] 300g păstârnac
- [X] 5kg Cartofi
- [X] 3 ardei colorați diferit
- [X] 1 dovlecel
- [X] 2 legături ceapă verde
- [X] 1 borcan ardei copți
- [ ] 1 borcan capere
- [ ] 150g măsline fără sâmburi, mix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants