Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: write setup guide for firefox for android #2870

Merged
merged 5 commits into from
Nov 21, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions doc/SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,29 @@

To connect to a remote development LND node you can use a [test account](https://github.com/bumi/lightning-browser-extension/wiki/Test-setup)

## Install and debug extension in Firefox Android
pavanjoshi914 marked this conversation as resolved.
Show resolved Hide resolved

a. **Prerequisite**

1. Install or update [web-ext](https://github.com/mozilla/web-ext) to version 4.1.0 or later.
2. Install the [Android Platform Tools](https://developer.android.com/tools/releases/platform-tools) (you can use Android studio's [sdk manager](https://developer.android.com/studio/intro/update.html#sdk-manager) or [sdk manager](https://developer.android.com/tools/sdkmanager) command line tools to install android platform tools)
3. Make sure you have adb installed and in your PATH.

b. **Setup Android Emulator**

1. Install [Firefox for Android Nightly](https://play.google.com/store/apps/details?id=org.mozilla.fenix) on Android
2. Enable [Android USB debugging](https://developer.android.com/studio/debug/dev-options) on the device.
3. Attach your device to the development computer using a USB cable. When prompted, allow USB debugging for the connection.
pavanjoshi914 marked this conversation as resolved.
Show resolved Hide resolved
4. In the settings view for Firefox for Android Nightly, enable "Remote debugging via USB."
5. Run `$ adb devices` in the command shell to get the device code

c. **Install and run extension**

1. Remove native messaging permission from extensions manifest (for development environment specifically, this needs to be done)
pavanjoshi914 marked this conversation as resolved.
Show resolved Hide resolved
2. Run extension's local development environment via `$ ALBY_API_URL="https://api.getalby.com" yarn run dev:firefox`
3. Go to extension's dist directory: `dist/development/firefox`
4. In the unzipped dist directory of the extension run `$ web-ext run -t firefox-android --adb-device <your_device_code> --firefox-apk org.mozilla.fenix`

### Multiple Extensions

It is not recommended to have multiple versions of the extension (development + official) running in the same browser. You will have instances of the extension with the same icon which is confusing, and also leads to a poor webln experience as both extensions will launch a popup. There may also be unexpected bugs due to conflict with the two extensions running at the same time.
Expand Down