Chrome App Store Manifest vs Web App Manifest - google-chrome

I'm trying to publish my web app to the Chrome App store. I'm confused by Step 2: Create a manifest file . Is this manifest file also a Web App manifest?
If they are different, does it mean that i need to have two manifest.json files, if I intend to also make it a progressive web app while also listing on Chrome App store? How should I go about doing this? Thanks.

No, it is a different format, though they do share some common keys. (such as name, short_name)

Related

How can i share my google chrome extensions with people without upload on chrome web store

I have developed a google extension and i want to share it with people without uploading it on chrome web store and without letting people to know about the content code of the extension.
What shall i do ???
You can't. The only way you can let people have your Chrome Extension without uploading it to Web Store, is by sending them a .zip file, that they unpack and load in chrome://extensions.
I don't see why you won't want people to know about the content of the extension, and why you won't just upload it to the Web Store.
There is no possible way, except the way Toke Raabjerg mentioned. (Involving developer mode)
Besides this, there is an option to upload the Extension and not list it on the store. With this option only people with the direct link can download your Extension.

chrome.management functionality in apps?

I'm new to making chrome apps and extensions, working on my first app. I need access to alist of the installed apps on chrome with their relevant details and icon, so I used chrome.management. However, when I try to use it in my app, I get the error
'management' is only allowed for extensions and legacy packaged apps,
but this is a packaged app.
Looking at the api page, chrome.management is indeed not listed under the "Apps" tab, but the "Extensions" one.
Is there any other way I can have access to the information in an app? Chrome app launcher did it... not sure if there were any super secret special permissions involved.

Sharing Google Drive Realtime Documents

I have created a realtime document on Google Drive. When I attempt to share this file with someone who doesn't have my app installed, the file shares successfully, but when they click the file it says "Sorry, no preview is available".
This realtime document is a shortcut file. How do I get it to prompt the person to authorize my app?
I'm using the Realtime Playground as my example as I'm not sure of the specifics of your application.
App authorisation
When you created your application you visited the Google API Console and created a project with Drive API enabled. At some point you copied "Client ID" from the Google API Console into you application ID code.
In the realtime-playground case APP_ID is set in the javascript file rtpg.js (you might not be using JavaScript but there will be an equivalent step for other languages).
rtpg.APP_ID = '840867953062';
File creation
I believe that any drive realtime document/shortcut you created with your application will contain a reference to the creating application (mostly likely in the form of the client/application ID you obtained above).
File sharing
Once you can see your newly created Google Drive Realtime document/shortcut you can share this with somebody else using the normal Google Drive sharing methods. At this point they can see it but cannot do anything apparently useful with it. This is where I believe your application may differ from the realtime-playground example.
Integration with Chrome Web Store
On the GitHub repository for realtime-playground you'll notice a cws (Chrome Web Store) directory containing the stuff necessary to deploy the realtime-playground as Google Drive application in the Chrome Store including screenshots to be used. If you look at the manifest.json file you will see another reference to the client id:
"api_console_project_id" : "840867953062"
So if I share a realtime-playground file with somebody who doesn't have it installed, then clicking on the file in Google Drive will result in a "Connect app" popup which will try to locate the corresponding Chrome Web Store Drive app (using the common id as the key) and this will show something similar to what you might see if you found this application directly in the Chrome Web Store.
The manifest.json also contains:
"app" : { "launch" : {
"web_url" : "https://realtimeplayground.appspot.com/" } }
which tells Google Drive what to do when the installed app is called.
So my guess is that your application doesn't work like this as you don't yet have public visibility of your app in the Chrome Web Store.
See also: Create a Chrome Web Store Listing
I hope this helps.
That is fine. If you open your eyes, you will notice that Playground demo does not provide any preview either
Yet, you see, the associated app is available. You can click it and open-with works normally. Your app-created files operate similarly. They are associated with your app by default. You can open them by open with rather than by preview. Can you? No, you cannot. But that is another question.
Otherwise, I see no cleverness in associating your file with chrome extension rather than with your app.
How do I get it to prompt the person to authorize my app?
I recently had a similar question. Instead of linking your files with extension in chrome, pass the direct link, like http://your-app#fileId=..., as playground demonstrates to your shared fellow if open-with fails.
The preview seems to be another story.
Wait, Do you mean that I need to create a new fresh account to test how your file is unassociated with your app? How do you preview the files in your primary account? If you know how to preview you may answer my question, at least partially. But why do you associate authorization with preview?

Is it possible to make an HTML page and local Javascript library into a Chrome extension with data storage?

I have been trying to author a Chrome extension recently and have been hitting major problems it seems every step of the way.
Currently I have a local HTML page that is using a local Javascript library. This works great, except Chrome limits the amount of data a page can store to 5MB. I would like to get around this limit, and read that Chrome extensions/applications could use unlimited storage resources via chrome.storage.
While coding, I quickly discovered that this only applies to browser actions, content scripts, and (?) web applications (loading an WWW page as an extension). I was coding this as a local packaged app, which does NOT have access to either the HTML5 localStorage API NOR the chrome.storage API. I really need the extension to use only local HTML/Javascript resources in order to maintain offline/no-internet functionality.
Can a Chrome web app be loaded from a local resource, i.e. a locally packaged HTML page? Is there any way around these problems that does not include enabling dangerous security vulnerabilities in Chrome? I saw that an NPAPI app could solve the problem however that also defeats the purpose of the application I am making.
TIA,
Trann
Apparently this is possible with a packaged app, when the correct combination of permissions are put into the manifest.json:
"permissions": [
"storage",
"unlimitedStorage",
"fileSystem"
]
The fileSystem permission, once added, enabled the FileSystem API to start working as expected (not chrome.storage).

Can a Chrome packaged app and a Chrome extension share local data?

From what I gather, Chrome apps and Chrome extensions are just two different ways of viewing some basic html/js/css files that have access to certain Chrome APIs. What I'd like to know is - can you share data between them? For example, can I do localStorage.setItem('name', 'john'); in a Chrome app, and have localStorage.getItem('name'); return john in an extension? If so, how do I link the app and the extension so that this is possible?