Browse Source

Bind library

master 0.1.0
Trevor Slocum 10 months ago
parent
commit
1a3054c02e
  1. 2
      .gitignore
  2. 2
      CHANGELOG
  3. 19
      README.md
  4. 33
      app/bind.sh
  5. 20
      app/build.gradle
  6. 2
      app/src/main/java/space/rocketnine/xenia/App.java
  7. 2
      app/src/main/java/space/rocketnine/xenia/MainActivity.java
  8. BIN
      metadata/en-US/images/phoneScreenshots/1.png
  9. BIN
      metadata/en-US/images/phoneScreenshots/2.png
  10. BIN
      metadata/en-US/images/phoneScreenshots/3.png
  11. BIN
      metadata/en-US/images/phoneScreenshots/4.png
  12. BIN
      metadata/en-US/images/phoneScreenshots/5.png
  13. BIN
      metadata/en-US/images/phoneScreenshots/thumbnails/1.png
  14. BIN
      metadata/en-US/images/phoneScreenshots/thumbnails/2.png
  15. BIN
      metadata/en-US/images/phoneScreenshots/thumbnails/3.png
  16. BIN
      metadata/en-US/images/phoneScreenshots/thumbnails/4.png
  17. BIN
      metadata/en-US/images/phoneScreenshots/thumbnails/5.png

2
.gitignore

@ -2,11 +2,13 @@
/app/build
/app/go
/app/libs
/app/release
/build
/captures
/local.properties
*.iml
*.sh
!/app/bind.sh
.DS_Store
.cxx
.externalNativeBuild

2
CHANGELOG

@ -0,0 +1,2 @@
0.1.0:
- Initial release

19
README.md

