tranleduy2000 / ncalc

Power calculator for Android. Solve some problem algebra and calculus.
GNU General Public License v3.0
677 stars 157 forks source link

Your app for fdroid #61

Open theScrabi opened 5 years ago

theScrabi commented 5 years ago

Hei have you thought about pudding your app on fdroid. If you are interested, you can seek for help. However here are some requirements that should be ment before adding:

projectextremum commented 5 years ago

@theScrabi the project seems to be unmaintained. But a scientific calculator which is easy to use (unlike addi) and has graphing capabilities is really lacking in f-droid. Did the build fail without gsm libs?

basile-laderchi commented 5 years ago

I gave it a shot.

Results:

About the last one I need some help. Steps I have done:

upon building I get the following error: "Error: Program type already present: com.google.common.util.concurrent.internal.InternalFutures"

if I build the project before adding and removing the lines of symja and log4j and matheclipse the projects builds just fine. Any ideas?

@projectextremum: addi?

axkr commented 5 years ago

@Tranleduy2000 can you help

basile-laderchi commented 5 years ago

I have rebuilt it today (Studio must have downloaded the latest matheclipse-core library). It does compile just fine, but upon executing it I get the following errors (I think that the first error is not a real problem, but the second one...):

01-31 10:21:20.573 9727-9727/com.duy.calculator.free.v2 W/System.err: java.lang.NoClassDefFoundError: Failed resolution of: Ljavax/script/ScriptEngineManager;
01-31 10:21:20.576 9727-9727/com.duy.calculator.free.v2 W/System.err:     at org.apache.logging.log4j.core.script.ScriptManager.<init>(ScriptManager.java:49)
...
01-31 10:21:20.751 9727-9727/com.duy.calculator.free.v2 E/AndroidRuntime: FATAL EXCEPTION: main
    java.lang.NoClassDefFoundError: org.matheclipse.core.eval.-$$Lambda$EvalEngine$QebSt4dX6ZeiPlIF3uDV4uxXsd8
        at org.matheclipse.core.eval.EvalEngine.flattenSequences(EvalEngine.java:1740)

The error gets thrown on this line https://github.com/tranleduy2000/ncalc/blob/725baf703bd1e10de679d7463eda39445227ae43/app/src/main/java/com/duy/calculator/evaluator/MathEvaluator.java#L77 and the function passed to it is:

Comb(n_, k_):=(factorial(Ceiling(n))/(factorial(Ceiling(k))*factorial(Ceiling(n-k))))

I even tried commenting those line out, but when it gets to https://github.com/tranleduy2000/ncalc/blob/725baf703bd1e10de679d7463eda39445227ae43/app/src/main/java/com/duy/calculator/evaluator/MathEvaluator.java#L116 crashes again with exprInput passed being:

N(1)

Should I paste the full logcat?

@axkr any ideas?

BTW I tried contacting @tranleduy2000 with no luck.

axkr commented 5 years ago

At this Line the system uses the Java 8 Lambda feature.Are you Sure your Environment is set up for Java 8?

basile-laderchi commented 5 years ago

I guess that the problem now is that my android is only v6.0 (API level 23) and Lambdas are supported from level 24. I'll give it a shot compiling it with RetroLambda (maybe?).

axkr commented 5 years ago

Or try using @tranleduy2000 Java 7 fork

basile-laderchi commented 5 years ago

Unfortunately that fork is not on any maven repo and is a little behind too, but I'll give it a try anyway

basile-laderchi commented 5 years ago

More finding:

P.S.: always doing a "Clean Project" and then a "Rebuild Project" before running.

axkr commented 5 years ago

Can you open a pull request with your Maven settings / pom.xml ?

basile-laderchi commented 5 years ago

@axkr I have created a gist with my two build files (unfortunately not Maven settings or pom.xml): https://gist.github.com/basile-laderchi/d52cf28fe9971a84b2ba5e3b950d1f12

clach04 commented 4 years ago

@basile-laderchi I think the addi @projectextremum was referring to is:

octave was ported https://play.google.com/store/apps/details?id=com.gnuroot.octave so it looks like addi is no longer maintained

MarionMoseby commented 4 years ago

Ping @tranleduy2000 , are u interested? Maybe getting on f droid is a bit tricky, but @izzysoft has stated he will add it to his popular foss f droid repo provided that you:

IzzySoft commented 4 years ago

The tracking free part would be essential here. If needed, I could work around the versioning part by downloading the "initial one" manually (the app is already in my repo but stopped being updated because of this).

basile-laderchi commented 4 years ago

I just installed it again on my new laptop and gave it another try. gms lib removed and the build looks ok.

