Android SDK and Raspberry

Hey everyone
I’m very new here, just started learning Kotlin and I have one of those super-newbie questions:

Is it possibile to write a kotlin application on android studio using an Android SDK and then run it on a linux server (specifically, a Raspberry Pi)?
Consider that the application I have in mind doesn’t have a GUI interface.
Thanks in advance for any insight

Why do you need to write Android application specifically and then run it outside of Android and without using Android UI components? If you mean to write just any Kotlin application using IntelliJ (Android Studio) then sure, you can do that.

1 Like

Because I need to use this: GitHub - eu-digital-green-certificates/dgc-certlogic-android: This repository contains the source code of the EU Digital COVID Certificate Certlogic for Android.

I know I can compile a Kotlin application and run it on any platform, this project that I posted above and that I need to import has been developed for android specifically however.

My guess is that running Android library outside of Android won’t be that easy.

I would rather try to extract fragments of the code that is needed for us, the “core” that focuses on pure data. Hopefully, it doesn’t use any parts of Android. It may even turn out that this file is everything we need: certlogic-kotlin-v0.9.0-kotlin.jar. Still, this library may use Android API for storing its data, for example in the key store.

1 Like

Thanks for your reply.
Unfortunately the laws in my country allow you to check digital covid certifications in your apps as long as you integrate the official sdk posted on Github.
I guess I’ll have to run my Kotlin app on an android device.

Well, you can check Anbox or other similar utils. It seems this library does not contain any native code, so it is highly probable it will work properly and without big performance penalty.

I’ll give it a try!