skyjake / lagrange

A Beautiful Gemini Client
https://gmi.skyjake.fi/lagrange/
BSD 2-Clause "Simplified" License
1.19k stars 62 forks source link

Lagrange on mobile (iOS and Android) #96

Open raspbeguy opened 3 years ago

raspbeguy commented 3 years ago

Hello,

This may be a silly idea (please don't hit me too hard).

I think it would make sense to build lagrange for Android. There are already some SDL2 apps for android. Also if this is done, lagrange would be undoubtly the prettiest mobile gemini browser.

But I know nothing about mobile development so I have no idea how much effort it would take to do that.

skyjake commented 3 years ago

Well, on the positive side, Android and iOS are both pretty POSIX compatible so yeah you could build and run Lagrange on them pretty much as-is. (In fact, I did try this in the spring with another project based on SDL2 and the_Foundation.)

The problem is that mobile operating systems have a bunch of characteristics that require 1) redesigning the user interface and 2) modifying a number of app life cycle related aspects.

Number 1) is the biggest issue. Also, to make everything integrate and work nicely, it would need to be done using native UI controls. That makes one implementation for Android and one for iOS. My personal preference would be to work on iOS first...

It would be great to see Lagrange portable across mobile platforms as well as desktops, so I may end up working on this sooner or later.

raspbeguy commented 3 years ago

This is great news!

skyjake commented 3 years ago

Some progress with this: https://skyjake.fi/@jk/105682877581402417

skyjake commented 3 years ago

iOS TestFlight has started:

https://gmi.skyjake.fi/gemlog/2021-03_testflight.gmi

skyjake commented 2 years ago

Android pre-release repository: https://skyjake.github.io/fdroid/repo

marek22k commented 2 years ago

I have two questions: Is the mobile version a complete reimplementation or is the code from the desktop version used? How can I build the APK myself? Where can I find the source code for the mobile version?

skyjake commented 2 years ago

@marek22k

Is the mobile version a complete reimplementation or is the code from the desktop version used?

The mobile versions use the same code as on the desktop.

The Android port additionally uses a Java app under which the native C code runs. It is in a separate repository: https://git.skyjake.fi/gemini/lagrange-android

How can I build the APK myself?

The short answer is that you clone the Android repository above, copy the SDL sources, and build the project.

However, before that is possible, you'll need to compile the library dependencies against the right version of NDK. Unfortunately, depending on your level of expertise with Android, this may be quite challenging. I don't have a script or guide to share for this.