A few people have also noted that the demo doesn’t work across different platforms even when using the same browser. While I wanted to demonstrate how Flash and HTML5 can coexist and even complement each other, it is (sadly) also a demonstration on how HTML5 is being implemented differently across browsers and operating systems. Feel free to post a comment if you know about fixes or workarounds in the JavaScript to make it work on more browsers.
The HTML5 Flash Marriage: Geolocation source
by Serge Jespers on 08. Mar, 2010 in Flash Player, html5
The HTML5 Flash Marriage: Geolocation
by Serge Jespers on 05. Mar, 2010 in Flash Player, html5
Geolocation is a good example. HTML5 is going to get a geolocation API that works just beautifully even on devices with no GPS. Flash based applications will (currently) only get access to geolocation APIs when targeting the AIR runtime on mobile. Some browsers (I only know of Firefox 3.5 on Mac and the WebKit browser on the Nexus One) already support the HTML5 geolocation API… So why not use that to get geo information into your Flash based application?
It’s actually extremely easy to do…
But first a little bit of background as to why I was looking for this functionality. I’m actually building “this demo app” that needs the geolocation in order to have the functionality I was looking for. I want this app to work in as many places as possible. With the Flash Platform I can build this for my browser and my desktop. For the Apple phone I can export it as a native app and for the Nexus One I can use the device browser with Flash Player 10.1.
Now… How does it work? The HTML5 geolocation API is extremely easy to use and, like I said earlier, you don’t even need to have a GPS enabled device.
function getGEO()
{
// First check if your browser supports the geolocation API
if (navigator.geolocation)
{
alert("HTML 5 is getting your location");
// Get the current position
navigator.geolocation.getCurrentPosition(function(position)
{
lat = position.coords.latitude
long = position.coords.longitude;
// Pass the coordinates to Flash
passGEOToSWF(lat, long);
});
} else {
alert("Sorry... your browser does not support the HTML5 GeoLocation API");
}
}
function passGEOToSWF(lat,long)
{
alert("HTML 5 is sending your location to Flash");
// Pass the coordinates to mySWF using ExternalInterface
document.getElementById("mySWF").passGEOToSWF(lat,long);
}
In my Flash application, I’m using ExternalInterface so I can communicate between JavaScript and my SWF. When my Google Maps component is ready, I call the GetGEO JavaScript method:
ExternalInterface.call("getGEO");
When the JavaScript method gets a result from the geolocation API, it will pass it on to the passGEOToSWF method. In my Flash application, I just listen for that method call and then call the code to update the map.
ExternalInterface.addCallback("passGEOToSWF", onPassGEOToSWF);
If you don’t have an HTML5 ready browser, check out this video of the application running in Firefox 3.6. Even cooler is that this also works in the browser on my Flash Player 10.1 enabled Nexus One (Please note that the network is slower on the N1 and thus it isn’t able to keep up with loading new map images. This has nothing to do with Flash Player 10.1 or the application.):
If you have Firefox 3.5 or newer installed, you can give it a try yourself: http://www.webkitchen.be/geolocation. I’m sure there are other browsers out there that also already have the geolocation API but this is the only one I tested on the Mac.
Hopefully this gives you a good idea of how HTML5 and Flash can also just work together (instead of killing each other ;-)). Flash on!
UPDATE: While writing this blog post, @robertbak pinged me on Twitter saying that he wrote a library to use in your Flex applications. Check it out on the Flex Exchange.
UPDATE: For the source files check out this blogpost.
The MWC 2010 Flash Challenge
by Serge Jespers on 04. Mar, 2010 in Flash Platform, mobile
Video: AOL Media explains the benefits of Flash Player 10.1
by Serge Jespers on 02. Mar, 2010 in mobile
For more videos from Mobile World Congress, check out the MWC page on Adobe TV.
Video: Brightcove about Flash Player 10.1 on mobile devices
by Serge Jespers on 26. Feb, 2010 in flash video, mobile
For more info about Brightcove, check out brightcove.com.
Flash Player 10.1 and battery life on mobile devices
by Serge Jespers on 25. Feb, 2010 in Flash Player, mobile
It’s great to see all the excitement about Flash Player 10.1 coming to mobile devices! Though some people need to learn to get their facts straight before jumping to conclusions.
One of the biggest improvements in Flash Player 10.1 is the memory and CPU consumption which obviously also has a big impact on the battery life. Battery life on mobile devices is very important and thus always top of mind for the engineering team!
There was a lot of commotion around the video that my colleague Michael Chaize published. He showcased a number of Flash based apps to show off the performance of FP10.1. Some of the applications he showed are CPU intensive and thus also potential battery drainers.
Mark Doherty posted a great follow up post with some background information on how we test battery consumption and performance internally. He also recorded a 17 minute YouTube video which resulted in a 6% battery drain. That results to being able to watch over 4 hours worth of YouTube video over WiFi using Flash Player. I can’t even do that on my brand new MacBook Pro (which is supposed to be able to give me 8 hours of battery life)… I’m not even sure I can do that on my Apple phone using their native YouTube app…
Today, Michael posted a follow up video where he plays a 26 minute video and plays a Flash based game for 12 minutes.
He noted a 10% battery drain after the playing the video which calculates down to 4.3 hours of video. Playing the Flash based game for 12 minutes resulted in a 4% drain which boils down to 5 hours of continuous gaming in the browser using Flash Player 10.1.
Those numbers are pretty impressive to me! Especially when you consider that this is still a pre-release version of the Flash Player running on a pre-release version of Android.
Kudos to the Flash Player team! Flash on!
Flash Player 10.1 and AIR coming to BlackBerry devices
by Serge Jespers on 17. Feb, 2010 in mobile
For me, day two of Mobile World Congress started with a demo on how to build Flash based applications for BlackBerry devices. Since RIM is one of our Open Screen Partners you will soon see Flash Player 10.1 and AIR on BlackBerry devices. As a Flash developer I am obviously very excited about that. BlackBerry has traditionally been an enterprise platform, one that uses Java as its core developer platform. Bringing Flash Player 10.1 and AIR to these devices opens up a whole new world for Flash Developers but also for BlackBerry users.
At today’s BlackBerry Developer Day we showed some of the new workflows between Adobe’s creative tools and both RIM’s and Adobe’s development environments. With the upcoming BlackBerry plugin for Illustrator, it’s incredibly easy to create assets for different screen sizes. It also simplifies communicating with the developer as he only needs to import one file in to the BlackBerry development environment he’s comfortable with. We’ve also demoed how you can soon build Flash based applications for BlackBerry phones and how Device Central makes it easy to test those applications as if you were using it on the actual device. Developers can use Device Central to test and tweak different screen resolutions and test the application as if it was running on the phone. The next version of Device Central will even allow you to test features like the accelerometer and multi-touch.
I talked to a number of BlackBerry application developers (video will be available on Adobe TV soon) who were at the keynote this morning and it was great to see their enthusiasm. Not only are they very excited about the improvements both RIM and Adobe are trying to make to streamline the communication between designers and developers but I could definitely feel the excitement about Flash Player and AIR coming to these devices as well.
I really like how RIM and the BlackBerry community are embracing the idea of being able to include Flash content in their mobile sites and applications. I can’t wait to see which types of “super apps” the BlackBerry community is going to build once they have Flash Player and AIR on the devices and to see what types of apps the Flash community is going to build for BlackBerry devices.
Make sure you keep an eye on the BlackBerry developer blog. A video of the keynote will be posted there as well as a bunch of information on how to build apps for BlackBerry devices.
Flash on!
Adobe AIR for Mobile Devices at Mobile World Congress
by Serge Jespers on 15. Feb, 2010 in Flash Platform, devices, mobile
Adobe AIR for mobile devices
If you are in Barcelona for MWC, make sure you drop by our booth! We are demoing AIR applications running on Android devices. This is fantastic news for Flash Platform developers who can now build applications that not only run across different desktop operating systems but can now also be deployed to Android devices. It’s obvious that AIR for Android takes full advantage of the improvements and new features we added to Flash Player 10.1. Those include multi-touch, gesture inputs, accelerometer input, GPS and screen rotation. My fellow evangelist Kevin Hoyt recently recorded a demo showing a couple of AIR mobile apps (Tweetbox, Southpark, Acrobat Connect) on the Motorola Droid. For more information, visit www.adobe.com/go/airmobile.
Flash Player 10.1 for mobile devices
I’ve been using Google’s Nexus One for a week now. One of the perks of working for Adobe is having access to the prerelease bits of new technology we are working on. The Nexus One I’m using actually has Flash Player 10.1 installed on it. It is extremely refreshing to be able to use the full web on your mobile device! Just the other day I wanted to view a video on Qik.com. While Qik has a mobile HTML5 site, the Nexus One didn’t seem to have the correct video codec. So I opened the normal Qik site which uses Flash Player to play the video… I pressed play and the video played. No blue Lego blocks, no missing plugin headaches. It just worked and that’s the way it should be. So far, I haven’t seen any Flash content that didn’t work on my Nexus One. I think that’s pretty impressive seeing as this is still a prerelease version. So yes… We are still working on it and no… you can’t download it today. But it’s coming soon and it truly is the missing piece in the mobile web puzzle. Whether you are addicted to Farmville or Bejeweled or if you’re like me and don’t want to install an app for every single news site you visit, you’ll be able to use those games and watch those videos in your mobile browser soon!
While most of the content just works, you should really think about tailoring your content to deliver the best possible user experience on mobile devices. Get a head start and learn how to do just that on Adobe Devnet.
I’m also really excited to see the Dell Mini 5 Tablet in action. In the video below Alan Tam shows a sneak peek of Flash content running on Dell’s upcoming touch-based tablet.
We’re demoing Flash and AIR content on a number of different devices at Mobile World Congress in Barcelona this week but if you can’t make it, make sure you don’t miss these demo videos. I’ll also record a few demos at the booth today and post them to my blog later… If there’s anything specific you’d like to see, don’t hesitate to leave a comment. Stay tuned!
It’s a great time to be a Flash Platform developer! Flash on!
Europe needs a European wide network carrier
by Serge Jespers on 10. Feb, 2010 in mobile
If I was living in the US, I could pick one of the big carriers like AT&T, T-Mobile or Verizon and use their service across all states. In Europe… No such thing. There are some alliances between some carriers but there is no such thing as a European wide carrier and frankly they don’t do a very good job at promoting these alliances.
I travel all over Europe and thus I always need to be aware of the fact that I am always roaming. And roaming is still freaking expensive. Sure, Adobe does pay my mobile bill but that doesn’t mean I don’t care about how much it costs.
Most of the European carriers are owned by only a handful of big telcos (like France Telecom, Vodafone, …). It is definitely possible to make this happen. I honestly don’t know why we don’t already have a European wide carrier… But then… I guess that these big telcos don’t mind making truckloads of money from frequent travelers like myself… *sigh*
Day 2 with the Nexus One
by Serge Jespers on 10. Feb, 2010 in mobile
The Nexus One has a decent mail client but it doesn’t support the certificates that our Exchange server uses. That means I have to rely on third party solutions and the only option available in the free Android Market is the Touchdown client. It works fine but the UI is just… well… let’s be kind and say that it doesn’t look that good. The mail client that I want to use (Moxier Mail) is not available as a free download and because there still is no official way to get paid apps in the Android Market in Belgium, I can’t buy it. I really dislike the UI on Touchdown… So much so that I find it horrible to use.
I really really hope I can solve this soon because I really need a decent Exchange client…
Other than that I am really happy with the Nexus One’s performance and its features. And having Flash in the Nexus One’s browser already changed the way I used the mobile web. Yesterday I heard about another act of violence/vandalism in Brussels and so I wanted to look up more info on the web. The article on the local news site I visited also had a video… Flash Video. I just hit the play button and watched the entire clip in the Nexus One. If I was still using Apple’s phone, I would have needed to take out my laptop to see the clip…
After watching that clip, I was curious to see how other Flash Video enabled sites would work. I opened up CNN.com, picked one of the news clips, hit play… and it immediately started playing. I also tried the BBC’s iPlayer and some other local news sites. They just worked… without the need for the publisher to republish their content in a different format. I just opened the browser, opened the exact same sites that I visit/use on my laptop and clicked “Play”. Now that’s a magical web experience!
- Using Growl in AIR applications with AIR 2 NativeProcess 15. Mar, 2010
- Mission critical Flash 12. Mar, 2010
- Robert Scoble interviews Flash Platform execs 11. Mar, 2010
- Number 1 on my wishlist: HP’s slate device 08. Mar, 2010
- The HTML5 Flash Marriage: Geolocation source 08. Mar, 2010
Latest Tweets
Where am I?
Serge Jespers is at home in Mechelen, Belgium.
Flash Platform blogs
- Adam Lehman
- AIR team blog
- Andrew Shorten
- Ben Forta
- Christian Cantrell
- Christophe Coenraets
- Duane Nickull
- Enrique Duvos
- Ethan Malasky
- Flash Platform blog
- Greg Wilson
- James Ward
- Kevin Hoyt
- Lee Brimelow
- Mark Doherty
- Matt Chotin
- Mihai Corlan
- Mike Chambers
- Piotr Walczyszyn
- Renaun Erickson
- Ryan Stewart
- Ted Patrick
- Terry Ryan
- Tom Krcha





