Upload Application
Use this method to upload an APK or IPA artifact that will be used by your test system.
The SDK sends the file as a binary stream. Do not convert the file to Base64 or wrap it in JSON.
Before You Begin
- Confirm that the APK or IPA is readable by the test runner.
- Choose a meaningful version label for the build.
- Keep the source stream open until the upload method completes.
- Enable image injection only when the test workflow requires Device Park gadget injection.
SDK Method
Java | Node.js |
|---|---|
client.applications().upload(stream, fileName, version, imageInjection) | await client.applications().upload(stream, fileName, version, imageInjection?) |
Both SDKs keep the three-parameter call for normal uploads. imageInjection defaults to false.
Parameters
Parameter | Type | Required | Validation | Description |
|---|---|---|---|---|
stream | readable stream | Yes | Must contain readable binary data | APK or IPA content |
fileName | string | Yes | Must not be blank | Original file name |
version | string | Yes | Non-blank, maximum 50 characters | Build version label |
imageInjection | boolean | No | Default false | Enables configured gadget injection |
Request Mapping and Headers
The upload is a binary stream, not JSON and not Base64.
SDK input | Transport mapping |
|---|---|
stream | Request body with application/octet-stream |
fileName | file-name header |
version | version header |
imageInjection | image-injection header as true or false |
OAuth authorization and other transport headers are added by the SDK client.
Standard Upload
try (InputStream input = Files.newInputStream(Paths.get("/path/to/mobile-app.apk"))) {
Application application = client.applications().upload(
input,
"mobile-app.apk",
"1.0.0"
);
System.out.println(application.fileKey());
}Upload with Image Injection
Use image injection only when the test scenario depends on Device Park gadget injection.
try (InputStream input = Files.newInputStream(Paths.get("/path/to/mobile-app.apk"))) {
Application application = client.applications().upload(
input,
"mobile-app.apk",
"1.0.0",
true
);
}Omit imageInjection or pass false for a standard upload. Passing true changes upload processing and should be enabled only for workflows that require it.
Result
The method returns one Application.
Field | Type | Nullable | Meaning |
|---|---|---|---|
revision | number | Yes | Stored artifact revision |
sizeInBytes | number | Yes | Uploaded artifact size |
version | string | Yes | Version supplied to upload(...) |
fileKey | string | Yes | Stable application identifier |
filePath | string | Yes | Server-side storage path |
downloadUrl | string | Yes | Potentially time-limited download URL |
createdAt | ISO-8601 string | Yes | Creation timestamp |
{
"revision": 1,
"sizeInBytes": 24576000,
"version": "1.0.0",
"fileKey": "mobile-app.apk",
"filePath": "applications/mobile-app.apk",
"downloadUrl": "https://devicepark.testinium.io/temporary-download-url",
"createdAt": "2026-07-28T09:00:00Z"
}Store fileKey; it is the stable application identifier. downloadUrl may expire and should not replace fileKey in your data model.
The caller owns the input stream lifecycle. Java should use try-with-resources.
Uploading stores the application artifact. Device installation and test-session behavior are separate steps controlled by the consuming test flow.
Image injection changes upload processing only. Passing false or omitting the parameter preserves the standard upload behavior.
Next Step
List applications to inspect the stored revision or keep the returned fileKey in the test configuration.