21

So after developing an extension for a few hours, assuming that the chrome.socket API would be available to extensions, I load in my extension and I'm told that the Socket API is only available for 'Packaged Apps'.

Does anyone know what's happening, and whether extensions will get the feature (back, since I think they had access when it was in .experimental)?

1 Answer 1

18

From the Chrome docs:

Packaged apps can act as a network client for TCP and UDP connections.

No, extensions do not have access to the socket API, and they aren't likely to ever get it.

Your confusion is understandable, since what Google called "packaged apps" used to be nothing but glorified extensions with an icon on the home screen. However, Google is now driving a much wider divide between extensions and apps.

Extensions used to have a subset of the functionality the apps did, but now there is mutually exclusive functionality in each. Extensions are meant for enhancing normal Web browsing, whereas apps are meant to be used as stand-alone tools that do not interfere with normal browsing. If you look at the API lists for apps and for extensions, you'll see that the list is vastly different: apps have the powerful hardware- and OS-centric APIs like socket, usb, and bluetooth, while extensions have a monopoly on browser-centric APIs like tabs, cookies, and bookmarks.

Sign up to request clarification or add additional context in comments.

5 Comments

Thanks for highlighting the part of the text, I missed that. I'd still like to know more about why, and what any plans are. I've filed a bug to try to find out, and will report here if I get a reply.
@Tom: What was the bug report ID/URL, if you still have it? I was about to file one. (Yes, it's 2016, and things haven't changed...)
@i336_ Sorry, I don't have it easily available. I only saw now that this question has had over 2.5k views!
@Tom That's absolutely fine. Considering how long it's been, it doesn't look like this is going to change in Chrome. Ah well.
the real question i have is how will extensions be able to use those apis like bluetooth socket usb etc now that packaged apps are obselete? im ona chromebook and want to make app that has custom server

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.