Not one for Bloggin'

But you always have to start somewhere

Any Browser 2 Android [Update: Compatability Broken]

, , , , , , , , , , , , , , , , , , , , , , , , ,

As I don't use Chrome this extension was useless to me. So with some quick 'n' dirty hacking, I've created a cross browser bookmarklet that will create a popup that sends the current url to your Android 2.2 device, once the ChromeToPhone APK is installed, and will work from any browser.


Earlier today Google released Android 2.2 (Froyo) at Google I/O.

One new feature in Froyo is the "Android Cloud to Device Messaging Framework", which allows servers to push small messages to devices. E.g. notification of new mail etc.




One of the examples that Google released was called ChromeToPhone
ChromeToPhone is very similar to my QR2Droid in that it's purpose is to send the URL that you are currently viewing from your browser, and open it on your phone once you are logged in with the same Google account on both devices. It does it quite well with the URL appearing in the notification bar.

As I don't use Chrome this extension was useless to me. So with some quick 'n' dirty hacking, I've created a cross browser bookmarklet that will create a popup that sends the current url to your Android 2.2 device, once the ChromeToPhone APK is installed, and will work from any browser.

To use Browser2Android simply bookmark the code below, then Opera users can then shift+drag the bookmark to the address bar for quick access. Works on Opera, Firefox, Chrome and even IE.

javascript:(function(){qr_droid=document.createElement('SCRIPT');qr_droid.type='text/javascript';qr_droid.src='http://smallroomstudios.net/qrdroid/a2dm.js';document.getElementsByTagName('head')[0].appendChild(qr_droid);})();


Enjoy.

Update

Following on from creating a bookmarklet I have also created by a Firefox extension so that users can add a button to their address bar, or right click on a link to send a link to their Android phone. (chrometophone.apk is still required on the device.)
The add-on for Firefox, Thunderbird & SeaMonkey can be downloaded from Mozilla. amla70 created one at the same time so we merged our code, which is available on the Mozilla site. He did the great work on the notification popup etc.

2nd Update
Unfortunately the previous implementation of the chrometophone opened up the potential of nasty cross site scripting attacks (XSS) and so some changes were made to combat this. However in doing so the functionality of AnyBrowser2Android was broken and this bookmarklet has been discontinued.
Firefox users can continue to use Send To Phone which will continue to be updated and maintained with feature parity to the Google Chrome extension.

Top Android Apps & Tips

Comments

Damiendam5s Friday, August 13, 2010 1:41:56 AM

So no way for Opera users to push URLs to our phone? sad

Patrick O'Reillypaddy2k Friday, August 20, 2010 12:30:45 PM

There will be soon. A widget is in the works.

lucideer Saturday, September 4, 2010 2:41:08 AM

@Patrick O'Reilly - a Unite app would make a lot more sense here than a widget I believe - as it's integrated into the browser (and could possibly even serve files to the phone, similar to Fox2Phone's "disabled-by-default" php-proxy feature, but obviously far better).

I told someone I might look into making one myself, but I lack a Droid and you seem somewhat more knowledgeable about C2DM...

Patrick O'Reillypaddy2k Saturday, September 4, 2010 4:23:36 PM

a unite app, didn't think of that in that respect. isn't it possible to communicate between the unite app and the browser with javascript.
anyway the widget is built, just awaiting approval. download from http://foxtophone.com/o2p.wgt

lucideer Saturday, September 4, 2010 4:38:32 PM

Originally posted by Patrick O'Reilly:

isn't it possible to communicate between the unite app and the browser with javascript.


That depends on the type of communication - certain types aren't possible due to cross-origin restrictions on localhost (unite being local).

Originally posted by Patrick O'Reilly:

the widget is built... download


Cúl. I'll take a look see how possibly porting it would be.

Write a comment

New comments have been disabled for this post.