@ -1,9 +1,24 @@
# Xenia
[![CI status](https://gitlab.com/tslocum/xenia/badges/master/pipeline.svg)](https://gitlab.com/tslocum/xenia/commits/master)
[![Donate](https://img.shields.io/liberapay/receives/rocketnine.space.svg?logo=liberapay)](https://liberapay.com/rocketnine.space)
[Gemini](https://gemini.circumlunar.space) browser for Android
[Gemini](https://gemini.circumlunar.space) proxy for Android
## Features
- Use your web browser to browse Gemini
## Screenshots
<a href="https://gitlab.com/tslocum/xenia/-/raw/master/metadata/en-US/images/phoneScreenshots/1.png"><img width="108" height="216" alt="Screenshot" border="0" src="https://gitlab.com/tslocum/xenia/-/raw/master/metadata/en-US/images/phoneScreenshots/thumbnails/1.png"></a>
&nbsp; <a href="https://gitlab.com/tslocum/xenia/-/raw/master/metadata/en-US/images/phoneScreenshots/2.png"><img width="108" height="216" alt="Screenshot" border="0" src="https://gitlab.com/tslocum/xenia/-/raw/master/metadata/en-US/images/phoneScreenshots/thumbnails/2.png"></a>
&nbsp; <a href="https://gitlab.com/tslocum/xenia/-/raw/master/metadata/en-US/images/phoneScreenshots/3.png"><img width="108" height="216" alt="Screenshot" border="0" src="https://gitlab.com/tslocum/xenia/-/raw/master/metadata/en-US/images/phoneScreenshots/thumbnails/3.png"></a>
&nbsp; <a href="https://gitlab.com/tslocum/xenia/-/raw/master/metadata/en-US/images/phoneScreenshots/4.png"><img width="108" height="216" alt="Screenshot" border="0" src="https://gitlab.com/tslocum/xenia/-/raw/master/metadata/en-US/images/phoneScreenshots/thumbnails/4.png"></a>
&nbsp; <a href="https://gitlab.com/tslocum/xenia/-/raw/master/metadata/en-US/images/phoneScreenshots/5.png"><img width="108" height="216" alt="Screenshot" border="0" src="https://gitlab.com/tslocum/xenia/-/raw/master/metadata/en-US/images/phoneScreenshots/thumbnails/5.png"></a>
## Support
Please share issues and suggestions [here](https://gitlab.com/tslocum/xenia/issues).
## Dependencies
- [gmitohtml](https://gitlab.com/tslocum/gmitohtml)

33
app/bind.sh

@ -0,0 +1,33 @@
#!/bin/bash
export PROJECTPATH=$PWD
export GOPATH="$PROJECTPATH/go"
export GO111MODULE=off
if [ -z "$1" ]; then
echo "Usage: ./bind.sh <gmitohtml commit hash>"
exit 1
fi
echo "Downloading gomobile..."
GOPATH="$PROJECTPATH/go" go get -u golang.org/x/mobile/cmd/...
echo "Downloading gmitohtml $1..."
mkdir -p $GOPATH/src/gitlab.com/tslocum
if [ ! -d "$GOPATH/src/gitlab.com/tslocum/gmitohtml" ]; then
git clone https://gitlab.com/tslocum/gmitohtml $GOPATH/src/gitlab.com/tslocum/gmitohtml
fi
cd $GOPATH/src/gitlab.com/tslocum/gmitohtml && git fetch origin && git reset --hard `printf %q "$1"` && cd $PROJECTPATH
#echo "Downloading dependencies..."
#cd $GOPATH/src/gitlab.com/tslocum/gmitohtml
#go mod vendor
#cd $PROJECTPATH
echo "Binding library..."
mkdir -p libs
PATH="$PROJECTPATH/go/bin:$PATH"
$GOPATH/bin/gomobile bind -javapkg space.rocketnine -o libs/gmitohtml.aar -target=android -androidapi=16 $GOPATH/src/gitlab.com/tslocum/gmitohtml/pkg/gmitohtml
echo "Finished."

20
app/build.gradle

@ -8,7 +8,7 @@ android {
defaultConfig {
applicationId "space.rocketnine.xenia"
minSdkVersion 23
minSdkVersion 16
targetSdkVersion 30
versionCode 10
versionName "0.1.0"
@ -29,6 +29,22 @@ android {
}
}
ext {
// https://gitlab.com/tslocum/gmitohtml
gmitohtmlVersion = "72c8172ab88880a02fbc50fb15773b30959ccae8"
}
task bindLibrary(type: Exec) {
workingDir "$projectDir"
commandLine 'sh', '-c', './bind.sh ' + project.ext.gmitohtmlVersion
}
afterEvaluate {
android.applicationVariants.all { variant ->
variant.javaCompiler.dependsOn(bindLibrary)
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
}
}

2
app/src/main/java/space/rocketnine/xenia/App.java

@ -22,7 +22,7 @@ public class App extends Application {
try {
Thread.sleep(1000);
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://127.0.0.1:1967/gemini/twins.rocketnine.space/"));
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://127.0.0.1:1967"));
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
} catch (Exception e) {

2
app/src/main/java/space/rocketnine/xenia/MainActivity.java

@ -21,7 +21,7 @@ public class MainActivity extends Activity {
}
public void openBrowser(View view) {
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://127.0.0.1:1967/gemini/twins.rocketnine.space/"));
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://127.0.0.1:1967"));
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
}

BIN
metadata/en-US/images/phoneScreenshots/1.png

After

Width: 1080  |  Height: 2160  |  Size: 101 KiB

BIN
metadata/en-US/images/phoneScreenshots/2.png

After

Width: 1080  |  Height: 2160  |  Size: 207 KiB

BIN
metadata/en-US/images/phoneScreenshots/3.png

After

Width: 1080  |  Height: 2160  |  Size: 109 KiB

BIN
metadata/en-US/images/phoneScreenshots/4.png

After

Width: 1080  |  Height: 2160  |  Size: 250 KiB

BIN
metadata/en-US/images/phoneScreenshots/5.png

After

Width: 1080  |  Height: 2160  |  Size: 189 KiB

BIN
metadata/en-US/images/phoneScreenshots/thumbnails/1.png

After

Width: 108  |  Height: 216  |  Size: 12 KiB

BIN
metadata/en-US/images/phoneScreenshots/thumbnails/2.png

After

Width: 108  |  Height: 216  |  Size: 20 KiB

BIN
metadata/en-US/images/phoneScreenshots/thumbnails/3.png

After

Width: 108  |  Height: 216  |  Size: 13 KiB

BIN
metadata/en-US/images/phoneScreenshots/thumbnails/4.png

After

Width: 108  |  Height: 216  |  Size: 23 KiB

BIN
metadata/en-US/images/phoneScreenshots/thumbnails/5.png

After

Width: 108  |  Height: 216  |  Size: 15 KiB

Loading…
Cancel
Save