Sending Images often from PC/Mac to Phone?

General topics about the Android-Platform itself.
Coding issues please to the subforum right below.

Sending Images often from PC/Mac to Phone?

Postby TobiTobsen » Thu Aug 12, 2010 8:17 pm

Hey,
this is my first post here! I'm happy that I found this forum, looks quite busy here :-).

I'm planning do develop a software for android, one part would be for the user to see the displayed desktop of a PC or MAC computer.
I was thinking about developing a small server-like software tool that runs on the computer. This captures the desktop as screenshot every second, for example.

An App running on the android phone connects to the server software and sends sth like a handshake in which the current resolution of the device is transmitted.

The softwrare on the PC adjusts now the size of the image and sends it to the Android phone.
The Android app displays the new picture as background so the user in front of the phone can see the desktop, of course not in high resolution but this will work for my needs.

What do you think? Will this work or might there be better solution?
Can I change the background image that often?

Thanks!

Cheers,
Tobi
TobiTobsen
Freshman
Freshman
 
Posts: 8
Joined: Thu Aug 12, 2010 8:06 pm

Top

Re: Sending Images often from PC/Mac to Phone?

Postby jonbonazza » Thu Aug 12, 2010 9:40 pm

Every second would be too long and would present TONS of lag. I would just set it to take a snapshot every "frame" (which would be hardware dependent" and send it to a web server which in turn sends it to the android device. With this said, don't expect any interactivity. This would simply let you monitor the device.

You could cut the code by a lot if you just had the PC send the image in it's full size and then let the android device handle the conversion int he ImageView object. With this said, I am not sure how it would effect the performance. You might try both ways and see which works better.

Wait, are you displaying it as a live wallpaper or as an app? If it is alive wallpaper, something like this will KILL your battery. That is a lot of load on the battery to be active 24/7. If you really want to pursue this concept, I would highly consider making it an app and not a live wallpaper.
jonbonazza
Master Developer
Master Developer
 
Posts: 665
Joined: Thu Jul 15, 2010 2:58 pm
Location: WV USA

Re: Sending Images often from PC/Mac to Phone?

Postby TobiTobsen » Fri Aug 13, 2010 7:32 pm

Hey,
sending it only once a second is not very nice, but it reduce the data I have to send. This is also why i was planning to reduce the resolution before sending it to the android device.
But I can test this and change the frequency of taking the snapshot.

What do you mean with this:
"With this said, don't expect any interactivity. This would simply let you monitor the device."

I was planning to display the image as background of an app. What do you think?

Cheers,
Tobi
TobiTobsen
Freshman
Freshman
 
Posts: 8
Joined: Thu Aug 12, 2010 8:06 pm

Re: Sending Images often from PC/Mac to Phone?

Postby jonbonazza » Sat Aug 14, 2010 4:52 pm

So you are displaying the image as the background of an app? if I may ask, what does this app do? Pardon my ignorance, I ma just trying to figure out what you are trying to accomplish so that I could further help you.
jonbonazza
Master Developer
Master Developer
 
Posts: 665
Joined: Thu Jul 15, 2010 2:58 pm
Location: WV USA

Re: Sending Images often from PC/Mac to Phone?

Postby TobiTobsen » Sat Aug 14, 2010 6:07 pm

It might become a tool that enables to control different Applications that run on a computer. I will not be made to control for example windows with all its features. The communication to control a software works fine.
At least its also for me to test a few things with android.
I'm hoping that there will be an IPad-like device that runs under Android...

Cheers,
Tobi
TobiTobsen
Freshman
Freshman
 
Posts: 8
Joined: Thu Aug 12, 2010 8:06 pm

Re: Sending Images often from PC/Mac to Phone?

Postby jonbonazza » Sat Aug 14, 2010 11:50 pm

Mmkay, well like I said, if you just take snapshots of the background and display them on the backgorund of the phone, you won't be able to interact with them. They will just be images. There is ONE way you could use this method, and that is to use the onTouchEvent() method on the phone to grab the screen coordinates, and then send them over the network to a PC app that converts the android screen coordinates to monitor coordinates (converting resolutions is easy), and then use some low-level programming to do some stuff on the computer. you would probably have to know at least assembly and find some way to tie assembly into java (or you could program the PC app in C++ in which there is already some assembly language support and APIs). Also, with this method you would have to grab the screenshots MUCH faster than every second. every millisecond would probably be even too slow. Your best bet is to use the system "ticks" as a measurment of time (look in to timer ticks in assembly. There is a lot of documentation for it there as that is the only means of time syncing available to that language). This is a very tough project and when it is all said and done (if you finish it in the first place), it would be a HUGE battery hog.
jonbonazza
Master Developer
Master Developer
 
Posts: 665
Joined: Thu Jul 15, 2010 2:58 pm
Location: WV USA

Top

Re: Sending Images often from PC/Mac to Phone?

Postby TobiTobsen » Sun Aug 15, 2010 1:40 pm

Thank you for your Ideas!
As I said, the part of interacting with the computer is done and works. Its lilke you said, getting the touch coordinate and mapping it on pre-defined coordinates. Controlling for example the build in mutitouch support from win7 works.
I want to stay with Java, to use the software not only under windows.
Please help me, why would that be using a lot of the battery power?

Cheers,
Tobi
TobiTobsen
Freshman
Freshman
 
Posts: 8
Joined: Thu Aug 12, 2010 8:06 pm

Re: Sending Images often from PC/Mac to Phone?

Postby jonbonazza » Sun Aug 15, 2010 7:28 pm

Because you are constantly sending and recieving data. The more data you send/receive and the fast your do it, the more battery power is consumed.
jonbonazza
Master Developer
Master Developer
 
Posts: 665
Joined: Thu Jul 15, 2010 2:58 pm
Location: WV USA

Re: Sending Images often from PC/Mac to Phone?

Postby TobiTobsen » Wed Dec 01, 2010 8:53 pm

Hey, what would be a good image format for the android phone to receive and to display it?

Thanks!
Tobi
TobiTobsen
Freshman
Freshman
 
Posts: 8
Joined: Thu Aug 12, 2010 8:06 pm

Re: Sending Images often from PC/Mac to Phone?

Postby rmr » Thu Dec 23, 2010 4:11 pm

You may want to set up the app to send only differences in the images between frames. This would help you save on bandwidth and get more speed.


--------------------------------------
Nexus S Rocks
rmr
Freshman
Freshman
 
Posts: 4
Joined: Tue Dec 14, 2010 3:25 am
Location: not where I like

Top

Return to General

Who is online

Users browsing this forum: No registered users and 2 guests