Skip to content

Organice Android local storage access in android native app #932

Open
@ieugen

Description

@ieugen

This issue is to enable organice running as a native Android app to provide access to local files.
IOs should be added later, but is out of scope for this (I don't know IOs).

Workflow should be like this:

  • User opens the native file picker dialog to choose a directory where org files live
  • (optional) organice will store that location for future use
  • organice will read and write org files to that location - the same flow as for web

I believe native android with local storage is achievable.

There is prior work on organice develop branch.
It uses capacitor-js to build a native Android version of organice.
organice runs in a web view and should be able to access native Android (and IOs) filesystem API's via capacitor plugins.

I tried to implement the code with some success using https://github.com/ionic-team/capacitor-plugins/tree/main/filesystem plugin and https://github.com/capawesome-team/capacitor-file-picker .

I managed to create and read files but not control exactly where to put them and also did not manage to use the right native open file dialog (use SD card or other providers) .

I talked with one friend who is familiar with Android dev and also did some checking and I published my findings as comments on

I think the easiest solution for us long term would be to implement our own capacitor plugin with and API specific to organice.
I believe the Android Java code will be easy to maintain and port to something else then capacitor if there is ever the need.
Also the API surface is small.

The downside of this approach is that the IOs interface should be developed separately (by someone who knows this part)

Related issues:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions