I'm developing a JavaScript application using the Google UI Service that I want to eventually deploy as a Google Web App.
I'd like to include several graphics in the user interface, but I'm finding the documentation for this on the Google developer pages quite thin.
Is there a way to "bundle" the graphics used in the app with the Web App?
Or do they need to be publicly available on a web page and referenced in the Web App by URL?
You cannot bundle them. You have to have them available publicly on the Internet and you can only create an Image object with the URL.
Related
Understandably, PWAs (Progressive Web Apps) are added to home screen after the user visits the web app in a supported browser and clicks on "Add to Home Screen". This works fine for publicly available PWAs.
Thinking of Enterprise Android applications, which needs to be installed to thousands of devices via some app push tools like Airwatch, its practically not possible to have someone open the browser, put the URL and then add to home screen in all thousands of devices.
Is there any other way to automate this deploy/add icon to home screen of a Progressive Web App, not needing the user to visit the web app in a browser, and clicking on "Add to Home Screen" ?
One option we thought about is wrapping in Cordova, but we're trying to find a solution without such wrapper.
Chrome for Android generates and signs .apk file on the fly using WebPack, when the user clicks on "Add to Home screen" (from menu or install banner) option and if the site has a valid manifest.json and service worker.
Extracting and distributing APK: This .apk can be located and exported to desktop using file explorer tools. For some reason, some of default file explorer tools couldn't locate this .apk file. Once exported, this .apk can be used to distribute in controlled environment..like in enterprise devices, where you can enforce the deceive to have Chrome Browser. If this .apk is installed to devices which don't have Chrome browser, user will get a message saying "Chrome" is required to open this app. Once installed, installed PWA apk can be used.
For distributing PWA apps through Play store, google is streamlining the process. A google engineers repose on building APKs (March-2018), when we reached out to them for our enterprise needs.
"Well done extracting the APK and deploying it, it should give a good experience to end users, but I agree it shouldn't be that complicated to deploy web apps on Android.
We are currently working on a streamlined web apps feature, with which you wouldn't need to manipulate or build APKs. This feature will be available on managed devices using Play to deliver apps"
Alternate options: If you think your user base may not have Chrome or don't want to rely on that dependency, wrapping with Cordova kind of hybrid solution is the only way to build your PWA apps for distribution in app stores. With this option, if the "webpack" in the device has the version 40+, user will get PWA benefits. Otherwise, it will still work as a regular hosted web app.
Update on TWA - Trusted web activity is the official way to pack PWA for Android and its available in Chrome 72 and it also supports private/enterprise web apps as the digital assets validation happens in browser now(it use to happen in cloud, making this solution not possible for private web apps).
You can upload the PWA to Playstore using tools like PWA2APK. Just need to share the play store URL to the users, from which they can download PWA app like normal Android App.
Trusted Web activities are a new way to integrate your web-app content such as your PWA with your Android app using a similar protocol to Chrome Custom Tabs.
Trusted Web activities
I want to use service and web workers in a web application executed inside JxBrowser. It's said in JxBrowser's homepage that "supports the same web standards as Google Chrome", but haven't found anything inside its documentation about web workers, besides a reference to service/web/shared workers in a constants class file that doesn't clarify much about.
Anyone having used this features inside JxBrowser?
Does it implement Web Workers API?
What about other API's such as Cache API?
If anyone knows about this issues would be great, thanks in advance.
UPDATE:
Web storage it's supported
The "supports the same web standards as Google Chrome" phrase means that the web pages developed with the latest web standards will be displayed in JxBrowser exactly as in Google Chrome.
JxBrowser doesn't provide Java API for the all web standards. It provides Java API for Web Storage, but it doesn't implement Web Workers API. I mean it doesn't allow working with Web Workers API directly from Java code, but you can work with it from JavaScript on the loaded in JxBrowser web pages.
I have a Chrome Packaged App that I want to be able to graph data for the user. I would ideally like to interface with something along the lines of the Charts/Visualization API, but I'm trying to find a solution that will work offline, possibly through integration with other apps or within my app specifically. Is there a way to insert a Google Chart or something very similar into my packaged app? Is there an API or feature I am unaware of that would make this feasible?
Unfortunately the Google Charts library cannot be downloaded for inclusion in a packaged app due to their terms and conditions:
Sorry; our terms of service do not allow you to download and save or host the google.load or google.visualization code.
- Google Charts FAQ
That said, there are many excellent Javascript libraries that are available for download which you could include with your packaged app and use as if they were included from a remote source.
This stack overflow question should help you decide between the various options. You should then download the Javascript files for the library you chose and place them within the folder of your packaged app and then use them like any local Javascript that you've written.
I've developed a simple Chrome hosted app and now I would like to integrate some content scripts in it but according to the documentation, it seems that this kind of app can't integrate content scripts.
Should I develop 2 separate apps? The first which is just the hosted app, adding an icon to the dashboard and letting users launching my web app in seconds and a second with the content scripts or is their a way to achieve that with one app?
Thanks for your help.
I need some light on the matter of Chrome Webstore registration.
I'm still confused despite searching through the web: the "app" will be only private for the site (we're trying to develop a Elgg plugin for our website that will allow users to access their drives).
1) for testing, do I need to register it (I did a search but some say yes like in the Google Drive SDK documentation, some say no in the google-drive-sdk tags)?
2) when the plugin is finished, tested and ready to go live for our users, do I still need to register it and pay 5$?
Thanks you for the answer you can provide us.
You don't need to register your app on the Chrome Web Store if you don't want to integrate with the Google Drive web UI: having the option to create a new file or open a file with your app directly from Google Drive.
Also, it might be easier for you not to create a Chrome Web Store listing while developing.
If you do need to integrate with the Google Drive web UI, but don't want your app to be public, you can publish your app to Trusted Testers only.