Problem
The current deep link launch flow in telnet mode is convoluted: it injects an entry breakpoint, waits for the app to hit it, stops the app, then re-launches via ECP with the deep link args. This is fragile and unnecessary. And, doesn't work well with debug protocol mode.
Solution
When deepLinkUrl is defined, use this flow instead:
- Start the upload and get a promise (do not await it)
- Immediately fire the ECP deep link request
- Await the upload promise
if (this.launchConfiguration.deepLinkUrl) {
const uploadPromise = this.uploadApp(); // do NOT await yet
const deepLinkUrl = await util.resolveUrl(this.launchConfiguration.deepLinkUrl);
await util.httpPost(deepLinkUrl);
await uploadPromise;
}
It seems that the Roku device will queue up the launch params, and since uploading and compiling takes so long, we're almost guaranteed to have these params passed in through main!
Acceptance Criteria
Problem
The current deep link launch flow in telnet mode is convoluted: it injects an entry breakpoint, waits for the app to hit it, stops the app, then re-launches via ECP with the deep link args. This is fragile and unnecessary. And, doesn't work well with debug protocol mode.
Solution
When
deepLinkUrlis defined, use this flow instead:It seems that the Roku device will queue up the launch params, and since uploading and compiling takes so long, we're almost guaranteed to have these params passed in through main!
Acceptance Criteria
deepLinkUrlis defined, the upload is started without awaiting, the ECP deep link request is fired immediately, and then the upload is awaiteddeepLinkUrlis not defined, launch behavior is unchanged