16

We got a Cordova App running and wrote ourselves a build script using Grunt which makes building the App a breeze. We don't require any of the APIs Chrome offers and are, apart from some performance issues with elderly Android devices which forced us to block some minor features on those devices, pretty much satisfied with the current status of our app.

So far we couldn't find any reason why it would make sense to transform our Cordova App into a Mobile Chrome App. Or is there something we're missing? Are there any differences in terms of JS speed, CSS support, etc.?

zerodot
  • 805
  • 1
  • 7
  • 15

1 Answers1

23

The primary motivation for Chrome Apps on Mobile leveraging Apache Cordova was to bring Desktop Chrome Apps to Android and iOS.

However, there are some reasons why you should/shouldn't consider using the cca toolkit, particularly if you already enjoy using cordova:

Chrome Apps APIs

If you wish to leverage some of the useful Chrome Apps APIs which we have ported to mobile, you may already be able to use them inside your vanilla cordova app, even without using our cca toolkit! (We went out of our way to try and make this work whenever possible, giving back to the community that helps us in turn).

However, for some of the APIs, you really do need to use our cca toolkit, since we may rely on the chrome app lifecycle or other specifics. (It seems our docs don't yet make this distinction clear, so I've filed an issue to address that).

Verdict: consider cca if one of the Chrome Apps API's which do not work on vanilla cordova appeal to you.

Desktop Platform

Chrome Packaged Apps run on any desktop platform chrome runs on -- which is every single mainstream Operating System in popular use today. The capabilities and native integration of these apps are rapidly improving, and are truly removing barriers to using web technologies for whole ranges of application types.

So, while the motivation for Chrome Apps on Mobile was to enable porting some of those desktop apps to mobile, you should consider if the reverse isn't actually useful for you!

This would mean adjusting your existing app to use the chrome app lifecycle and manifest, adhere to restrictions like CSP and disabled web features, and cannot rely on cordova extensions -- but in practice this is often not prohibitive for a cordova app which is already a package offline-enabled web application (thats the hard part)!

Verdict: consider cca if you would also like to also target the desktop platform, or would like to submit your app to the chrome web store.

Cordova Plugins

If your existing mobile app already leverages some cordova plugins, you can still use the cca tool, since we create a fully compatible cordova project. This comes with the caveat that those plugins will only be available on mobile -- but you can use feature detection for desktop-mobile app compatibility.

Verdict: the cca tool does not prohibit the use of cordova plugins.

Mobile Platforms that are not Android or iOS

We do not currently support some of the platforms which vanilla cordova does, such as BlackBerry, Windows Phone, or upcoming platforms like FirefoxOS, Tizen, and Ubuntu (though many of those do not yet have feature parity with Android / iOS anyway).

Verdict: don't use cca if one of these mobile platforms is important to you.

Final Words

If you are already happy with what you have, well, they say that if it aint broke, perhaps don't fix it!

mmocny
  • 8,775
  • 7
  • 40
  • 50
  • 2
    Great, thanks for this detailed answer, you covered everything I wanted to know! Love the work you guys are doing at Google. – zerodot Feb 11 '14 at 21:15
  • is it possible to check in android cca if user has bought corresponding app in Chrome web store? – 31415926 Feb 17 '14 at 13:45
  • @Qvatra `cca` based Android/iOS apps are 100% real Android/iOS native applications, and publish to the corresponding store. Like all apps, their purchases are entirely separate. However, we do support a common [payments API](https://github.com/MobileChromeApps/chrome-cordova/tree/master/plugins/google.payments) for in-app-payments. Those purchases are also isolated per-platform by default, but you can manually cross reference Android & Desktop purchases (not iOS, due to policy guidelines). This means you could implement "unlock" functionality and share it across at least Android & Desktop. – mmocny Feb 18 '14 at 15:27
  • @Qvatra I would take a [look here](https://developers.google.com/chrome/web-store/docs/check_for_payment), if that is something that could solve your problem, but I suspect you were asking specifically about app purchases in the store. That answer is simple: no you cannot share purchases. – mmocny Feb 18 '14 at 15:29
  • Thx for the thorough answer. Can you maybe enlighten us whether a target computer must have installed Chrome or Chromium, or whether the Chrome App can also run standalone? – Sebastian Mach Aug 25 '15 at 08:27