Add ability to specify intent when launching android app

RESOLVED FIXED in Firefox 68

Status

defect
P1
normal
RESOLVED FIXED
3 months ago
3 months ago

People

(Reporter: rwood, Assigned: rwood)

Tracking

(Blocks 1 bug)

Version 3
mozilla68
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox68 fixed)

Details

Attachments

(1 attachment)

Currently Raptor launches the android app using the default intent of 'android.intent.action.Main' (mozdevice ADBDevice) [0].

For Fenix we need to use the intent 'android.intent.action.VIEW' instead. Add support to Raptor for an 'intent' command line argument. If that argument is not provided default to 'android.intent.action.Main'. Pass in the intent when launching the app at [1].

[0] https://searchfox.org/mozilla-central/rev/1b2636e8517aa48422ed516affe4d28cb7fa220a/testing/mozbase/mozdevice/mozdevice/adb.py#3095

[1] https://searchfox.org/mozilla-central/rev/1b2636e8517aa48422ed516affe4d28cb7fa220a/testing/raptor/raptor/raptor.py#615

See Also: → 1543755

Yeah, this totally makes sense. After Bug 1533385, I want us to steer toward launching without a specific Activity:

am start -W -a android.intent.action.VIEW -d URL $PACKAGE

should work and simplify everybody's lives (if I'm reading the am start documentation correctly).

(In reply to Robert Wood [:rwood] from comment #2)

Adds support for '--intent' command line arg. To test locally install the latest raptor-release fenix app, and add this section to raptor/raptor/tests/raptor-tp6m-1.ini:

[raptor-tp6m-google-fenix]
apps = fenix
test_url = https://www.google.com
playback_pageset_manifest = mitmproxy-recordings-raptor-tp6m-google.manifest
playback_recordings = android-google.mp
measure = fnbpaint, fcp, dcf, loadtime

Since activity and intent defaults are provided in raptor/cmdline.py, you can just run:

./mach raptor-test --test raptor-tp6m-google-fenix --app fenix --binary org.mozilla.fenix

Or specify everything:

./mach raptor-test --test raptor-tp6m-google-fenix --app fenix --binary org.mozilla.fenix --activity browser.BrowserPerformanceTestActivity --intent android.intent.action.VIEW

Blocks: 1545175
Blocks: 1518975

Patch failed to autoland, merge conflicts. Rebased, updated phab, pushed to try for quick sanity check:

https://treeherder.mozilla.org/#/jobs?repo=try&revision=3780493c245c55b461cee131199730a2348b75b6

Pushed by rwood@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/56716e17c88d
Add ability to specify intent when launching android app; r=davehunt
Status: ASSIGNED → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
You need to log in before you can comment on or make changes to this bug.