documentation
  • Introduction
    • Overview
      • Scandium Features & Concepts
  • Setting up your account
  • Create a test case
  • Supported Actions
  • File uploads
  • Assertions
  • Groups
  • Step settings
  • Variables
  • System Functions
  • Email Testing
  • Data-driven Testing
  • Test Suites
  • Results
    • Test results
    • Suite results
  • Why did my test fail?
  • API Testing
    • Getting Started
    • API Suites
    • Scheduling and Monitoring
  • Mobile Application Testing
    • Create a mobile project
    • Uploading Apps
      • Android
      • iOS
    • Testing mobile app
  • Common Testing Scenarios
  • Test Management
    • Tests and Folders
    • Tags
  • INTEGRATIONS
    • Continuous Integration (CI/CD)
    • Azure Devops
    • Bamboo CI
    • Bitbucket Pipelines
    • Circle CI
    • Github Actions
  • GitLab CI
  • Jenkins
  • Travis CI
Powered by GitBook
On this page
  • Finding your APK file
  • Converting AAB to APK
  • Troubleshooting
  • Running apps that are not permitted to run on rooted device?
  1. Mobile Application Testing
  2. Uploading Apps

Android

Scandium requires the APK bundle containing your application to get started.

PreviousUploading AppsNextiOS

Last updated 7 months ago

Finding your APK file

With Android Studio

Select Build -> Build APK(s) -> Build APK(s) or Build -> Generated Signed APK (and following the prompts)

Building with Android Studio

Once the build is complete you can locate the .apk file by selecting locate in the dialog that appears

or by navigating to

{project name}/{app module name}/build/outputs/apk/

With Gradle

Generate your build with gradle by running the assemble command for your preferred app build variant e.g. debug variant

Copy

./gradlew assembleDebug

Once the build is complete you can locate the .apk file by navigating to

{project name}/{app module name}/build/outputs/apk/

Converting AAB to APK

Generate Universal APKS

bundletool build-apks --bundle=/<your app>/{aab name}.aab \
    --output=/{your app}/{app name}.apks \
    --mode=universal

Generate Single APK file from the Universal APKs

unzip -p /{your app}/{app name}.apks universal.apk > /{your app}/{app name}.apk

Troubleshooting

If you are having trouble running your uploaded Android app in Scandium, we recommend trying to run the same APK on the standard Google-provided Android emulator locally over ADB.

Once your emulator is launched and available via adb devices, you can install it using the install command:

adb install -r {your app}.apk

or by simply dragging over the apk into the emulator window.

Running apps that are not permitted to run on rooted device?

Scandium runs Android emulators that are very similar to the Android emulators provided by Google. So, if you encounter any issue, it's often easier to troubleshoot on the Android emulators locally, and then re-upload to Scandium.The standard Google-provided Android emulators do come with su. So, some apps can detect this and have limitations to run on rooted devices. If that is the issue, and you would like your app to run on Scandium, you may detect when your app is running in Scandium and skip your rooted check in that case. For convenience, we set the key "isAppetize" to true when streaming apps. Check below for example.

With Intents

The data will be passed as extras into the intent that launches your app, accessible by calling the appropriate get method (based on type) e.g.

Intent intent = getIntent()
intent.getBooleanExtra("isAppetize", false);
intent.getStringExtra("stringKey");
...

With SharedPreferences

The data will also be stored in SharedPreferences under a file called prefs.db. This is accessible by fetching that SharedPreferences instance and calling the appropriate get method e.g.

SharedPreferences preferences = getApplicationContext().getSharedPreferences("prefs.db", Context.MODE_PRIVATE);
preferences.getBoolean("isAppetize", false);
preferences.getString("stringKey", null);
...

With Intents

The data will be passed as extras into the intent that launches your app, accessible by calling the appropriate get method (based on type) e.g.

intent.getBooleanExtra("isAppetize", false)
intent.getStringExtra("stringKey")
...

With SharedPreferences

The data will also be stored in SharedPreferences under a file called prefs.db. This is accessibly by fetching that SharedPreferences instance and calling the appropriate get method e.g.

Copy

val preferences = applicationContext.getSharedPreferences("prefs.db", Context.MODE_PRIVATE);
preferences.getBoolean("isAppetize", false)
preferences.getString("stringKey", null)
...

Complex types (e.g. arrays or objects) will automatically be serialized and need to be deserialized manually before using e.g. passing an object:

Copy

{
  "obj": { "stringKey": "value", "boolKey": true }
}

when queried, will return:

Copy

"{"stringKey":"value","boolKey":true}"
Select locate in the dialog to navigate to the apk

Scandium currently only supports apk files for Android. In order to get your application to work with Scandium you will need to convert your aab to an apk by making use of the provided by Google.

bundletool