Quick Tip: How to run Android application from browser?

For now I succeeded with general approach – Android market application. If you go through Publishing Your Applications you will notice there is a url (with market:// scheme) that can be used to navigate user to your application in Android market. Sadly this url works only from Android device not from desktop (404 not found)! So I came up with this code:

var isAndroid = navigator.userAgent.toLowerCase().search("android") > -1;
if(isAndroid && confirm("Do you want to run onBoard Android application?"))
    window.location = "market://details?id=air.onBoard2Android";

What it does is:

  1. it first test user agent if it is an Android device, if so
  2. it asks user to decide wheter to use Android and than
  3. it redirects user into Android market application showing details of your application

From here user can install or open the application. You may try it on http://onboard.yoz.sk (run from Android device).

I was also playing with the idea about how to run my Android AIR application from browser, well normaly for AIR apps you would use install badge or its customized version in order to check if the application is installed already and then run or install it. But I hit a major problem with air.swf not dispatching Event.INIT on Android flash player 🙁 … I will surely get back into this to discover more.

2 comments so far

  1. Alex November 26, 2010 18:37

    Love your work . . . keep it up. Onboard has fantastic potential.

    If you’re interested in my experiment to connect browser swf to AIR app via sockets then check this out . .
    http://blog.pixelami.com/2010/11/browser-swf-to-air-swf-communication/

  2. Jozef Chúťka November 29, 2010 11:10

    @Alex thank you. ServerSocket seems very interesting hmm…

Leave a comment

Please be polite and on topic. Your e-mail will never be published.