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

Add capacitor android #3955

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

McGiverGim
Copy link
Member

This is a PR trying to add Capacitor support to the Configurator.

I make it in a draft state because I was trying to make Serial working and I'm having problems to debug it. I've been trying to debug with an FC connected. I have tried wifi debug without luck with a real device, and usb passthrough with the emulator without luck neither. Maybe other with more knowledge (or luck) can give it a try.

I have three commits, to try to let the things clear and be able to divide this PR in parts in the future:

  • The first adds Capacitor to the Configurator with Android support. The major part of files are created by Capacitor.
  • The second one removes some lines that make the app crash (there is not chrome var here)
  • The third one adds one library for usb-serial to the app, but I can't advance because the problems to debug explained. Look at the webSerial.js file, is where I was trying to do some tests.

To test this PR you need to have Android Studio installed. You need some Virtual emulator created (or a real device connected in debug mode). I've added some commands to the package.json to make this easier. The steps are:

  1. Build the vite app with yarn build
  2. Sync the contents of the vite app with the Android app with yarn cap:sync
  3. Start the Android app in the emulator with yarn cap:android (you can use too the npx cap open android command to open Android Studio with the app and execute from there).

Alternativelly to test this faster I've added a yarn android command that does the three steps above in one. The hot deploy is not working in this version, it's in the todo list.

Copy link

netlify bot commented May 13, 2024

Deploy Preview for origin-betaflight-app ready!

Name Link
🔨 Latest commit 192f8bd
🔍 Latest deploy log https://app.netlify.com/sites/origin-betaflight-app/deploys/66460ac3e0165b000889410b
😎 Deploy Preview https://deploy-preview-3955.dev.app.betaflight.com
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

This comment has been minimized.

@haslinghuis haslinghuis mentioned this pull request May 14, 2024
33 tasks
Copy link

sonarcloud bot commented May 16, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
2 Security Hotspots
8.1% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud

@McGiverGim
Copy link
Member Author

Rebased against master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

2 participants