Sample Android App

Is there a sample Android app that demonstrates how to integrate the library? I can’t get an app to run, even before trying to actually call anything.

If I create a brand new Android app (compileSdkVersion 28, minSdkVersion 19, targetSdkVersion 28), verify that it runs OK, but then include the dependency “implementation ‘org.languagetool:language-en:4.3’” into the module’s build.gradle file, the app will no longer build. it gives the error: Error: MethodHandle.invoke and MethodHandle.invokeExact are only supported starting with Android O (–min-api 26).

If I bump the minSDkVersion to 26, it will build, but not run. It immediately crashes with a ClassNotFoundException for com.mypackage.MainActivity. I did try older versions of the library (down to 3.0) and got the same behavior.

That does not sound like a LT-related issue, though. Do you really need to use LT offline? Using our HTTP-API should be easier.

Meh, the only difference between the working app and the failed one was the gradle dependency line. I assume I must be missing something such as a meta value, but without a working sample to start from, I’d just be grasping at straws.

My client’s app needs to be able to work offline, so the web service work work for me. I’d continue to use the spell checker from the framework, but it no longer works on some vendors’ devices.

In any case, thank you for your response.

Might be outdated, but please also check GitHub - Softcatala/LanguageToolAndroidService: Experiments with spell checking on Android

That project is for building a spell-checker that will run as a system service, which is not the problem my client wants to solve. (They want an after-the-fact spell checker for certain input data.)