From 0d3ca99dfacfabca50ed08544d13f4c6a2264990 Mon Sep 17 00:00:00 2001 From: Pierre Dommerc Date: Fri, 27 Jan 2023 21:18:43 +0100 Subject: [PATCH] docs(nc-android): update readme (#2924) * docs(nc-android): update readme * docs(nc-android): update readme --- nym-connect-android/README.md | 77 +++++++----------------- nym-connect-android/src-tauri/Cargo.toml | 2 +- nym-connect-android/src-tauri/src/lib.rs | 9 --- 3 files changed, 24 insertions(+), 64 deletions(-) diff --git a/nym-connect-android/README.md b/nym-connect-android/README.md index bbd9b55bbb..73e541083d 100644 --- a/nym-connect-android/README.md +++ b/nym-connect-android/README.md @@ -3,9 +3,9 @@ Copyright 2020 - Nym Technologies SA SPDX-License-Identifier: Apache-2.0 --> -# Nym Connect +# Nym Connect - Android -Nym is an open-source, decentralized and permissionless privacy system. It provides full-stack privacy, allowing other applications, services or blockchains to provide their users with strong metadata protection, at both the network level (mixnet), and the application level (anonymous credentials) without the need to build privacy from scratch. +[Nym Connect](https://github.com/nymtech/nym/tree/develop/nym-connect) application for Android. Nym Connects sets up a SOCKS5 proxy for local applications to use. @@ -14,70 +14,40 @@ Nym Connects sets up a SOCKS5 proxy for local applications to use. - `Yarn` - `NodeJS >= v16` - `Rust & cargo` +- Android development environment (JDK, SDK/NDK, AVD etc...) -## Installation prerequisites - Windows - -- When running on Windows you will need to install c++ build tools -- An easy guide to get rust up and running [Installation]("http://kennykerr.ca/2019/11/18/rust-getting-started/") -- When installing NodeJS please use the `current features` version -- Using a package manager like [Chocolatey]("chocolatey.org") is recommended -- Nym connect requires you to have `Webview2` installed, please head to the [Installer](https://developer.microsoft.com/en-us/microsoft-edge/webview2/#download-section), this will ensure a smooth app launch +For setting up an Android development environment see +https://next--tauri.netlify.app/next/guides/getting-started/prerequisites/linux#android ## Installation -Inside the `nym-connect` directory, run the following command: +Inside the `nym-connect-android` directory, run the following command: + ``` yarn install ``` -## Development mode +## Development -You can compile nym-connect in development mode by running the following command inside the `nym-connect` directory: +Assuming there is a running android [emulator](https://developer.android.com/studio/run/emulator) +or a real [device](https://developer.android.com/studio/run/device) connected. +Inside the `nym-connect-android/src-tauri` directory, run the following command: ``` -yarn dev -``` -This will produce a binary in - `nym-connect/target/debug/` named `nym-connect` - -To launch, navigate to the directory and run the following command: `./nym-connect` - -## Production mode - -Run the following command from the `nym-connect` folder -``` -yarn build -``` -The output will compile different types of binaries dependent on your hardware / OS system. Once the binaries are built, they can be located as follows: - -### Binary output directory structure -``` -**macos** -| -└─── target/release -| |─ nym-connect -└───target/release/bundle/dmg -│ │─ bundle_dmg.sh -│ │─ nym-connect.*.dmg -└───target/release/bundle/macos/MacOs -│ │─ nym-connect -| -**Linux** -└─── target/release -| │─ nym-connect -└───target/release/bundle/appimage -│ │─ nym-connect_*_.AppImage -│ │─ build_appimage.sh -└───target/release/bundle/deb -│ │─ nym-connect_*_.deb -| -**Windows** -└─── target/release -| │─ nym-connect.exe -└───target/release/bundle/msi -│ │─ nym-connect_*_.msi +WRY_ANDROID_PACKAGE=net.nymtech.nym_connect_android WRY_ANDROID_LIBRARY=nym_connect_android cargo tauri android dev ``` -For instructions on how to release nym-connect, please see [RELEASE.md](./docs/release/RELEASE.md). +#### Debugging + +https://next--tauri.netlify.app/next/guides/debugging/application#mobile + +## Production + +To build the application bundles (APK and AAB files), run the build command. + +``` +WRY_ANDROID_PACKAGE=net.nymtech.nym_connect_android WRY_ANDROID_LIBRARY=nym_connect_android cargo tauri android build +``` # Storybook @@ -92,4 +62,3 @@ And build storybook static site with: ``` yarn storybook:build ``` - diff --git a/nym-connect-android/src-tauri/Cargo.toml b/nym-connect-android/src-tauri/Cargo.toml index ffac476d29..93e8c31750 100644 --- a/nym-connect-android/src-tauri/Cargo.toml +++ b/nym-connect-android/src-tauri/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "nym-connect-android" version = "1.1.7" -description = "nym-connect" +description = "nym-connect for Android" authors = ["Nym Technologies SA"] license = "" repository = "" diff --git a/nym-connect-android/src-tauri/src/lib.rs b/nym-connect-android/src-tauri/src/lib.rs index f4f42e2f12..c637c04666 100644 --- a/nym-connect-android/src-tauri/src/lib.rs +++ b/nym-connect-android/src-tauri/src/lib.rs @@ -75,15 +75,6 @@ impl AppBuilder { crate::operations::connection::disconnect::start_disconnecting, crate::operations::directory::get_services, crate::operations::export::export_keys, - // crate::operations::window::hide_window, - // crate::operations::growth::test_and_earn::growth_tne_get_client_id, - // crate::operations::growth::test_and_earn::growth_tne_take_part, - // crate::operations::growth::test_and_earn::growth_tne_get_draws, - // crate::operations::growth::test_and_earn::growth_tne_ping, - // crate::operations::growth::test_and_earn::growth_tne_submit_wallet_address, - // crate::operations::growth::test_and_earn::growth_tne_enter_draw, - // crate::operations::growth::test_and_earn::growth_tne_toggle_window, - // crate::operations::help::log::help_log_toggle_window, ]) .setup(move |app| { if let Some(setup) = setup {