How to open chrome apps as a regular tab with its api? - google-chrome

I want to develop a packaged chrome app (not extension) and hope to could open it as a regular tab like the image showing below.
I followed the official docs to make my first app:
http://developer.chrome.com/apps/first_app.html
But it can not show the four options which are open as regular tab, pinned tab, window and full screen.
After searched again and again in the chrome official site and SO or anywhere else in my time, I could not find out how to make it.
I think its the manifest file's job, but I could not find any clue in its description, either.
http://developer.chrome.com/apps/manifest.html
Can somebody give me some hints?
Thank you all.

You can't set the tab behavior for Chrome Packaged Apps, only in Chrome Hosted Apps. There are a lot of differences between them, but a very short and simplistic definition is:
Packaged Apps are apps that look and feel as native apps. They have access to more powerful APIs that traditional web apps don't (like hardware devices, extended filesystem and much more). They are self-contained and usually have a good behavior when offline. They also run outside of the browser and the user doesn't see them as traditional web apps (as in running inside a browser);
Hosted Apps, on the other hand, are web apps, living in a remote server, with a little more power than traditional web apps, but much less than packaged apps. They are launched from the browser and, in general, they require a network connection to work appropriately (ie, they are not self-contained).
Tab behavior makes sense for Hosted apps, because they run inside the browser, but not for Packaged apps, because they NEVER run as tabs.
If you want to develop a hosted app, this is the documentation.
For Packaged apps, the doc is the one you've mentioned.

Related

Website vs. hosted Chrome App

