[Improvement] Need ability to Pass multiple string extras to intentOptions
See original GitHub issueIn #539 the feature of passing intent option while using expresso driver was added. While passing single option value combination works fine, when passing multiple options only first option is actually passed to the target activity.
Examples:
- Passing
es
params with appium in espresso mode
intentOptions: { 'es' => ["option1", 'value1', "option2", "value2"],
'action' => 'android.intent.action.MAIN',
'categories' => 'android.intent.category.LAUNCHER',
'component' => 'com.bumble.app/.ui.launcher.DebugLauncherActivity',
'flags' => 'FLAG_ACTIVITY_NEW_TASK' },
POST request to the appium
[debug] [WD Proxy] Matched '/session' to command name 'createSession'
[debug] [WD Proxy] Proxying [POST /session] to [POST http://localhost:53467/session] with body: {"capabilities":{"firstMatch":[{"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"platformName":"Android","platformVersion":null,"deviceName":"emulator-5554","appActivity":".ui.launcher.DebugLauncherActivity","appPackage":"com.bumble.app","appWaitActivity":"*","automationName":"espresso","skipServerInstallation":true,"noSign":true,"newCommandTimeout":0,"autoGrantPermissions":true,"skipUnlock":true,"fullReset":false,"tmpDir":"/var/folders/b9/sz7k63z90g93_sfmq86bg7yw0000gp/T/appium_temp/0","intentOptions":{"es":["option1","value1","option2","value2"],"action":"android.intent.action.MAIN","categories":"android.intent.category.LAUNCHER","component":"com.bumble.app/.ui.launcher.DebugLauncherActivity","flags":"FLAG_ACTIVITY_NEW_TASK"},...
Data recieved by target activity
D DebugLauncher: {"action":"android.intent.action.MAIN","categories":["android.intent.category.LAUNCHER"],"component":{"package":"com.bumble.app","class":"com.bumble.app.ui.launcher.DebugLauncherActivity"},"flags":335544320,"extras":{"option1":"value1"}}
If I start the activity with adb command
adb shell am start -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -n com.bumble.app/.ui.launcher.DebugLauncherActivity --es option1 value1 --es option2 value2
Data received by the target activity
D DebugLauncher: {"action":"android.intent.action.MAIN","categories":["android.intent.category.LAUNCHER"],"component":{"package":"com.bumble.app","class":"com.bumble.app.ui.launcher.DebugLauncherActivity"},"flags":268435456,"extras":{"option1":"value1","option2":"value2"}}
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Android, Can I use putExtra to pass multiple values
You could pass a 'bundle' of extras rather than individual extras if you like, for example:- Intent intent = new Intent(this, ...
Read more >Using Intents and Extras to pass data between Activities
Whenever you need data from an activity to be in another activity, you can pass data between then while starting the activities.
Read more >Android Intents with Chrome - Chrome Developers
This gives you a lot more flexibility in controlling how apps are launched, including the ability to pass extra information into the app...
Read more >Web Intent - Ionic Native
Send a result back to the Intent that started this Activity. The data can be passed using 'extras'. Returns: Promise<any>. IntentOptions. Param ...
Read more >Android 13 changelog: A deep dive by Mishaal Rahman
This is everything you need to know about new Android 13 features, its release date ... USB HAL 2.0 with support for limiting...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
makes sense. I’ll add the necessary changes
Cool, thanks for your assistance