feat: add support for Android#15565
Conversation
|
My phone failed installing the apk from CI, with a message that the package is corrupt |
|
Yeah, that's because it is not signed (see the file name, |
|
hello this is really interesting and would like to take a look about i would like to test apk and try to build from git with android studio tnanks :) |
|
Hi @OOKAMIFR , my branch is feat/android but it contains a lot of changes! Note that this is mostly done to be built from Ubuntu 24.04 and you will need to do some work . In case you are on Windows/Mac/Other Linux distro, you may want to look into the devcontainer definition, which I use to develop on. Also, note that you won't be able to directly build from Android Studio. You may use Android studio to debug/profile the application, but the build process relies on CMake (gradle file gets generated by Qt to bundle the native library only, and I wasn't able to get the Qt plugin for Android Studio to work with VCPKG but perhaps I did something wrong) |
It installed on 12, and crashed on start. If this is 15 only, enforce this... but hopefully not, as what requires 15? |
|
Currently, it targets SDK 35 only (Android 15).
As written in the PR description, we will aim to support lower SDK - likely up to 11 since there is permissions and AAudio changes. In the current state, this is expected to crash, as it depends on the ready QML PRs - if you are interested, we are looking for help test and review those. Please note that as the rest of the 3.0, this is highly unstable software and we suggest to be extra careful/expect random behaviour currently! |
|
@JoergAtGithub could you please have a look again? We should now have a signed APK. If it works, I will setup some persisting keys so we can have rolling updates from |
|
More than willing to help. Wanted to have a look at libopenmpt/linmodplug, but sure will see what I can do here. |
|
I can install and start it now on my phone now |
|
Yep, that's the expected result!
This is partially being fixed in #15483 (which depends of #14849)
This is fixed in #15361 |
| - name: "[android] Setup signing key" | ||
| if: startsWith(matrix.artifacts_slug, 'android') | ||
| run: | | ||
| if [ -z "${ANDROID_SIGNING_KEYSTORE_BASE64}" ]; then |
There was a problem hiding this comment.
Do we need to register an Android code-sign key in name of Mixxx e.V. ?
There was a problem hiding this comment.
No need, we can simply generate a key with the Mixxx e.V as organisation. I have done that already, I will upload the secret once we merge the PR
There was a problem hiding this comment.
I have setup a certificate for CN=Android App, OU=Mixxx Development Team, O=Mixxx e.V now
| BUILDENV_SHA256="0821e7d4f6b989ed5acc3c9a8dafa00f479d9d8bfc8dea9f9b512816070c9bba" | ||
| fi | ||
| else | ||
| echo "ERROR: Unsupported architecture detected: $HOST_ARCH" |
There was a problem hiding this comment.
Is the host architecture of the VCPKG buildsystem really relevant here? I assumend that only the target architecture matters, but I might be wrong.
Does the host platform / compiler matter? Can I use the mixxx-deps-2.7-arm64-android-9dcfaf7 buildenv to build the Android app under Windows or macOS?
There was a problem hiding this comment.
No, unfortunately, it seems that it is relevant. Looking at VCPK, it seems that you need to cross compile from a predictable system due to toolings (e.g Qt moc, used during compilation)
In the wiki, I have suggested using DevContainer to allow building from Mac and Windows for now, till we support other hosts (if we decide it is necessary!)
| return -1; | ||
| } | ||
|
|
||
| #ifndef Q_OS_ANDROID |
There was a problem hiding this comment.
In general the libusb backend of hidapi should support reading the report-descriptor. Maybe an Android permission issue?
There was a problem hiding this comment.
Unfortunately, it only works once you have allowed the app to access the device, as it requires to communicate with the device
Currently, I have made the decision to follow the given flow:
- List all device (without hid read)
- User starts a controller
- Android permission popup
In the future, we could change to:
- List all device and popup permission request for each one to get HID read
- User starts a controller
Arguably, an Android device will usually only have USB device intended to be used in Mixxx so we could assume the second flow is acceptable, but I would suggest to keep the first one for now, as there is further work to do on permission anyway
JoergAtGithub
left a comment
There was a problem hiding this comment.
Code LGTM! And the .apk from CI starts up on my phone.
7597102 to
4239279
Compare
|
Thank you, for this great contribution! |

Currently, the Android app starts but it is pretty much unusable without most of the currently outstanding QML PRs.
I have a branch on my fork with most of these PR merged on top of this, if anybody wants to play with this locally.
TODO:
Waveform false positive assert fixTo be fixed laterTarget API 28 as per Qt guideline(will be done ahead of 3.0 release)