I'm pretty new in the field of Web Store and its content and I've been going through it for past few days. I am not sure if I'm getting it right, but as far as I know, Chrome Apps can be packaged or hosted and also I have noticed that both of them (packaged and hosted) will be removed from the Chrome Web Store on Windows, Mac and Linux.
But, according to this page, there are four types of content which can be published on Chrome Web Store - Websites, Chrome Apps, Extensions and Themes. And it somehow corresponds with the Web Store filters - you can filter between Websites and Chrome Apps.
And my question is - what is the difference between a Website and a hosted Chrome App? Is just Google messing up the terms (and by Website they mean hosted Chrome App and by Chrome App they mean packaged Chrome App) or is there any real difference?
Because this is what is totally confusing for me - in the early 2018, when all the Chrome App stuff will be removed from any other OS than Chrome OS, what am I going to see if I open the Web Store on Windows? Themes and Extensions only? Or the Websites will be available too, because only Chrome Apps will not be supported and a Website is not a Chrome App?
And after the "early 2018", is there going to be any way how to integrate a Website to Chrome other than telling the users to manually bookmark it? It won't be possible to distribute a web app through the Web Store at all? Because what I also noticed is Google encouraging developers to create PWAs rather than Chrome Apps, but how those PWAs can be integrated to Chrome more smoothly than just a manually added bookmark?
Thank you very much for your answers and sorry for a long and chaotic post full of questions.
Karolina
Gonna start by referencing the Wiki descriptions for a Website:
A website is a collection of related web pages, including multimedia content, typically identified with a common domain name, and published on at least one web server. A website may be accessible via a public Internet Protocol (IP) network, such as the Internet, or a private local area network (LAN), by referencing a uniform resource locator (URL) that identifies the site.
and a Google Chrome App:
A Google Chrome App is a web application that runs on the Google Chrome web browser. Chrome apps can be obtained from the Chrome Web Store where apps, extensions, and themes can be installed or bought. There are two types of apps, hosted and packaged, which have different locations of their executable and are targeted at different use cases.
and for Hosted Apps part:
Hosted apps are the original type of Chrome apps. They contain a single manifest file that contains the URL and additional information about the app. Hosted apps are usually offline and are subject to regular web page security restrictions.
To say things simpler, a Website is such a broad term where in some cases, a Hosted Web App might actually fall under it's category.
While a Chrome Web App has this required tie-in with Google Chrome (hence it's name).
For more descriptions on the difference between a Hosted and Packaged App (and an extension:
There are actually two kinds of apps: hosted and packaged. A hosted app wraps an online website, so the CRX package can be as simple as a single manifest.json file pointing to the website. A packaged app contains the whole kit and kaboodle inside the CRX package—HTML, CSS, and so on, all run from the user’s hard drive.
Packaged apps are a kind of missing link between extensions and hosted apps. They look the same as a hosted app to the user, but under the covers, they are really like traditional extensions with that special “launch” parameter. They have access to almost all functionality afforded to regular extensions—context menu, background pages, and so on. The only exception is that packaged apps can't add buttons to the address bar.
Returning to the example in the previous section, it’s perfectly valid for a packaged app to add an item to Google Chrome's context menu. However, it’s completely invalid for a hosted app to do the same thing. In some respects, a packaged app lets you have your cake and eat it: the appearance of a packaged app with the power of an extension. But there are still plenty of reasons to use pure extensions and hosted apps.
Guide for choosing an App Type can be seen here.
For the early 2018 part, there still isn't much details mentioned about it, but referring to the Chromium blog, I guess it's safe to say that the Chrome Web Apps will be totally removed (hence they're asking developers to migrate their Chrome apps to the web) and that only extensions and themes would be available.
However, this could still be subject for change. At this point, no one could really tell.
[...] there are four types of content which can
be published on Chrome Web Store - Websites, Chrome Apps, Extensions
and Themes.
I'd say that is accurate.
Some websites are just simple bookmarks you can find in the Chrome
Store. I consider these little more than advertisements.
Some websites do that and add trivial things like system
notifications and even run offline. I.e. they have their code on your hard drive and access some system resources. But Google still categorises them as websites (or webapps in modern vernacular) probably because they have no special feature set. An example is Spotify or Gmail offline.
Hosted Chrome apps might not have an online presence at all or typically do something different from the website version. For example, they could run in a specially designed transparent window; they may run offline too. An example is Hangouts, the app has slightly different features from the website at hangouts.google.com.
Packaged Chrome apps are defined similarly, but need more access to system resources such as the filesystem. They are pushing the border of what we may define as being 'sandboxed'. They also may run offline. In some cases people who want to write scripts using javascript and html/css may consider this instead of a nodejs-like solution.
what is the difference between a Website[/Webapp)] and a [...]Chrome
App?
Typically the ratio of 'fresh server code' to 'local drive code' gets smaller as you go down the above list, but this is just a correlation. The main difference between a Chrome app and a Web app is a unique content feature-set. Also webapps typically require at least periodic online contact, whereas a chrome app could just be a 100% offline game without an online counterpart.
Is just Google messing up the terms [...] or is there any real
difference?
So yes according to how I see it there is a difference. Though personally, I'd categorise everything that puts code on your local drive as a chrome app and stuff that runs at least 99.9% online as a webapp/website. But Google disagrees apparently.
in the early 2018, [...] what am I going to see if I open the Web
Store on Windows? Themes and Extensions only? Or the Websites will be
available too, because only Chrome Apps will not be supported and a
Website is not a Chrome App?
Only Google knows this I think. But I'm guessing you'll see Websites, and clicking "add to chrome" will create a bookmark for online stuff, or an extension for the offline stuff (like google docs). So you can distribute websites, you just won't be able to find them under an "Apps" panel. We'll also probably see an increase in extensions with a UI component as some apps are re-labelled as extensions.

Can cloudrail be used serverless?

Cloudrail seems perfect to simplify interaction of a web page with e.g. google drive or other cloud service.
And this may be due to my lack of understanding and lack of knowledge of web development and Node.js, but can cloudrail be used serverless?
Or in other words can cloudrail be used on a stand-alone html page on a local computer (i.e. served by the filesystem instead of a server) and be made to access google drive or even work with an off-line mode while on a stand-alone html page (which may later sync with google drive)?
The reason being I would like to design a simple mobile app that accesses the cloud (fine so far) that is mirrored as a simple portable web page that can sit anywhere (desktop/laptop/mobile/USB stick) and is not served by any server but simply loaded from the local filesystem.
If not cloudrail, what other technology might I need to achieve this?
I don't think you can use it as a standalone website the way you describe it. You might be able to realize your use case though by e.g. using CloudRail's Nodejs SDK with Electron. This allows you to create an application very similar to a website with Javascript while still giving your users just one file that runs pretty much everywhere.

Is the chrome devtools API allowed in the store

This is my first time developing for Chrome. My question is: if i use devtools so i can create panels, will my extension pass through to the store or is it only for developers to test stuff with? So basically is it legal in the store extensions to use devtools?
chrome.devtools.panels is listed as under Stable APIs. Any APIs listed as stable are perfectly ok to publish in the Chrome Web Store. Keep in mind that you should provide enough of a description and getting started guide that people understand what the extension does and how it works.

Chrome OS/Chromebook: How to control user access

I need to know if it is possible to emulate certain functions of the ChromeOS Management Console through apps.
Basically, I want an app to be able to control certain aspects of the OS without being required to purchase the management console.
I believe there is a way to do it, I just need to know where to start. Can an normal JS extension do it? Pepper app? Native App? Which method will give me access the the settings section of the chrome OS?
Most, if not all, of the functionality provided in the settings section is not available to normal apps or extensions.
That's probably not what you wanted to hear. To officially request the chrome team adds the features you need, go to http://crbug.com and make a feature request. You should include more details about exactly what you're trying to do.

How do I deploy my box.net application

I have create an box.net application according to the documentation.
Now, I would like to share the application with my colleges. Does anyone knows, how I can make it? IMPORTANT, I dont want to deploy it in public.
Thanks in advance
It really depends on what kind of Application you've created. There are fundamentally 2 types of apps in the Box "App Marketplace"
1) Apps that run on a server at a URL you own. Box sends calls to you, either for file-actions (think right-click, open-with kinda stuff), or for webhooks.
2) Apps that are built for a specific device (like an iPhone or Android). They show up in our marketplace, but the download links take users to the itunes or an android store to download the app. These apps call into Box via APIs (see https://developers.box.com/docs)
If you've built a #1, then you need to figure out where you want to host the software you wrote. Box makes it easy to host it on Heroku, or CloudFoundry, or Parse, so you can get going quickly, without having to provision your own hardware, etc.
So, it really depends on what kind of application you've built.