markor icon indicating copy to clipboard operation
markor copied to clipboard

Migrate to androidx & newer Android architecture

Open gsantner opened this issue 3 years ago • 7 comments

General information

  • App version: 2.x
  • System: Android 11

Description

Remove appcompat from markor and opoc, upgrade to AndroidX. Don't use transformation magic, make adjustments at code & androidx imports.

gsantner avatar Jun 02 '21 18:06 gsantner

Why not use the auto migration? Seems to be the recommended route: https://developer.android.com/jetpack/androidx/migrate

harshad1 avatar Jun 02 '21 19:06 harshad1

I know this one exists, but I prefer to stay away from it (thats why I've mentioned transformation magic).

grafik

As of applying changes/fixes by android tooling & IDE - yes. But a lot of special/greylist code is also used, which will need special attention - like coloring and showing menu icons.
Also the current solution for Settings/Preferences will need a bigger rewrite - probably one of the bigger points.

gsantner avatar Jun 02 '21 19:06 gsantner

👍

harshad1 avatar Jun 02 '21 19:06 harshad1

one of my todo.txt shower thoughts says along markor file write proxy to /data/ app-temp-dir, read file from intent, write back on close, use tmp file for java.io.File. Thats the rough plan I have in mind for coping with newer restrictions. Let aside file browser.

gsantner avatar Aug 21 '21 12:08 gsantner

There seems to be some sort of proposed mechanism for requesting all file access for file managers. We can try that first.

Needless to say, this will not affect F-Droid

harshad1 avatar Aug 21 '21 18:08 harshad1

probably default/gplayFlavor also comes into play for it (from gradle)

There seems to be some sort of proposed mechanism for requesting all file access for file managers

Yeah but its hard to get. To what I see big companies get it more easy, but probably not seo esy for smaller projects like this

gsantner avatar Aug 21 '21 18:08 gsantner

Do we want to immitate how syncthing accesses files? I.e. use SAF and ACTION_OPEN_DOCUMENT_TREE to gain access to a subtree. We will have to ask the user to pick the notebook directory this way. Obviously, we will then not be able to navigate up out of the notebook. But this should meet 90% of a user's needs while meeting android 12's limitations.

As far as I can tell, we can just use regular File access within the notebook directory once permissions are granted.

Do we want to go down this path? It adds a limitation, but makes Markor somewhat more future-proof

harshad1 avatar Apr 09 '22 21:04 harshad1