Skip to content

Commit f38f5f2

Browse files
committed
Cordova framework integration, Android support, mobile UI & options tab
Cordova integration and android platform : - Added cordova directory with required config - Added cordova applications generation in gulpfile - Added cordova development instructions - Used cordova plugins to simulate missing chrome api plugins (chrome.serial and chrome.fileSystem) - Added cordova clipboard support - Added android operating system and Cordova gui mode - Fixed some css and js files to make them working on Android as well as on computers - Added --skipdep argument to accelerate cordova build (gulp task) - Added a webview helper to help people to update the webview app of their device New options tab : - Added options tab replacing the options dropdown - Added option to switch between phones UI and computers UI Mobile interface and global interface improvements : - Simplified the structure of the header with flex css - Made headerbar and tab container responsive (compact headerbar and side menu) - All tabs are adapted to mobile interface (except firmware flasher) - The servos and adjustments tabs are not fully adapted but are "usable" - Improved header bar animation - Improved log expandation animation - Added swipe gesture to toggle side menu Fixes during the development : - Logo position - Dark mode - Auto connection - Error messages (cordova_chromeapi.js) - Responsive grid - Testing - Disconnection - Width of boxes inside the OSD tab - Fixed cli tab - OSD tab - Motor stop switch - White spaces in boxes - Dialogs size - Connect button state - Prevent tablet with a height larger than 575px to switch to computers ui - Fixed logging tab - Fixed code smell - Fixed yarn cordova plugin install issue - Fixed content_wrapper - Fixed vibrations when scrolling - Fixed scrolling bar alignment - Fixed dialogReportProblem height - Fixed rates logo - Fixed auto connection default value (true) - Fixed D to D max - Fixed dialogs Added required messages in locales/en/messages.json file Required changes Changed build alias name to betaflight Splitted main_cordova.html to a css and a js file Changed values which are automatically change by gulp tasks in cordova/package.json and cordova/config.xml Fixed code smells Fixed code smells Changed cordova plugins url Changed release.keystore
1 parent a52efd7 commit f38f5f2

File tree

100 files changed

+9099
-3035
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+9099
-3035
lines changed

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@ debug/
1313
release/
1414
testresults/
1515

16+
# Cordova
17+
cordova/www/
18+
cordova/platforms/
19+
cordova/plugins/
20+
cordova/resources/
21+
cordova/package-lock.json
22+
1623
# OSX
1724
.DS_store
1825

README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,15 @@ Unstable testing versions of the lates builds of the configurator for most platf
4848

4949
**Be aware that these versions are intended for testing / feedback only, and may be buggy or broken, and can cause flight controller settings to be corrupted. Caution is advised when using these versions.**
5050

51-
## Native app build via NW.js
51+
## Native app build via NW.js (windows/linux/macos) or Cordova (android)
5252

5353
### Development
5454

5555
1. Install node.js (version 10 required)
5656
2. Install yarn: `npm install yarn -g`
57-
3. Change to project folder and run `yarn install`.
58-
4. Run `yarn start`.
57+
3. (For Android platform only) Install Java JDK 8, Gradle and Android Studio (Android SDK at least level 19)
58+
4. Change to project folder and run `yarn install`.
59+
5. Run `yarn start`.
5960

6061
### Running tests
6162

@@ -69,12 +70,14 @@ yarn gulp <taskname> [[platform] [platform] ...]
6970
```
7071

7172
List of possible values of `<task-name>`:
72-
* **dist** copies all the JS and CSS files in the `./dist` folder.
73+
* **dist** copies all the JS and CSS files in the `./dist` folder [2].
7374
* **apps** builds the apps in the `./apps` folder [1].
74-
* **debug** builds debug version of the apps in the `./debug` folder [1].
75+
* **debug** builds debug version of the apps in the `./debug` folder [1][3].
7576
* **release** zips up the apps into individual archives in the `./release` folder [1].
7677

7778
[1] Running this task on macOS or Linux requires Wine, since it's needed to set the icon for the Windows app (build for specific platform to avoid errors).
79+
[2] For Android platform, **dist** task will generate the `./cordova` folder
80+
[3] For Android platform, you need to configure an emulator or to plug an Android device with USB debugging enabled
7881

7982
#### Build or release app for one specific platform
8083
To build or release only for one specific platform you can append the plaform after the `task-name`.
@@ -84,6 +87,7 @@ If no platform is provided, all the platforms will be done in sequence.
8487
* **Linux** use `yarn gulp <task-name> --linux64`
8588
* **Windows** use `yarn gulp <task-name> --win32`
8689
* **ChromeOS** use `yarn gulp <task-name> --chromeos`
90+
* **Android** use `yarn gulp <task-name> --android`
8791

8892
You can also use multiple platforms e.g. `yarn gulp <taskname> --osx64 --linux64`.
8993

3.95 KB
Loading
1.58 KB
Loading
2.38 KB
Loading
5.78 KB
Loading
9.94 KB
Loading
14.9 KB
Loading
71.8 KB
Loading
38.3 KB
Loading

0 commit comments

Comments
 (0)