Deploying a webapp that uses chrome native client without involving webstore - google-nativeclient

I'm investigating the possibility of building a chrome app for a specific enterprise customer. This app would only be used by that customer (ie, it is not a general purpose app).
Among the use cases described on the Technical Overview are the ability to replace "Legacy desktop applications" and "enterprise applications that require heavy computation" - the solution I'm considering fits into both these gaps, as we have some mathematical libraries that we'd like to incorporate into a client-side web app.
Later on in the same document, however, it indicates that you can only deploy native client apps that are deployed on chrome webstore, as clarified by the https://developers.google.com/native-client/devguide/distributing document (and various developer scenarios).
Question: Is it possible to have build a web-app that uses Native Client, and distribute that to users worldwide, but without using Chrome Webstore (ie, using an internal server)?
Note: I've seen this document about creating a private chrome app collection on webstore, but this seems to be specific to ChromeOS. I'm interested in deploying to users that have the latest stable build of Chrome.

It is absolutely possible to run a Native Client app without hosting it on the Chrome Webstore -- otherwise, it would be very difficult to develop an NaCl app in the first place. It is possible for end users to use an NaCl app hosted on any random site. The catch is that the user needs to specifically enable the feature in their Chrome browser. It looks like the current way to enable this is to visit the "chrome://plugins/" page (or "about:plugins" page, same thing), and check the "Enabled" box under "Native Client".
Perhaps enterprise-level administration makes this easier to roll out, or perhaps allow finer-grained control so that only NaCl apps within the corporate intranet are trusted while not allowing stuff from the broader internet (NaCl is supposed to be safe and sandboxed, but Google is still playing it safe and paranoid, just in case).
For a public example of a self-hosted NaCl app, check out NaClBox, a Native Client port of the venerable Dosbox emulator. While it is also hosted in the Chrome Webstore, their support page describes how to run it directly from their site.

Related

Meteor mobile build vs having a phonegap browser

Why is the difference between using a simple phonegap browser app pointed at your site vs using meteor's mobile build options?
a simple phonegap browser app pointed at your site
Not sure exactly why you would be ready to use this option, compared to a simple shortcut / link to your site, or even an "installable" Web App.
Anyway, since you point at your site, it means you require an Internet connection whenever you open your app, and you are limited by what a website can access to on your device.
meteor's mobile build options
It becomes similar to a native app (it is actually called a "hybrid" app), so you can use it totally offline, and you can access more device functionalities (file system, notifications, etc.).
Nothing really specific to Meteor here, it is rather why using a hybrid app v.s. a shortcut.
In the end, you should base your decision on your requirements:
Do you need to access your app while offline?
Is your app primary functionality accessing "real time" content that makes no sense using your app while offline? (like news, forums, etc.)
Do you need to access specific device functionalities, that are not accessible by a normal website?
You should have plenty resources on that topic on the Internet.
Your question might rather be: what is the difference between a standard hybrid app (typically built through Cordova / Phonegap) and one built through Meteor?
In that case, you are asking what Meteor brings specifically? (as it uses Cordova under the hood to build the app)
First of all, you have all advantages of Meteor framework for normal website (minimongo, isomorphic methods, etc.)
You also have by default the Hot Code Push functionality. You can also set it up on your Cordova / Phonegap app, but you will have to configure it yourself, whereas Meteor does everything for you.
Finally, you might benefit from Meteor packages that bring Cordova plugin + client code + server code, something unique to Meteor as it is a full-stack framework.

Converting WordPress website to Progressive Web App

