Browse Source

Merge pull request #108 from jahway603/master

Resolves upstream PR #95 and #20, updated README.md, tweaked Settings screen
master
Duke Leto 4 years ago
committed by GitHub
parent
commit
f0be7e2d22
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 108
      README.md
  2. 4
      app/build.gradle
  3. 54
      app/src/main/res/layout/activity_settings.xml
  4. 2
      app/src/main/res/layout/content_receive.xml
  5. 2
      app/src/main/res/values/strings.xml
  6. 63
      release_build_process.md

108
README.md

@ -1,15 +1,35 @@
# SilentDragon Android - Android frontend for SilentDragon
SilentDragon Android is an Android frontend for the desktop SilentDragon that lets you send and receive shielded payments from your mobile phone.
# SilentDragon Android
[![GitHub license](https://img.shields.io/badge/License-GPL%20v3-yellow.svg)](https://github.com/MyHush/SilentDragonAndroid/blob/master/LICENSE)
[![GitHub version](https://badge.fury.io/gh/MyHush%2FSilentDragonAndroid.svg)](https://badge.fury.io/gh/MyHush%2FSilentDragonAndroid)
[![Github All Releases](https://img.shields.io/github/downloads/MyHush/SilentDragonAndroid/total.svg)](https://img.shields.io/github/downloads/MyHush/SilentDragonAndroid/total.svg)
<p align="left">
<a href="https://twitter.com/MyHushTeam">
<img src="https://img.shields.io/twitter/url?style=social&url=https%3A%2F%2Ftwitter.com%2Fmyhushteam"
alt="MyHushTeam's Twitter"></a>
<a href="https://twitter.com/intent/follow?screen_name=MyHushTeam">
<img src="https://img.shields.io/twitter/follow/MyHushTeam?style=social&logo=twitter"
alt="follow on Twitter"></a>
<a href="https://fosstodon.org/@myhushteam">
<img src="https://img.shields.io/badge/Mastodon-MyHushTeam-blue"
alt="follow on Mastodon"></a>
<a href="https://www.reddit.com/r/Myhush/">
<img src="https://img.shields.io/reddit/subreddit-subscribers/Myhush?style=social"
alt="MyHushTeam's Reddit"></a>
</p>
SilentDragon Android is an Android frontend for the desktop [SilentDragon](https://github.com/MyHush/SilentDragon) or [SilentDragonLite](https://github.com/MyHush/SilentDragonLite) that lets you send and receive shielded payments from your mobile phone. We are currently working on implementing Lite Wallet and HushChat functionality on Android, so follow us on our [Twitter](https://twitter.com/MyHushTeam) or [Mastodon](https://fosstodon.org/@myhushteam) to stay updated. After this functionality is implemented, we are planning on making an F-Droid release.
<img height=50% width=50% src="https://raw.githubusercontent.com/MyHush/SilentDragonAndroid/master/SDA.jpg">
## When will it be in my favorite app store?
## Installation
The minimum supported Android version is 4.4.x KitKat. There are two ways to install:
The application is already available on the Google Play store here:
https://play.google.com/store/apps/details?id=org.myhush.silentdragon
1. Via the [Google Play Store](https://play.google.com/store/apps/details?id=org.myhush.silentdragon).
1. Direct APK install available at the [Releases page](https://github.com/MyHush/SilentDragonAndroid/releases). You will need to allow `Install from untrusted sources` on your Android phone in order to install from this source.
### Running SilentDragon
## Running SilentDragon
In order to let your Android phone connect to your desktop, you need to run the desktop [SilentDragon](https://github.com/MyHush/SilentDragon), and sync fully. This is not a full node
on your Android (your poor battery!). It's a remote control for your full node.
@ -21,21 +41,15 @@ is about 900MB on disk.
After your node is synced, go to `Apps -> Connect Mobile App` to view the
connection QR Code, which you can scan from the Android App.
## Dev Download
You can also head over to the [Releases page](https://github.com/MyHush/SilentDragonAndroid/releases) to download an APK. Please report bugs if you see any!
### Install the Android APK directly
If you're installing the APK directly, you'll need to allow `Install from untrusted sources` on your Android phone.
### Bugs???
You can file issues in the [issues tab](https://github.com/MyHush/SilentDragonAndroid/issues).
We appreciate them! Please follow the Github issue template, when reasonable.
### Compiling from source
## Compiling from source
You can also compile and run from source.
On OS X:
@ -65,64 +79,24 @@ Make sure you have Gradle 5.4.x or higher, 5.4.1 is known to work:
Or you can use Android Studio on Linux, OS X, or Windows:
Make sure to install ndkVersion 21.1.6352462
Make sure to install ndkVersion 21.1.6352462.
Clone the repository and open the project in Android Studio.
Android Studio will automatically run the initial build process.
Click the Run button to launch the app after the build process is complete.
## Release Build Process
The first time you create a release build you'll need to create a keystore file and prepare a properties file. The
release keystore is used for app signing and a properties file is used to store
sensitive information about the keystore. These files should not be committed
to git. Once you have both of these files you can create a release build for
the Google Play Store.
### Creating a release keystore via CLI
The `keytool` command can be used, for example:
keytool -genkey -alias silentdragon -keyalg RSA -keystore new.jks -dname "CN=Duke Leto, O=Hush" -storepass testing -keypass 123 -validity XXX
### Creating a release keystore via GUI
* With Android Studio IDE open, on the system bar click Build -> Generate Signed Bundle/APK
* Select the APK option instead of the Bundle option
* On the next screen select app as the module and click "Create new"
* Set the Key Store Name to `silent_dragon_keystore.jks` and the path to that of the project, create a password for the keystore path, a Key alias, and a key password. The store password and key password should be the same. Fill out some basic organization information and click Ok.
* On the next screen make sure the build variant "release" is selected and click Finish.
### Preparing a properties file
Copy `secrets.properties` file from `examples` folder and paste it to the projects main directory.
Fill store_file_location, key_alias, key_password and store_password when you created the release keystore.
### Building a release APK for Google Play
Before creating each build you should increment the version code & version name
in the build.gradle file. These must be incremented for each release otherwise
the Play Store will reject the build.
To create a release build navigate to the project directory in terminal and run
```
./new_binary.sh 1.2.3
```
where 1.2.3 is the version number, which must match the codebase to be accepted to Google Play.
This will produce an apk file in the following directory.
SilentDragonAndroid/app/build/output/apk/release/app-release.apk
and also copy it to the current directory with the filename SilentDragonAndroid-1.2.3.apk
This build can be directly uploaded to Google Play.
### Building a release APK for F-Droid
sensitive information about the keystore. **These files should not be committed
to git.** Once you have both of these files you can create a release build for
the Google Play Store. For further information, [click here](release_build_process.md).
This will be pursued once lite wallet functionality exists in the SilentDragonAndroid wallet.
## Contributing
...
Contributions to this project are welcome and encouraged.
## License
# License
This project is under the GNU Public License v3. For the full license, see [LICENSE](LICENSE).
GNU Public License v3

4
app/build.gradle

@ -17,8 +17,8 @@ android {
minSdkVersion Deps.minSdkVersion
targetSdkVersion Deps.targetSdkVersion
multiDexEnabled true
versionCode 4
versionName "0.5.16"
versionCode 5
versionName "0.5.17"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}

54
app/src/main/res/layout/activity_settings.xml

@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="org.myhush.silentdragon.ui.SettingsActivity">
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="org.myhush.silentdragon.ui.SettingsActivity">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/scrollView2"
@ -71,17 +71,28 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/btnDisconnect" />
<TextView
android:id="@+id/textWormholeSettings"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:text="@string/wormhole_settings"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/divider"/>
<CheckBox
android:id="@+id/chkDisallowInternet"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="16dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp"
android:text="@string/disallow_routing_over_external_service"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/divider" />
app:layout_constraintTop_toBottomOf="@+id/textWormholeSettings" />
<TextView
android:id="@+id/textView4"
@ -95,7 +106,6 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/chkDisallowInternet" />
<View
android:id="@+id/divider3"
android:layout_width="0dp"
@ -110,14 +120,15 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView4" />
<TextView
android:id="@+id/textView11"
android:layout_width="131dp"
android:layout_height="44dp"
android:layout_width="110dp"
android:layout_height="36dp"
android:layout_marginTop="16dp"
android:text="@string/currency"
android:textSize="30sp"
android:textAlignment="center"
android:textIsSelectable="false"
android:textSize="24sp"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
@ -125,11 +136,11 @@
<Spinner
android:id="@+id/spinnerCurrency"
android:layout_width="374dp"
android:layout_height="47dp"
android:layout_marginStart="10dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="10dp"
android:layout_width="360dp"
android:layout_height="30dp"
android:layout_marginStart="16dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView11" />
@ -148,7 +159,6 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/spinnerCurrency" />
<TextView
android:id="@+id/textView10"
android:layout_width="wrap_content"
@ -158,7 +168,7 @@
android:text="@string/silentdragon_version"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/divider4" />/>
app:layout_constraintTop_toBottomOf="@+id/divider4" />
<TextView
android:id="@+id/lblServerVersion"

2
app/src/main/res/layout/content_receive.xml

@ -11,7 +11,7 @@
<ImageView
android:layout_width="0dp"
android:layout_height="354dp" app:srcCompat="@android:color/black"
android:layout_height="320dp" app:srcCompat="@android:color/black"
android:id="@+id/imageView"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" android:layout_marginBottom="8dp"

2
app/src/main/res/values/strings.xml

@ -77,7 +77,9 @@
<!-- activity_settings -->
<string name="disconnect">Disconnect</string>
<string name="change_wormhole">Change Wormhole</string>
<string name="silentDragon_connection_address">SilentDragon connection address</string>
<string name="wormhole_settings">Wormhole Settings</string>
<string name="disallow_routing_over_external_service">Disallow routing over external service/internet</string>
<string name="only_attempts_direct_connection">If checked, the app will only attempt a direct connection to SilentDragon, and not route traffic over the internet via the WormHole service at wormhole.myhush.org . Please see the https://myhush.org/silentdragon for more details</string>
<string name="currency">Currency</string>

63
release_build_process.md

@ -0,0 +1,63 @@
# Release Build Process
The first time you create a release build you'll need to create a keystore file and prepare a properties file. The
release keystore is used for app signing and a properties file is used to store
sensitive information about the keystore. **These files should not be committed
to git.** Once you have both of these files you can create a release build for
the Google Play Store.
## Create a release keystore
### Creating a release keystore via CLI
The `keytool` command can be used, for example:
keytool -genkey -alias silentdragon -keyalg RSA -keystore new.jks -dname "CN=Duke Leto, O=Hush" -storepass testing -keypass 123 -validity XXX
### Creating a release keystore via GUI
* With Android Studio IDE open, on the system bar click Build -> Generate Signed Bundle/APK
* Select the APK option instead of the Bundle option
* On the next screen select app as the module and click "Create new"
* Set the Key Store Name to `silent_dragon_keystore.jks` and the path to that of the project, create a password for the keystore path, a Key alias, and a key password. The store password and key password should be the same. Fill out some basic organization information and click Ok.
* On the next screen make sure the build variant "release" is selected and click Finish.
## Preparing a properties file
Copy `secrets.properties` file from `examples` folder and paste it to the projects main directory.
Fill store_file_location, key_alias, key_password and store_password when you created the release keystore.
## Building a release APK for Google Play
Before creating each build you should increment the version code & version name
in the build.gradle file. These must be incremented for each release otherwise
the Play Store will reject the build.
To create a release build navigate to the project directory in terminal and run
```
./new_binary.sh 1.2.3
```
where 1.2.3 is the version number, which must match the codebase to be accepted to Google Play.
This will produce an apk file in the following directory.
SilentDragonAndroid/app/build/output/apk/release/app-release.apk
and also copy it to the current directory with the filename SilentDragonAndroid-1.2.3.apk
This build can be directly uploaded to Google Play.
## Building a release APK for F-Droid
This will be pursued once lite wallet functionality exists in the SilentDragonAndroid wallet.
## Contributing
Contributions to this project are welcome and encouraged.
## License
This project is under the GNU Public License v3. For the full license, see [LICENSE](LICENSE).
Loading…
Cancel
Save