NoKey icon indicating copy to clipboard operation
NoKey copied to clipboard

Any change this could compile to Android API 18 with minimal to no changes?

Open seekr opened this issue 4 years ago • 3 comments

I wonder is this project is using some dependency that prevents it to compile to API 18 (Android 4.3+). I have an old device that I would love to use as a backup if it ran the android apk.

PS. I ask because I don't know how to check myself... :/

seekr avatar May 17 '20 17:05 seekr

The Android code is pretty minimal and there are probably only a few calls to functions that are only available on some API Level. However, there was probably a reason why I didn't go lower than what it currently is. Maybe one of the functions I used requires a higher API level. Or maybe I just would have had to use more of the compatibility libraries, I don't really remember..

Couldn't you just use the web version (https://nokey.xyz/main.html) instead? This way you only need a somewhat recent firefox or chrome on your phone.


Unfortunately I'm really not finding any time to develop this anymore. With a full time job programming, I just cant find any time and motivation to do more programming in my free time.

Zinggi avatar May 18 '20 18:05 Zinggi

@Zinggi thanks for getting back. I'm trying my luck with Android Studio...

How does web version keep the session? I worry that it could lose the pairing status

seekr avatar May 20 '20 15:05 seekr

The web version stores the shared state in localStorage. As far as I know, it should pretty much stay there forever. I just checked on a browser on my phone that I probably haven't used since 2 years and everything was still there as it was. I think if you add it to your home screen, browsers will also make sure you don't accidentally clean browser storage for it. Also, since the web version is a PWA, you can visit the site even when you're offline.

The android version actually also stores the state in localStorage. It's just a simple wrapper around a WebView. To be honest, I think the Android version is actually worse than the browser version. In hindsight, I probably wouldn't do an Android version again the way this one was done. The WebView approach is brittle and I've seen a few bugs that only happen on Android. The only advantage it has is the QR scanner to make pairing quicker.

You are of course still welcome to try to get it to build for an older Android phone, but I really think you're probably better served with the web version.

Zinggi avatar May 21 '20 21:05 Zinggi