What other trackers are there that should be removed? How can I find them?

MarionMoseby commented 4 years ago

From Gitlab: « Additionally, those newer versions have a bunch of trackers added: Crashlytics, Firebase Analytics, GMS, etc., which apart from being a privacy issue are also bloating the app (the size has doubled) – hence I won't even pick them manually.»

See https://gitlab.com/IzzyOnDroid/repo/issues/78#note_252582009

IzzySoft commented 4 years ago

If there is a new APK available here that (at least in theory) should have those trackers removed, just let me know and I test it again (the library scanner of my repo will tell).

basile-laderchi commented 4 years ago

I have tried contacting @tranleduy2000 in January on all emails I could find and got no response.

I have removed the gms library. I haven't found any other tracker libraries (maybe I'm missing something). I have also upgraded almost all the libraries referenced to the newest versions.

I do have changed the applicationId, versionCode and versionName, compiled and have built the apk (unsigned for now). @IzzySoft can I upload it somewhere for you to test it with your library scanner? Can I test it myself somehow? I have found this libinfo and checked all the libraries reported by the "Analyze APK" and none of them has any anti features.

IzzySoft commented 4 years ago

@basile-laderchi if you can give me a link to your fork, and have the APK available there (ideally attached to a release), I can give it a try.

basile-laderchi commented 4 years ago

@IzzySoft fork ready: https://github.com/basile-laderchi/ncalc (with latest changes pushed) Do I have to sign the apk for releasing it?

IzzySoft commented 4 years ago

Do I have to sign the apk for releasing it?

Yes please. Else fdroidserver won't accept it. Let me know when the APK is available and I give it a try.

basile-laderchi commented 4 years ago

Signed and created a release: https://github.com/basile-laderchi/ncalc/releases/tag/IzzyOnDroid.Test.1

I marked it as pre-release. Is that a problem?

IzzySoft commented 4 years ago

