Saving settings in chrome extension across devices - google-chrome

In my current chrome extension, I have a popup that has settings for content a content script it uses. I want to be able to save these user settings and have them synced up across devices (different browsers but same user).
I also have my extension connected to a server which has access to a database. Should I create my own login system to save these settings across devices? Or is there a better way to approach this.
I found documentation on OAuth, but there is not much information on if the user tokens are permanent or not, or how effective this would be for the features I am looking for.

Related

Automate connecting to bluetooth devices from Chrome

I've written a simple web app to factory-reset bluetooth devices that were accidentally turned on during shipping. The app scans for a class of bluetooth devices (those made by the company I work for), renders a list of devices found, and, when I click a button next to a device in the list, sends a reset message to the device.
This is a very manual process and I'd like to automate it. The problem is the Chrome dialog that asks for permissions to pair with a device. I am trying automate the app with Puppeteer, but I can't find a way to either (a) programmatically grant permissions to pair with a device or (b) to select the device in the dialog and click the "pair" button via Puppeteer. Anyone know if what I'm trying to do is possible, or if there's a better way to achieve the goal? Thanks!
This is not possible in Chrome. (I work on chrome.) The automation that does exist for Chrome's testing is layered such that actual Bluetooth connections aren't made.
Eventually we would like to enable this workflow via Enterprise configuration controls. But that is not started yet and there is no date commitment.
One alternative is to use node.js, though you lose the easy interface. You might build the reset backend in a node server and have it serve a web page interface.

Is it possible to create a Google Chrome extension that can set my computer's network settings?

I have a device that uses Chrome browser for it's front end.
I would like to add a wizard to it, but I don't want to use up any more memory or storage space on the device, especially since the wizard will likely only be used once, during the initial device setup.
So, it is possible to create a Google Chrome extension that can access and change my computer's network settings, as long as I give it permission to do so, or is that completely out of scope for a Google Chrome extension?
Basically, I want the extension to walk the customer through the initial setup process, part of which includes configuring the computer's network settings to be compatible with the device's default network settings. At the end of the wizard, the extension would put the computer's network settings back to what they originally were.
Is it possible to create a Google Chrome extension that can access and change my computer's network settings, as long as I give it permission to do so [...]
No, no Chrome API provides this level of access. So an extension cannot do it on its own.
As wOxxOm mentions in a comment, it's possible to also provide a separate program (called Native Host) that an extension can start, then talk to it to do things outside of extension APIs. However, that complicates the deployment of such an extension: you can't add the host components to a Web Store app, you need a separate installer for it.
Presumably, you're targeting multiple OSes with the browser being an interface for your device; this further complicates your hypothetical "wizard" and its installer.
Perhaps the best you can do is clear documentation + an extension/webpage that can test connectivity and suggest troubleshooting steps.
Your requirement is not still clear.
But it is understood that you want to change the ip address settings through any app.which will store a basic setting saved.
it is possible for some specific area but I don't know what is your condition.

Why the data in our browser's history is called to be synchronized?

When I was deleting data from my Chrome's history, it said it is deleting synced data. I wonder in which sense it is synced? Can you explain a little bit about it?
From what I have read:
Data synchronization technologies are designed to synchronize a single set of data between two or more devices, automatically copying changes back and forth.
Data in your Chrome browser (such as browsing history, saved passwords etc.) is synchronized with your Google account if you set it up. It meant that it was removing such data which was copied to your Google account.
Google's Chrome Web browser allows you to sync data between Chrome browsers on different computers and devices. So the history from all your devices using chrome and logged in with the same account will be deleted. You can disable sync from settings -> advanced sync settings.

Reason for installation through Chrome Web Store

Is there a technical reason, why a Google Drive application must be installed through the Chrome Web Store (which severely limits the number of potential users)?
The reason that installation is required is to give users the ability to access applications from within the Google Drive user interface. Without installation, users would have no starting point for most applications, as they would not be able to start at a specific file, and then choose an application.
That said, I realize it can be difficult to work with in early development. We (the Google Drive team) are evaluating if we should remove this requirement or not. I suspect we'll have a final answer/solution in the next few weeks.
Update: We have removed the installation requirement. Chrome Web Store installation is no longer required for an app to work with a user's Drive transparently, but it is still required to take advantage of Google Drive UI integrations.
To provide the create->xxx behaviour that makes a new application document from the drive interface, and to be able to open existing documents from links, there must be some kind of manifest registered with Google's systems and some kind of agreement from the user that an application can access your documents and work with specific file types. There's little way around this when you think about the effects of not doing this.
That said, there are two high level issues that make for compatibility problems.
As the poster says, the requirement to install in the chrome store
severely limits the number of potential users.
But why? Why do the majority of Chrome Web Store applications say that they only work on Chrome? Most of these are wrappers to web applications that work on a range of browsers, yet you click through a selection and most display "works on chrome", aka only installs on chrome.
Before we launched our application on chrome we found that someone had created "xxxxxxx launcher" in the store, that simply forwards to our web app page. We're still wondering why it only "works on chrome". I suspect that some default template for the web store has:
"container" : "CHROME",
in it, which is the configuration option to say chrome only. That said, I can't find one, so I'm very confused why this is. It would be healthier if people picked Chrome because it's the better browser (which it is in a number of regards), not because their choice is limited if they don't. People can always write to the application vendor and ask if this limitation is really necessary.
The second thought is that a standardised manifest format across cloud storage providers would mean a much higher take up in web app vendors. Although, it isn't hugely complex to integrate, for example, with Google Drive, the back-end and ironing out the the details took over a week in total. Multiply that lots of storage providers and you have you lose an engineer for 2 months + the maintenance afterwards. The more than is common across vendor integration, the more likely it is to happen.
And while I'm on it, a JavaScript widget for opening and saving (I know Google have opening) by each cloud storage provider would improve integration by web app vendors. We should be using one storage providers across multiple applications, not one web application across multiple storage providers, the file UI should be common to the storage provider.
In order to sync with the local file system, one would need to install a browser plug-in in order to bridge the Web with the local computer. By default, Web applications don't have file I/O permissions on the user's hard drive for security reasons. Browser extensions, on the other hand, do not suffer from this limitation as it's assumed that when you, the user, give an application permission to be installed on your computer, you give it permissions to access more resources on the local computer.
Considering the add-on architectures for different browsers are different, Google first decided to build this application for their platform first. You can also find Google Drive in the Android/Play marketplace, one of Google's other app marketplaces.
In the future, if Google Drive is successful, there may very well be add-ons created for Firefox and Internet Explorer, but this of course has yet to be done and depends on whether or not Google either releases the API's to the public or internally makes a decision to develop add-ons for other browsers as well.

How would HTML5 web databases be cleaned-up?

I've started looking into HTML web database storage for some Chrome extension I'm working on, and it made me wonder - Who should be cleaning abandoned web databases? As opposed to desktop apps, there's no uninstaller for a web site. And as opposed to regular cookies, web databases can be much larger than just 4KB.
I can imagine some browsers or addons might give advanced users a way to clean up locally stored data, but I can't imagine my parents doing that. What will prevent web sites from clogging their hard drive once this feature is commonly used? Is there any way honest and responsible web sites can have their local data removed once they are not used anymore?
On the two websites and 4 apps I use html5 local storage in, I offer an option somewhere (off the About page, or in account settings, or a link at the bottom of the page) which gives you the ability to remove the local database and key-value pairs, as well as the option to opt-out of the site using it.
It'll be persistent, just like cookies. The difference with cookies is that you can store much more data and no expire date can be given.
Firefox has an option to clean those information automatically (Offline storage)