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: Change Filepicker #46

Closed
AlessandroW opened this issue May 21, 2021 · 8 comments
Closed

Android: Change Filepicker #46

AlessandroW opened this issue May 21, 2021 · 8 comments

Comments

@AlessandroW
Copy link

AlessandroW commented May 21, 2021

Is it possible to change the filepicker when clicking on +?
The stock filepicker is not the best one for finding .org files.

Edit: Related to #18

On a sidenote: The drawback of a filepicker in general is that you cannot see the #+TITLE when searching.
This makes searching for a file much more cumbersome compared to searching by document title, e.g. implemented in org-roam as org-roam-find-file

I would like to contribute to this project but I have some troubles setting up Android Studio + Flutter + Emulator, especially performance wise. Do you have any resources/advice to make it easier?

@amake
Copy link
Owner

amake commented May 21, 2021

Is it possible to change the filepicker when clicking on +?

I don't think so. The file picker is the system one. As far as I know, there are not multiple system file pickers to choose from. We can't make our own, because by definition we would not have permission to see the filesystem.

On a sidenote: The drawback of a filepicker in general is that you cannot see the #+TITLE when searching.

This will probably never happen with the system file picker because the file would need to be parsed in order to show you the title, and the system will probably never have a built-in Org Mode parser.

This makes searching for a file much more cumbersome compared to searching by document title, e.g. implemented in org-roam as org-roam-find-file

Searching unopened files is possible, assuming the app has been given directory access permission. But I am not currently planning to work on such a thing.

I would like to contribute to this project but I have some troubles setting up Android Studio + Flutter + Emulator, especially performance wise.

Do I understand that you have everything working, it's just slow? For that I can only recommend either

  • Use a physical device instead of an emulator
  • If you must use the emulator, make sure your Android Studio and all SDK packages are up to date, and you've installed HAXM and any drivers your machine needs (see here)
  • If you must use the emulator and none of the above helps, I think your only choice is to upgrade your machine if possible (in particular all these things are RAM intensive; also older CPUs may lack the virtualization features needed for good performance)

@AlessandroW
Copy link
Author

I don't think so. The file picker is the system one.

I see, so I need to differentiate between the file picker and a file manager.

Searching unopened files is possible, assuming the app has been given directory access permission. But I am not currently planning to work on such a thing.

Then this sounds like a thing I could tackle. I'll have a look.

Do I understand that you have everything working, it's just slow? For that I can only recommend either

Yes, it just really slow. I checked again and it should work on my Ryzen 5 2600 with 16 GB RAM, so I'll have a look at the Android Developer docs. Thanks!

@amake
Copy link
Owner

amake commented May 21, 2021

Then this sounds like a thing I could tackle. I'll have a look.

I think it's a pretty big task: not only the actual searching itself (which will have to take place on the native side) but also how to present such a feature in the UI. I suggest the following steps:

  1. Investigating feasibility. This is mostly figuring out what kind of implementation will be needed. Pretty deep knowledge of Dart, iOS, and Android will be required.
  2. Based on your investigation, make a proposal for discussion. This should include UI mockups, as it will be a very big change to the existing UI.

I should also say that in order to continue publishing on the App Store I will require copyright assignment of any code contributions to myself.

@AlessandroW
Copy link
Author

AlessandroW commented May 21, 2021

Oh wow. Thanks for the effort estimate and putting that into perspective.
Then I suggest as next steps:

  • 0. Getting everything up and running.
  • 1. Investigating feasibility.

If we see that it is feasible we can solve the copyright assignment. As long as the project is open source, I don't see a problem from my side with the assignment.

@bradyt
Copy link

bradyt commented May 23, 2021

I have seen mobile development on a PC with only 4 gigs of RAM, and it was a little awkward. To avoid OS-level freezes and crashes, you can avoid having a browser, IDE and emulator open. Even with a text editor and terminals open, you'll want to check how many Dart processes you have explicitly or implicitly spawned, each might be using a few hundred megs of RAM. If there are occasions where you really need to use an IDE and emulator, you can consider quitting out your browser until you're done with that task.

Using software to monitor which apps or processes are using the most RAM may also help find contributors to the issue.

@amake
Copy link
Owner

amake commented May 23, 2021

With 16GB things should be tolerable assuming you don't have tons of other things running.

I did just realize that there's an important point I forgot to mention: be sure to use an x86 system image for your AVD, not an ARM one. That really is night-and-day in terms of speed.

@amake
Copy link
Owner

amake commented May 25, 2021

I would like to close this ticket because changing the file picker is not feasible.

Taking a second look at your other item:

This makes searching for a file much more cumbersome compared to searching by document title, e.g. implemented in org-roam as org-roam-find-file

Searching unopened files is possible, assuming the app has been given directory access permission. But I am not currently planning to work on such a thing.

I'm a bit confused: are you interested in searching for files, or searching in files? Because those are probably quite different.

Could you open a new ticket explaining your proposal in more detail?

@AlessandroW
Copy link
Author

I would like to close this ticket because changing the file picker is not feasible.

I agree, and I wanted to suggest the same.

I'm a bit confused: are you interested in searching for files, or searching in files? Because those are probably quite different.

Searching for files by their +TITLE property instead of their filename. I will create a new Issue.

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

No branches or pull requests

3 participants