No, if you want me to pick pre-releases, that can easily be done. But the tag name potentially poses a problem: it should either reflect the versionName or the versionCode – currently it's unclear what it reflects. If it's the versionCode (1), and you'll keep it that way, it should be OK – but if it was meant as versionName it doesn't correctly match (1-beta according to the build.gradle – but that doesn't match what the APK itself has set). So I assume the former (versionCode). Should I be wrong, please let me know. If I was right, please let the only digits in the tag name be those of the versionCode for future tags – and don't forget to increase versionCode with each new release :wink:

Second look: seems funny that after v3.4.8 follows v1, don't you think? Further, you might wish to rename the app to distinguish it from the original (e.g. NCalcLibre?).

Apart from that, it looks good – and should show up here with tomorrow's sync. Thanks!

basile-laderchi commented 4 years ago

@IzzySoft

Created new release with the following changes:

IzzySoft commented 4 years ago

@basile-laderchi thanks! I just updated its metadata to have the updater check for tags going by versionName, and then it was able to see and fetch the update (should show up with tomorrow's sync – todays was just missed by half an hour). Please keep the tag names like this (feel free to drop the .free suffix if you wish, as the app is already named "libre" – my updater ignores that part anyway).

PS: I already got the first reports of happiness – together with the hope you'll keep the fork alive :smile:

PPS: Let me know if/when I should ignore pre-releases. Currently my updater picks both; if you want it to ignore the pres, I'll have to tell it.

basile-laderchi commented 4 years ago

@IzzySoft I installed it on my phone too from the repo. I can't really drop the .free from the tag names. I would like to keep the same tag names as the original repo, but can't do because they are used by the original repo (I think - if someone know something more, please do tell me). How did you get those reports? Could the updater do pick the pre-releases too, but not flag them as suggested updates (F-Droid does this now with its v1-8-alpha0 version)?

IzzySoft commented 4 years ago

Not really a problem with the .free suffix (I hope – we'll see when you published the next release and my updater picked it up).

Those reports came by mail. From people following this issue I'd say :wink:

As for pre-releases: yes, my updater can pick those. But it doesn't set CV/CVC in the metadata, so there's no control for "suggested updates". When I find the time to do so, I'll implement "RegEx tag name parsing" for my updater, so it could deal with different tag names in the same repo pointing to apps with different package names (like, one package name for stable releases and another for beta releases), to deal with cases like this. Currently that's not possible with my repo.

MarionMoseby commented 4 years ago

It was me who gave the positive reports hehe, Im very happy that you made the libre version and hope the ncalc developers would make their app availaible on the official f droid repo :p

axkr commented 4 years ago

I also tried contacting @tranleduy2000 . My last contact was at the end of November.

As the main Android developer and maintainer of the Java 7 fork of the Symja library

he had done a lot of hard work for these projects,. I think he should also decide how the roadmap for this project should going on.

basile-laderchi commented 4 years ago

@axkr I don't think he cares any more for NCalc+. I tried contacting him on January on three different emails I managed to find and got no answer back. Also he must be receiving emails with all the messages here.

After all it's a GPL3+ project. I haven't removed any license messages or attributions.

@MarionMoseby I had a shot at it, but didn't go well. I might try again next year.

MarionMoseby commented 4 years ago

I think he must be interested, on google play there is a beta which has been totally rewriten with a completely new interface, if I am not mistaken

axkr commented 4 years ago

Yes I implemented the JavaScript generating function foundations in Symja for the Beta version:

If you watch the video you can see, that we have more graphical functions (which are now JavaScript based) in the Programming mode. The idea is to create a more "educational" tool with more documentation references.

opusforlife2 commented 4 years ago

@basile-laderchi Did you get the opportunity to look at this again?

axkr commented 4 years ago

@basile-laderchi @IzzySoft I'm not so familiar with FDroid? Is this the latest version?

IzzySoft commented 4 years ago

@axkr just compare with releases here. Short answer: Yes :wink:

basile-laderchi commented 4 years ago

@opusforlife2 I haven't looked again at including it on the official FDroid repository, but you can find it on the IzzyOnDroid repository on the link @axkr supplied (https://apt.izzysoft.de/fdroid/index/apk/eu.laderchi.ncalc)

@axkr as @IzzySoft said: that's the latest version. I almost daily check this github repo if there are changes.

opusforlife2 commented 4 years ago

Please do try when you have the time and inclination again. This app will make a valuable addition to the F-Droid repo. It is ridiculously good.

axkr commented 4 years ago

What we need again is a maintainer for the underlying android library (currently a fork of the main repo):

who can add the changes of the main repo to the android specialized repo amd create the very important symja_android_library-lite-release.aar lbrary for the ncalc project.

opusforlife2 commented 4 years ago

I opened some links. What is the use of having Java 7 instead of 8?

axkr commented 4 years ago

In the past Android doesn't support new Java 8 features (for example lamba expressions or streams). Nowadays a great subset of Java 8 is supported:

opusforlife2 commented 4 years ago

So, would it be possible to build NCalc with Java 8, now, if the min API was incremented to 24? Since you're already the maintainer for the Java 8 version of Symja, there wouldn't be any additional load.

basile-laderchi commented 4 years ago

@opusforlife2 the problem with the FDroid build was that I couldn't manage to fully built the calculator from source (for the FDroid repo all libraries must be compiled on the server and can't be included as *.aar). I'll give it again a shot to using the Java 8 library. My phone is on Android 6, so no can increment the min API over 23. (After all I'm doing it for me too).

opusforlife2 commented 4 years ago

My phone is on Android 6, so no can increment the min API over 23. (After all I'm doing it for me too).

No custom ROMs for your phone? 🤞

basile-laderchi commented 4 years ago

@opusforlife2 there is an official Android 7 release, but never got around to installing it due to not having enough space to download it on my device. I don't know if there are any newer custom ones.

opusforlife2 commented 4 years ago

Focus on my voice. Look at the swinging pendant. Don't think about anything else... back up your data... upgrade to Android 7... upgrade to API 24... 👀

MarionMoseby commented 4 years ago

I just got an email with just this on it and I was like WOW. Now its in my "favourites" folder 😂😂😂 -------- Mensaje original -------- On 24 feb. 2020 20:19, opusforlife2 escribió:

Focus on my voice. Look at the swinging pendant. Don't think about anything else... back up your data... upgrade to Android 7... upgrade to API 24... 👀

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

axkr commented 4 years ago

Hello, seems that we can't connect @tranleduy2000 ? To get any progress in the future development of NCalc, I would suggest in a first step to maintain bug fixes and changes since December 2019 to this fork (or a new fork?)

Is anyone willing to help creating the *.aar library and can automize the Gradle build?

opusforlife2 commented 4 years ago

Two months seems like an okay time for a developer to not be in contact. Maybe we should wait more before taking further steps?

Or are you sure that he's gone?

axkr commented 4 years ago

I don't know. I didn't get any response from my last mail.

MarionMoseby commented 4 years ago

Is it? Im no develope, but two months seems like a lot to me

On sáb, mar 7, 2020 a las 19:30, opusforlife2 notifications@github.com escribió:

Two months seems like an okay time for a developer to not be in contact. Maybe we should wait more before taking further steps?

Or are you sure that he's gone?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.