285 points · by twapi · 13y ago · 157 comments
The much-anticipated convergence of Android and Chrome is near. These new Chrome apps are the programming model for the upcoming native Android webapps
The next milestone I expect to see is V8 added alongside Dalvik as a first-class runtime for Android. Maybe in Android KitKat?
My utopic wish is a new open platform that will combine strengths of the web and of operating systems (Windows, Android):
- Web: Great for documents, which it was originally designed for. Automatic updates. No installation. You can "fork" an app / document by middle clicking a link.
- Operating systems: Great for apps. Speed. More low level access to the hardware. Much richer platform than the web (window mnagment, human interface guidelines, ...).
I have a feeling they will add more and more Android device APIs to whatever is coming, until it has just as many as the Java APIs.
I've thought for the past year or so that there is no way the future of Android app development is Java/Dalvik.
It's possible they will add support for other languages besides Java. Android is stuck with Java 6, which sucks...
1) That would break backwards compatibility with Android apps. They would basically have to kill Android and replace it with Chrome OS Mobile.
2) Chrome OS platform is far, far behind Android (and operating systems in general) in many aspects.
What exactly are you expecting to get from the mythical "ChromeOS and Android merger", when you already have Chrome for Android?
The only major things I see ChromeOS has over Chrome for Android is the security model, which will be impossible in Android, since you need native apps, too, while ChromeOS will only ever work with "web apps". Changing that could mean its security model will suffer.
And the second one is the upgrade process, for all Chromebooks, coming straight from Google, every few weeks. That's ideal, but I doubt we'll see anything like that for Android even this decade.
Seriously. I don't get this knee-jerk desire to have ChromeOS and Android become some sort of weird hybrid. They're two different platforms. Their combination isn't necessarily greater than the sum of the parts.
People must be playing too much Katamari Damacy or something.
Something needs to change, since the Oracle lawsuit, Java/Dalvik features have been frozen without any new update being officially communicated.
although in that article, they also claim chrome apps are going to come to iOS including availablity in the iOS app store, which sounds really really unlikely.
P.S. while trying to add this new type of app, I was tricked into signing into my chrome account, which I had managed to avoid all this time.
I've started jumping the Google ecosystem. I'm now more often than not, not signed into a Google-account, to the point where I can go a week without signing in at all.
No way I'm joining a program which requires me to reverse on that.
My guess is that Chrome Packaged apps will be the replacement for WebViews on Android.
Anyone who wants a stop gap though, should check this out: https://github.com/pwnall/chromeview
"Attempting to scroll the view (by swiping a finger across the screen) does not update the displayed image. However, internally, the view is scrolled. This can be seen by displaying a stack of buttons and trying to click on the topmost one. This issue makes ChromeView mostly unusable in production"
Have you used ChromeView successfully in a production application? This seems like a deal killer.
A stop gap that adds at least 30mb to your application is a really shitty solution.
If they would do this we'd have a new set of apps that behaved and felt very differently which would probably cause a lot of confusion among users.
What I could imagine is some kind of framework that makes it easier to share data and state between a Chrome app on the desktop and Android apps on mobile.
I'm personally working on a Chrome SDR app for the Funcube Dongle, so you can just install an app from the Web Store, plug the thing in, and start listening to any radio transmission from .5MHz to 2GHz. (The only snag is that the HTML5 audio API doesn't give you 192kHz sound samples, so I think I'm going to have to read them directly via USB. Fun.)
Last time I looked into this stuff it's nontrivial to let arbitrary user-mode applications manipulate arbitrary USB devices on Windows, so I'd be impressed if they got it working in a secure fashion and deployed it to the open web.
it's a pain to use, with all the restriction, the buggy API (it doesn't crash, it just hangs, you can't investigate) and the browser bugs (I have to use a canary for development, I'm really far from a release).
...you can equip that device with one of the many standard, open protocols already in ubiquitous use.
Browser-based hardware drivers in JavaScript? Seriously?
Why implement low-level hardware handshaking via JavaScript in the browser, if all you want to do is sync application data?
If Google waits for other browsers to offer the APIs it needs, Chrome apps won't happen for a long, long time.
- Launch chrome apps directly from the desktop - Run chrome apps with out any of the browser toolbars
Everything else is already possible in a regular chrome app.. Right?
E.g. I've been waiting for this for a while because you can write an app which communicates directly with an Arduino or any other serial device.
This means that a lot of special purpose desktop apps communicating with custom hardware can be written as Chrome apps and take advantage of the speed/ ease of UI development of web apps.
For one of the apps I maintain this will reduce the time it takes to make UI improvements from several days to several hours.
http://developer.chrome.com/apps/app_hardware.html
A quick google search shows: https://github.com/BertHartm/Chromeduino
The execution was awful, but still.
http://developer.chrome.com/apps/app_hardware.html
NPAPI has been available for awhile, too.. Not sure if that's what they're referring to when they say shell access.
They need to improve the APIs for developers though, a Visual Studio 6 for Chrome platform development, probably the high point in softees history. Really tie together web with more traditional native api development. No-one has cracked that yet.
You can cross play with the iOS version, feel free to leave feedback :-)
Also the game was capturing the ChromeOS volume, brightness, maximize keys (probably as F1-F10 keys) and discarding them.
Past issues specific to the packaged app - great game! Very polished. I love X-Com and this is right up my alley.
As one of the few who have actually used it, can you give us your perspective on the highlights and limitations of the packaged apps API?
Considering we're a game there is actually very few things that we need to consider from the APIs. We have our own UI and the integration with the OS is quite limited.
The reason we were interested in the Chrome version is that we're essentially a play by mail game in multiplayer so the push notifications are crucial. Unfortunately the way the push works on Chrome is a bit iffy, way less polished than it works on Android and iOS but it's not too bad.
Since we're free to play there are some optional in app microtransactions to monetize the game. These all use the new Google wallet API for packaged apps and they work reasonably well. Since we allow cross play between iOS and Chrome we need to be careful with how we set the prizes and making prize matching between iOS and Chrome is hard due to differences in how tax is handled.
There is on way to query the final prize for an in-app purchase through the API which makes things like "-50%" badges hard to implement. The way the game gets around it is by guessing what the final prize will be. I wish there was a nicer way but I can see why it's done that way.
There are also some (temporary) limitations with the NaCl runtime (no, it's not PNaCl, at least not yet).
For example, fullscreen on OS X is quite broken. Keys that shouldn't get captured, in particular the one to cancel fullscreen. That (and other small issues) is likely why packaged apps with NaCl aren't yet officially supported there.
They might have been afraid that if they left this prime piece of desktop real estate, Google might take it.
I usually have more than 50 tabs open in Firefox and often go over 60 before having a tidy up. Firefox can survive that for a couple of weeks whereas Chrome would often crash in less than a day. (Flash would crash even more often.)
YMMV, but I switched back to Firefox a couple of months ago and no longer have Chrome installed....
The technology is certainly interesting, if a bit limiting.
Are they "forking off the web" or just experimenting before standardising?
-Previous installed chrome app matches the HTML5 api, the new chrome apps has a lot of restriction where you have to totally rewrite you code in terms of storage. i.e. Chrome.storage instead of localStorage; All chrome storage is async.
-The new window format for apps are a huge UI flaw. You can not open an Chrome app in a tab anymore. Basically, you now have an extra window whenever you open a chrome app. This is very annoying since when you click on the existing window the app is hidden in the back, you have to flip through your windows on the mac to find the app you just opened again.
-Javascript execution permissions are very strict, and no longer follows that of a normal webpage.
The result is, you can no longer build an HTML5 app and prepare it for the chrome store, you have to specifically change the code to package it. This makes it less ubiquitous and creates extra work for developers.
This session explains it all: https://developers.google.com/events/io/sessions/326973874
I belive this is only localStorage right? (indexedDB is still available afaik)
Firefox OS had mentions of disabling localStorage, its been a huge problem due to its synchronous API, I dont think it did end up being disabled though, I would really like to see localStorage being (slowly) deprecated and an async api (possibly even just a helper for idb) being promoted as an alternative full web standard as opposed to chrome specific API's coming in here
However thats fine when you are building your own apps, but I meant as a long term solution to the web platform, if localStorage needs disabled on one platform in favour of a propietary API, maybe its best to replace it with a non proprietary web api
I was mostly surprised how it felt that in many ways you were actually more restricted than you were with just a normal web app. Also the documentation was trash and confusing in a lot of ways because even prior to these changes they had made a lot of other changes via deprecating APIs and their documentation was poorly managed to the point where it was really difficult to determine which APIs were deprecated or not without trying to use them in the latest Chrome and having them fail on you. Also, there wasn't a clear roadmap as to what APIs you could expect to be pretty stable and what ones they might suddenly deprecate, breaking your app.
Hearing that the "new breed" has some of these same flaws and some new ones makes me very disinclined to bother checking in with the current technology.
So a proprietary HTML-based format then? Yay Google for promoting the open web!</s>
With Google going down south, we need Firefox OS to get traction, and we need it now.
for now on, it will be used as the remote debugger for android browsers (until we have something native). just like i have a spare mac for running xcode for the same reason.
firefox serves me well. and will not make me worry much.