Please note that your PC's browser window will have different dimensions 
than your browser app on the phone. It also will use a different web page 
rendering engine and on top of that there are many websites that deliver 
different HTML content depending on the device. In my humble opinion 
getting the scroll position properly in sync is next to impossible.

As for synchronizing just the URL: you could write your own app that routes 
URL synchronization messages to your phone's default browser. You can open 
any URL via Android Intents. That way whatever app is installed on the 
phone and feels responsible for handling a certain URL scheme gets opened 
to display the URL.

Let your app talk to an additional plugin you create for Firefox / Chrome 
in order to get the current URL in sync. You need to find a communication 
channel between phone and PC. If they are both on the same network (LAN), 
then you need to tell your plugin running on the PC the IP address of your 
phone (or the other way around). You could then open a socket connection on 
your phone that listens to incoming URL synchronization updates from your 
plugin.

Alternatively you could also make use of "push" messages for sending the 
URL from your browser plugin to the phone via web-services. I think that 
would be the most elegant solution because that would not require that your 
phone is on the same network as your PC. 

Push messaging is called in Google's lingo "Cloud Messaging". You can find 
Android-specific information about it here: 
http://developer.android.com/google/gcm/index.html

Also in that case you need to let your plugin know a device identifier that 
identifies your phone as a recipient for messages. A really good way to 
solve that problem would be creating a web-service that manages user 
accounts. You log into that account from your browser plugin and also from 
your phone. That web-service would be responsible for dispatching 
synchronization messages from your plugin to the phone. Your phone receives 
a push messages and just starts an "ACTION_VIEW" Intent for opening that 
received URL.

On Saturday, February 23, 2013 1:51:38 PM UTC-6, crosis99 wrote:
>
> I'm starting Android development and wanted to understand how to achieve 
> the following.  
>
> I use my PC and Samsung Galaxy Note 2 smartphone often. * I'm within my 
> Firefox / Chrome browser on both units and find it very annoying to have to 
> navigate to the same URL and scrollbar position when jumping between the 
> two devices*.  What i would like is an app which will allow me to 
> synchronize my URL + position of my webbrowser between PC and mobile.  For 
> good measure* i also want* to synchronize my YouTube, Facebook and 
> Twitter location within my PC browser with the equivalent App position 
> within my mobile and vice-versa.  I see it as my PC webbrowser <-> Android 
> app location and position synchronizing.  Granted i am aware of clipboard 
> syncing apps but i would like to be able to *Automate *the relevant app 
> to the correct location and position even for those apps with no URL 
> Address Bar; a more fluid, less painful experience.
>
> How can this be achieved?  Yes, yes security reasons and such but I am 
> more interested in HOW it can be done be it with ROOT or NON-ROOT.  I'm 
> thinking an Android Service would be involved. * If you can at least 
> point me to a quality link to get started, API references, or 
> terminologies, I would be greatly appreciative.*
>
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to