Open URL with custom protocol

New Here ,
Dec 30, 2020

Copy link to clipboard

Copied

I'm developing an extension that communicates with a separate app that the user is expected to have installed and running. This app has registered a custom URL protocol, like foo:// which opens the app. When this URL is entered from the browser, it correctly opens up the app. However, I'd like to also have a button in my extension that will open the app using that protocol. Using cep.util.openURLInDefaultBrowser will not work, because that function requires that the URL have either the HTTP or HTTPS protocols. I've tried using the npm open package, but that does not appear to do anything (totally possible I'm doing something wrong there). Is there a way to accomplish this?

TOPICS
SDK

Views

44

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Open URL with custom protocol

New Here ,
Dec 30, 2020

Copy link to clipboard

Copied

I'm developing an extension that communicates with a separate app that the user is expected to have installed and running. This app has registered a custom URL protocol, like foo:// which opens the app. When this URL is entered from the browser, it correctly opens up the app. However, I'd like to also have a button in my extension that will open the app using that protocol. Using cep.util.openURLInDefaultBrowser will not work, because that function requires that the URL have either the HTTP or HTTPS protocols. I've tried using the npm open package, but that does not appear to do anything (totally possible I'm doing something wrong there). Is there a way to accomplish this?

TOPICS
SDK

Views

45

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Dec 30, 2020 0
Adobe Employee ,
Dec 30, 2020

Copy link to clipboard

Copied

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 30, 2020 0
New Here ,
Dec 30, 2020

Copy link to clipboard

Copied

In case anybody else is looking for this answer in the future, open does work, I just had a typo in my protocol 🤦‍:female_sign:

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 30, 2020 0
Adobe Employee ,
Dec 30, 2020

Copy link to clipboard

Copied

Confirming: Your custom protocol handler works?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 30, 2020 0
New Here ,
Dec 30, 2020

Copy link to clipboard

Copied

Correct - not using CEP, but using the open npm module.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 30, 2020 0