I am Android beginner so please forgive if the question might sound silly. I had an app idea where a youtube video or a web page open on a smartphone could be transferred to the laptop screen by detecting a particular forward phone motion-gesture. But to program something like that, I realized that I need to have access to the browsers web page or the video URL which the youtube app is playing. With some initial research it seems to me that the Android system doesn’t keep that piece of information. Am I correct?
The end solution seems to me to code up my own browser or maybe enhance an existing open source one. I looked into the possibility of accessing the temporary files on the phone through my program but the location /data/data seems accessible only to root I guess. Also I intended my app to run as a background service so that I could later expand the idea to other places like transferring and opening PDF file on a laptop etc in a similar fashion. Is there a way around where I can access similar information from a running application?
for showing a youtube video , check this one out:
http://code.google.com/p/android-youtube-player/
also , isn’t it easier to transfer the url alone to the other device instead of sending the entire video?
you could do this in multiple ways : bluetooth , wifi , qr code ,usb , morse , … the possibilities are countless .
about accessing other apps data , the app must provide it to you in some way , since all apps are protected from each other (using sandboxing) . for youtube , you can “listen” to youtube urls (via intent filter) for allowing the user to choose your app instead of youtube app (or any other app that listens to it) .
about /data/data , this is correct , only rooted devices can reach it , or your own app if all you do is access your own folder (which is /data/data/YOUR_APP_PACKAGE_NAME) .you can also reach this folder on an emulator .
it’s also quite easy to root your device . even novice users can do it via a third party app . here’s something that worked for me on both galaxy S and galaxy S2 :
http://www.unlockroot.com/