Qalculate / libqalculate

Qalculate! library and CLI
https://qalculate.github.io/
GNU General Public License v2.0
1.79k stars 144 forks source link

Android app? #355

Open jerzydziewierz opened 2 years ago

jerzydziewierz commented 2 years ago

Qalc is absolutely the best thing since sliced bread that happened to humanity! it's easily rivalling the likes of Wolfram Alpha. How about if we start a campaign to get an android version?

hanna-kn commented 2 years ago

How about if we start a campaign to get an android version?

How do you imagine that such a campaign would reach its goal?

Qalc is absolutely the best thing since sliced bread that happened to humanity! it's easily rivalling the likes of Wolfram Alpha.

Thanks.

jerzydziewierz commented 2 years ago

I know it's risky, but there are ways like placing bounties or creating a custom campaign to gather money and pay a dedicated android developer to do that. I'll ask around in my company, too.

See https://github.com/bountysource/core/wiki/Frequently-Asked-Questions

stephtr commented 2 years ago

Since I managed to compile libqalculate to WebAssembly, I made a small web app as proof of concept (https://qalculator.xyz/), which I now also added to the Play Store: https://play.google.com/store/apps/details?id=xyz.qalculator.twa It however still is quite basic, without any autocomplete or settings.

Zorbatron commented 2 years ago

You can actually get Qalculate on Android!

You first need to install Termux, which is not on the Google play store, then you can execute pkg install qalc, and you can use the full CLI version.

doronbehar commented 2 years ago

@stephtr's work is a great start. I'd love to have autocomplete and other features such as the desktop app. I created a bounty from this issue:

https://app.bountysource.com/issues/109640993-android-app

stephtr commented 1 year ago

A small update from my web app (https://qalculator.xyz/)*: Since today it supports autocompletion for variables. That also enabled automatically rewriting of variable names (like pi and planck):

image

* Also available in the Windows, Android & iOS Store.

lrq3000 commented 10 months ago

@stephtr work is awesome but if I'm not mistaken it cannot run offline, the Android app is only a web wrapper around the website, because the issue is that it requires node.js and so it cannot natively run on Android without a major rewrite (it's a common issue for apps using node.js).

There is an implementation of libqalculate for Android and a native qalculate-android app, but it seems it's not developed anymore:

https://github.com/jherkenhoff/libqalculate-android

https://github.com/jherkenhoff/qalculate-android

Looking at the sourcecode of libqalculate-android, it seems it can be easily updated to use the latest libqalculate, it's just a wrapper around it with Android build tools. /EDIT: I tried myself and can confirm this is indeed the case, I will make a PR to update libqalculate-android to use libqalculate v4.8.1 (the latest version currently).

stephtr commented 10 months ago

@stephtr work is awesome but if I'm not mistaken it cannot run offline

qalculator.xyz actually runs offline, whether you open it via the browser or via Google Play Store. (Technically, the website comes with a service worker which caches all the files necessary for the website to operate offline on the first visit.)

lrq3000 commented 10 months ago

@stephtr Thank you for the clarification, it's awesome it can fully run offline, even after restarting the device. I can understand why you went with this approach, as it is much more portable. However it is still dependent on the website being up and running the first time the app is launched, if the website dies, the app dies too. Do you have plans to distribute a version that can be fully installed offline? Or is it a limitation of the framework you use?

bbigras commented 10 months ago

However it is still dependent on the website being up and running the first time the app is launched

Isn't that basically the same as needing the app store to be online on the first use/install?

I like native apps but pwa are pretty cool too.

lrq3000 commented 10 months ago

Although both are ways to distribute an app indeed, once we get the APK of a native app from an app store, then we can download and redistribute the APK via any other channel (eg, other websites or app stores, via USB/wifi/bluetooth without internet, etc) and they will still install fine without access to the original distribution method. However here I don't know how we can download the app and redistribute it without the website running (apart from setting another website and changing the app code to point to it). The website is a single point of failure. Not a catastrophic one thankfully since the app is open-source, but still a point of failure, that's why I am asking if there is any workaround.

bbigras commented 10 months ago

Does the lib compile to wasm?

lrq3000 commented 10 months ago

It seems that yes.

stephtr commented 10 months ago

Yes, via emscripten and a few small modifications to the build process makes it compile to wasm, with loosing some features (like automatic currency fetching, internationalization support).

Do you have plans to distribute a version that can be fully installed offline?

Not for now. By cloning the source code and setting up a (local) server, one can "install" it without needing access to qalculator.xyz. For more than that, I don't see any overly easy/useful way.

bbigras commented 10 months ago

I'm taking a look a making a simple apk version for Android.