I am building a Progressive Web App but there is a very little documentation and support online so far. I am listing down all my questions in this email.
What is the current support of Service Worker API (Offline Mode) for
desktops? I wrote a small app which worked in offline mode for
mobile (Android-Chrome) but not for my Desktop (Chrome 42). We need
to configure development environment for this so we need to know
what will we be needing to test our apps. It doesn't work on
IOS-Safari/Chrome even.
The service work uses caches extensively and there is a very good
way to debug or unregistered service worker internals on Dekstop
Chrome; but if I run my application on Mobile how would I remove
service worker cache?
If I have a responsive application (A WordPress site) and need to
convert it into PWA; would I need to rewrite the application with
RestAPI for mobile version all again? (Read App Shell of PWA). In
PWA, application shell is separate from data however in CMS like
WordPress data is not separate from the UI.
I have been looking for these answers for very long and not being able to find any proper support.
What is the current support of Service Worker API (Offline Mode) for desktops? I wrote a small app which worked in offline mode for mobile (Android-Chrome) but not for my Desktop (Chrome 42). We need to configure development environment for this so we need to know what will we be needing to test our apps. It doesn't work on IOS-Safari/Chrome even.
Safari is not supporting service workers right now but it should work in Chrome 42 although you should consider to update your browser. Anyway, you can check the state of the art in a variety of places:
Service workers: https://platform-status.mozilla.org/#service-worker
Push API: https://platform-status.mozilla.org/#push
Background Sync: https://platform-status.mozilla.org/#background-sync
More about SW:
Is Service Worker Ready? https://jakearchibald.github.io/isserviceworkerready/
Can I Use? http://caniuse.com/#feat=serviceworkers
The service work uses caches extensively and there is a very good way to debug or unregistered service worker internals on Dekstop Chrome; but if I run my application on Mobile how would I remove service worker cache?
You need to debug Chrome for Android from Desktop Chrome.
Anyway, the URL chrome://serviceworkers-internals is available on Chrome for Android although there is no an easy way of clearing offline caches.
If I have a responsive application (A WordPress site) and need to convert it into PWA; would I need to rewrite the application with RestAPI for mobile version all again? (Read App Shell of PWA). In PWA, application shell is separate from data however in CMS like WordPress data is not separate from the UI.
No. Actually, WP has a very well architecture to decouple content from theme. The problem is that run on the server but you don't need your site running on the client to become a PWA. Mozilla is supporting a suite of WP plugins to help progressivizing your WordPress installations:
Offline Shell [github] identifies your shell assets (i.e. theme files) and cache them in an offline cache.
Offline Content [github] identifies your dynamic content and cache it as the user visit it.
Web Push [github] allows you to push real time notifications to your readers as soon as you publish new content.
Add To Home Screen [github] engages your readers by putting your WordPress in the Home Screen.
They are all very young plugins but you can track them on GitHub and contribute if you want!
A very nice and helpful answer is already added by #Salva, but I thought let me add few things which might be helpful.
For 3rd part, I have worked on an automatic progressive web app converter platform, https://www.escalatingweb.com. I think you can use this platform to convert your web app on WordPress into progressive web app. You can use it to convert your web app into pwa within minutes.
I have also written a very nice tutorial to use automatic pwa converter platform http://www.techromance.com/2017/07/22/automatic-pwa-converter-platform/.
For 2nd part,
Just to add to above answer, and for testing purpose, you can delete all the cache for a particular website from site settings, which will also clear service worker's cache.
For 1st part, nothing to add as such.
P.S. Please nobody be offended in case they find it as a cheap way promoting my platform. The intention is just to help the community, either by building the platform or making it aware to the needful audience.
Thank you #McNab for the suggestion. :)
I also using a Wordpress site and there is a plugin can solve your problem. Instead of installing lots of Mozilla's plugin, you can install Super Progressive Web Apps plugin (search for it in plugin install), it works perfectly. Tried both on Android phone and IOS
https://wordpress.org/plugins/super-progressive-web-apps/

Is it Possible to create a PhoneGap app from a Wordpress blog?

