Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

launch my installed application from chrome browser

My requirement is to launch my installed application from chrome browser if it is installed on client machine, If not installed then I wanted to start download. What is best recommended solution for chrome?

So fare i tried following

used NPAPI, but due to deprecation of NPAPI by chrome I can't use.

Checked PNacl and Pepper API both API not providing access to local file system to launch an application. They just port my C/C++ code in browser and run it in browser environment with sandbox restrictions.

Is it true only option i have is to use native messaging? Or is there any other option for simple task to launch my application from our url,

Regarding “Native Messaging”

  1. Do users need to install my extension
  2. Do i need to add my extension to chrome store
  3. How to deal with Registry permissions for non admin users
  4. Can i install extension to chrome along with my app installation

Note :- Found some providers use “External Protocol Request” to launch application but there are no enough resources where can i found more about this

Thanks and Regards, Pravin

like image 607
Pravin Avatar asked Nov 11 '22 08:11

Pravin


2 Answers

For what its worth, see here - http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/nativeMessaging/

the README indicates that Native Messaging can now be added even by non-Admins.

But it appears Native Messaging will only work for Extensions: "Extensions can exchange messages with native applications(...)" and I dont imagine you can expect all of your users to do that.

like image 74
FuzzyAmi Avatar answered Jan 04 '23 03:01

FuzzyAmi


To open it if it's installed you just need to register your application (at the OS level, so the details will vary by OS; you don't say what OS you are targeting) as a handler for some specific scheme, then have your page open that scheme. That's the same flow that causes mailto: links to open a user's mail client, for instance.

like image 30
smorgan Avatar answered Jan 04 '23 01:01

smorgan