Appetize Docs
HomeDemoUploadPricing
  • Introduction
  • Platform
    • App Management
      • Uploading Apps
        • Android
        • iOS
      • App Dashboard
      • Running Apps
      • App Permissions
    • Device Sandbox
    • Embedding
    • Sharing
    • Session Inactivity Timeout
    • Query Params Reference
  • Features
    • Devices & OS Versions
    • Network Traffic Monitor
    • Debug Logs
    • UI Automation
    • Proxy
    • Language & Locale
    • Mock Location
    • Deep links
    • Launch Params
    • Media
    • Auto-grant Permissions
    • Custom Branding
    • Custom Launch Pages
    • Advanced Features
      • Android
        • ADB tunnel
        • Hide Password Visibility
      • Reserved Devices
  • Account
    • Invite your team
    • Single Sign-On
      • OpenID Connect
      • SAML
      • Azure Active Directory
      • Google Workspace (GSuite)
    • Reporting
      • Session History
      • Usage Summary
  • Infrastructure
    • Configure Network Access
    • Enterprise Hosting Options
  • JavaScript SDK
    • Configuration
    • Automation
      • Device commands
      • Touch interactions
    • API reference
      • Initialization
      • Client
      • Session
      • Types
        • AdbConnectionInfo
        • AppetizeApp
        • AndroidElementAttributes
        • Coordinates
        • DeviceInfo
        • Element
        • ElementBounds
        • IOSAccessibilityElement
        • IOSElementAttributes
        • NetworkRequest
        • NetworkResponse
        • SessionConfig
        • SwipeMove
        • RecordedAction
        • RecordedSwipeAction
        • RecordedKeypressAction
        • RecordedPosition
        • RecordedTapAction
        • RecordedTouchAction
        • UserInteraction
  • Testing
    • Getting Started
    • Writing Tests
    • Running Tests
    • Test Configuration
    • Continuous Integration
    • Record Tests (experimental)
    • Trace Viewer
    • Web Tests on Mobile Browsers
  • REST API
    • Create new app
    • Update existing app
    • Direct file uploads
    • Delete app
    • List apps
    • Usage summary
    • Devices & OS Versions
      • v1
    • IP Blocks
      • v1
  • Guides & Samples
    • Impersonation
    • Automate Sign-in Flow
    • Screenshot Automation
    • Unlock Device
    • Validate Analytics Events
    • Lock Your Device to One App
    • Test Accessibility Font Sizes
    • Common testing scenarios
    • Samples Repository
  • Deprecated
    • Cross-document messages
  • Changelog
  • Additional Support
    • Knowledge Base
    • Support Request
Powered by GitBook
On this page
  • Passing Data to your Application
  • With Query Parameter
  • With JavaScript SDK
  • Retrieving Data in your Application
  1. Features

Launch Params

With Launch Params, you can pass custom data to your mobile apps while running in Appetize. It can be useful to load custom content, skip onboarding, auto-login a specified user, or custom tracking.

PreviousDeep linksNextMedia

Last updated 10 months ago

Passing Data to your Application

With Query Parameter

Set the params data to pass to your application. The data needs to be an URL-Encoded JSON Object e.g.

&params={"foo":"bar"}

should be encoded to

&params=%7B%22foo%22%3A%22bar%22%7D

See for more information.

With JavaScript SDK

Send the params data to pass to your application as part of the configuration. The data needs to be a JSON Object e.g.

await client.setConfig({
    params: {"foo":"bar"},
    ...
})

See for more information.

Retrieving Data in your Application

For convenience, we set the key "isAppetize": true while streaming your app to allow you to easily detect if your app is running in Appetize.

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 accessibly 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);
...

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

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

when queried, will return:

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

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.

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:

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

when queried, will return:

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

The data passed will be stored in the shared defaults object, accessible by calling the appropriate method (based on type) e.g.

[[NSUserDefaults standardUserDefaults] boolForKey:@"isAppetize"]
[[NSUserDefaults standardUserDefaults] objectForKey:@"objectKey"]
[[NSUserDefaults standardUserDefaults] stringForKey:@"stringKey"]
...

The data passed will be stored in the shared defaults object, accessible by calling the appropriate method (based on type) e.g.

UserDefaults.standard.bool(forKey: "isAppetize")
UserDefaults.standard.object(forKey: "objectKey")
UserDefaults.standard.string(forKey: "stringKey")
...

Note that extension bundles will not have access to the app's standard UserDefaults. To work around this issue, please see .

Note that extension bundles will not have access to the app's standard UserDefaults. To work around this issue, please see .

Sharing Data with Your Containing App
Sharing Data with Your Containing App
Configuration
Query Params Reference