Is it possible to make a PhoneGap native app from a Wordpress mobile blog?
I understand that PhoneGap allows you to develop HTML5 apps and turn them into native mobile applications.
I'm looking to create a content distribution app somewhat like the ones so many local news services use (WGAL, Channel 69 News), but to be able to list it in the Android Market Place and the AppStore, as well as be able to access it online all with the same content.
Also are there any alternative methods to accomplish this? Are News apps like that available in some sort of a "canned form"
One way is to essentially you make PhoneGap a web browser without an adress bar. I have an iPhone example here. All I did was make javascript redirect upon loading the application, whitelisted my IP (in the case of the example it's local host) and modified the Appdeligate.m with this piece of code from:
- (BOOL) webView:(UIWebView*)theWebView shouldStartLoadWithRequest:(NSURLRequest*)request navigationType:(UIWebViewNavigationType)navigationType
{
return [self.viewController webView:theWebView shouldStartLoadWithRequest:request navigationType:navigationType];
}
to
- (BOOL)webView:(UIWebView *)theWebView shouldStartLoadWithRequest:(NSURLRequest*)request navigationType:(UIWebViewNavigationType)navigationType
{
NSURL *url = [request URL];
if ([[url scheme] isEqualToString:#"http"] || [[url scheme]isEqualToString:#"https"]) {
return YES;
}
else {
return [ super webView:theWebView shouldStartLoadWithRequest:requestnavigationType:navigationType ];
}
}
and voila, a "native" app, with access to all local resources (storage, camera, etc) built on web frameworks! Weather or not Apple or the others will let something like this in their app store I still have yet to investigate but it sure works well for demonstration purposes or personal apps.
We have just created a similar concept using PhoneGap and Application Craft, but Apple rejected the application, this is the message we received:
We found that the experience your app provides is not sufficiently different from a web browsing experience, as it would be by incorporating native iOS functionality to provide a more robust user experience.
While your app content may differ from your web site or other existing sites, the experience it provides does not differ significantly from the general experience of using Safari, as required by the App Store Review Guidelines.
You may wish to provide convenient access to a web property for a select or niche group of users - and may have enhanced that experience with features such as Push Notifications, Core Location, and/or sharing features. However, these features do not provide a robust enough user experience to be appropriate for the App Store.
If you wish to provide quick access to a web property, you may wish instead to provide instructions to your users on how to create a Safari web clip to add to their iOS device Home Screen. Or, if you would like to share the app with a select group of users, we recommend the Ad Hoc distribution method. See the iOS Provisioning Portal for details on Ad Hoc Distribution.
We encourage you to review your app concept and evaluate whether you can incorporate additional features to enhance the user experience.
If you cannot - or choose not to - revise your app to be in compliance with the App Store Review Guidelines, you may wish to build an HTML5 web app instead. You can distribute web apps directly on your web site; the App Store does not accept or distribute web apps.
HTML5 is the major new version of HTML and enables audio and video to play natively in the browser without requiring proprietary plug-ins. Using HTML5, web apps can look and behave like native iPhone and iPad apps, and using HTML5's Offline Application Cache, a web app can work even when the device is offline. With web apps, you have flexibility to deliver as much or as little functionality as you desire.
To get started with iPhone or iPad web apps, please review Getting Started with iPhone Web Apps.
For a description of the HTML elements and attributes you can use in Safari on iPhone, check out Safari HTML Reference: Introduction.
Unfortunately I can not link this as it was a reply to our application submission and not on one of the help platforms. We have not tried Google Play Store yet but from what I understand they will most likely accept the app, will update when we have tried.

Hp Touchpad Browser ASP.NET thinks that cookies disabled

Just bought a cheap defunct hp touchpad. I notice that when I browse to my asp.net web app the url returns session id. The touchpad has cookies enabled and my web.config contains no mention of 'cookieless' which I would have thought would default to "false". IOW This should not be happening. And I have not seen this behavior with any other Browsers I have used on this particular web app.
Is there some other reason that would result in the session id being embedded in the url for this browser?
Edit
Ok i just noticed that, although cookies are enabled for the browser (and visits to 'Browser capability' online sites back this up), ASP.NET's HttpBrowserCapabilities.Cookies is set to false.
Sounds like the default ASP.NET browser capabilities detection doesn't handle WebOS browser.
Microsoft has given up updating the browser capabilities actually, but you can have similar functionality from Wireless Universal Resource File (WURFL) project:
http://wurfl.sourceforge.net/dotNet/ (powered with sample code)
The current officially recommended way to make use of this data is through a library called 51Degrees.mobi http://51degrees.codeplex.com/
I say officially recommended as per:
http://www.asp.net/learn/whitepapers/add-mobile-pages-to-your-aspnet-web-forms-mvc-application
which is one of the most complete references for dealing with mobile devices in general, and is part of:
http://www.asp.net/mobile
Check it for more documentation.
There are other alternatives as well like:
http://blog.mobileesp.com/?page_id=53
which gives you general classes of devices. You'd be checking for WebOSTablet instead of cookies support, so, it's helpful more in device specific optimizations than for general capabilities detection.
But you probably want to try the WURFL project API or the 51Degree.mobi API for the detection.

What are some steps to create a mobile web version of website?

I have built a website with asp.net jquery sql server 2008.Now i want to build a mobile version of it(web,accessible via the browser).Do i have to to migrate data to the cloud?if i build in .NET mobile ,will it be accessible from iphone and adroid as it will be accessible via browser?my website is social directory for places,is there a gps api that can help me to indicate that a user is near a place?
If you're creating a mobile version of a current app that has existing data sources etc theoretically the only thing you should have to change is your front end to be suitable for a mobile browser.
In the end you web server will still be serving the pages as if it was any other normal browser (except it would just be the mobile version), and have the same access to resources (eg. databases0 that the standard site does.
In terms of "the cloud" there is no reason that you need to really host anything in there (web/data server) but if you site ends up getting large and/or you don't want to worry about managing infrastructure issues etc investing in the cloud may be a good idea, there is plenty of reasons to go to the cloud but for what you are trying to achieve it is not a necessity.

Resources