Application for VPN using Mysterium Network.
- Setup crash reporting:
- Ensure You have permission to the project here https://console.firebase.google.com
- Download project's firebase crashlytics config -
google-services.json
from https://console.firebase.google.com/u/1/project/mysterium-vpn/overview - Place it in
android/app/
brew cask install android-platform-tools
or Install ADB- Connect Android phone, check if
adb
can see it:
adb devices
- Download Android Studio
- Android Studio comes with JDK preinstalled, but in case that version doesn't work, you need JDK 1.8
- Setup Emulator in Android Studio and start it
Install Android SDK, export ANDROID_HOME
to SDK location, i.e.:
export ANDROID_HOME=/Users/<username>/Library/Android/sdk/
Run app on default device (connected or emulator)
Open Android Studio and click Run button :)
-
Get
google-services.json
:- Go to https://console.firebase.google.com
- Open android project
- Download
google-services.json
- Put it to
android/app/google-services.json
-
Create signing key:
keytool -genkey -v -keystore my-release-key.keystore -alias my-key-alias -keyalg RSA -keysize 2048 -validity 10000
More info: https://facebook.github.io/react-native/docs/signed-apk-android#generating-a-signing-key
-
Setup values in environment:
cp fastlane/.env.local.dist fastlane/.env.local
vim fastlane/.env.local
- Setup Fastlane, more info in fastlane/README.md
-
Build Mysterium Node from source code:
util_scripts/build-node.sh
-
Uncomment local dependency in
android/app/build.gradle
://implementation 'network.mysterium:mobile-node:0.8.1' implementation files('libs/Mysterium.aar')
-
Install Fastlane (if don't have it yet)
brew cask install fastlane
-
Make release build:
source fastlane/.env.local && fastlane android build
APK will be available under android/app/build/outputs/apk/release/app-release.apk
You can install this APK by:
- uploading it to phone, or
- using
adb install android/app/build/outputs/apk/release/app-release.apk
- To build and publish internal release manaully: Increase bundle_release versionCode + 1 in fastlane/Fastlane file and run:
source fastlane/.env.local && fastlane android internal
- To build and publish internal release automatically:
- Create PR with bumped fastlane/android_version_code (Google play store requires new version code for each release).
- Ater merge to master create new tag in github repository. See example commit.
iOS App is under development.
* What went wrong:
A problem occurred configuring project ':react-native-fabric'.
> Could not resolve all artifacts for configuration ':react-native-fabric:classpath'.
> Could not find lint-gradle-api.jar (com.android.tools.lint:lint-gradle-api:26.1.2).
related to issue waiting on fix
to fix run:
./util_scripts/fix-react-native-fabric-gradle
If you come across an error command not found: gsed
, you can fix it on OSX by running:
brew install gnu-sed
Repository contains Dockerfile which includes OpenJDK and Fastlane to build, test and publish Android from Docker.
TAG=1.0.0
docker build -t mysteriumnetwork/mobile-ci:$TAG .
docker push mysteriumnetwork/mobile-ci:$TAG
- To Update
implementation "mysterium.network:mobile-node:0.5-rc"
line in./android/app/build.gradle
, published versions can be found here. - Node usage can be found in
MainActivity.kt
.
To see native android logs, use Logcat:
adb logcat