Hi I succeed to finish my code of simple viewer PC screen. Work with WP7
See the video
http://www.youtube.com/watch?v=cCwsuj7Hcno&list=HL1330329890&feature=mh_lolz
Now I will go to try how control the mouse?
About my app I use socket to connect to the server, no RDP protool and its word good. I try it on different machines and networks (@IP) and work perfect.
My app is a last year project so any idea about how to control the cursor.
This probably should have been in the same thread, but anyhow...
It depends on how your protocol is designed. Currently, all the data is pushed from the PC to the phone. To control the cursor, your phone needs to push data to the PC, which means that the PC server app needs to check for data from the phone app.
Sensing a touch on the phone is easy. Sending those coordinates over the network is pretty easy as well; you figured out sending video so I assume you can handle this part. On the PC, you'll want to receive those coordinates and then multiply them back out to their equivalent positions at the PC's resolution. Then you need to move the mouse cursor. There are Windows APIs for doing this, but I've never messed with them. They might be exposed to .NET, but I'm guessing that you'll need to make a call into native code (this is pretty easy, though; look up P/Invoke). Clicking can be implemented by having the phone detect that you tapped the same spot where the cursor already is, and having it send a different message to the server.
The messages will need to be determined by you, as the designer of the protocol. I do recommend using different messages for "move the cursor to here" and "click where the cursor is now." As for when to send the message, that also depends on how you implemented the app. If the entire transmission of the screen frame is one long socket send/receive, you'll have to exchange cursor commands between frames. If you do multiple smaller chunks, you can check for a cursom command and update the position or click as appropriate. Another alternative is to create two socket connections, and have the second one be used for cusor commands. I don't recommend this, though - it's not needed, it takes more code, and although I feel that everybody *should* learn multi-threaded netcode development, I'm not sure it what you want to work on now.
I am really confused
But I will try to get the coordinate of cursor from PC and move it on WP7 screen at first, if I succeed I will develop code tap (click), double tap and drag.
I am really confused
No one can help!!!!!!!!!!!!
Google should be your best helper - try to work with google first.
On WP7 app side you need to grab tap position, translate it to desktop coordinates and send data to the server. On the server side you may use Win32 API function SendInput() http://msdn.microsoft.com/en-us/library/windows/desktop/ms646310(v=vs.85).aspx
SendInput can emulate mouse and keyboard events.
P.S. As for youtube video: try your project on the real device, using WiFi or 3G, and you will understand what RDP protocol was built for
Yes I use Google for that,its the best search engine
I understand that use the coordinates to locate the position, and send it from WP7 to PC.
But my question is how any sample code can hep?
Related
Hi all,
New to XDA, reading plenty of posts and eagerly awaiting my HTC Desire (coming from the UK, obviously held up by the recent volcanic ash problems).
I've been working on an app called twot and thought someone here might benefit from it (?). It installs on your PC (very light, doesn't leak memory and works on XPSP2-Win7) and watches your desired twitter stream. The idea is, you tweet from your phone (or work, etc) and twot picks up your tweet and executes whatever script or application you choose.
I'm sure there's heaps of apps out there that do this, but I kind of wanted to design this one to do exactly what I want. It works off a simple mdb that you have to edit manually (sorry no GUI for this yet) that matches a recognized command with an action. For example, I control my aircon by using "ac on" and "ac off". When twot (running in the systray) picks up "ac on", it runs "ac_on.bat" in the application directory (specified in the db) which in turn uses psexec (included this, hstart, and a few other things in the zip to help script stuff up) to launch a script on my htpc, that uses ir server suite (awesome free tool) to issue a command to the ir transmitter to turn the AC on. I know it sounds like a long winded approach, but it's not that complicated (and it's free!).
I do the same to turn the virtual fireplace on (psexec in interactive mode) and initialize web cams around the house to take a picture and email it to whatever email address i specify. To deal with parameters I've told twot to watch for anything starting with "%". When it reads each tweet in and finds %'s, it treats them as parameters and stores them in an array. Then if it detects a command (eg, "webcam") it calls the specified application/script and parses the array of parameters to it. (eg. "c:\scripts\myscript.bat paramOne paramTwo"). The tweet looks like "webcam %paramOne %paramTwo".
Anyway, It's written in VB but i plan on porting it over to .net when i get a minute. I've attached the zip . It is a very early version so it will evolve. Feedback is always welcome
Oh also, If anyone wants the source, let me know. It's fairly basic code and quite short
Is there a way of submitting Alt commands via an Android keyboard to my windows PC?
I presently use Air Mouse on an Ipod Touch to control my HTPC remotely.
This is the only use I have for the thing and I'd like to think that there will be the perfect Android solution for me soon.
The benefit of Air Mouse over RemoteDroid and GMote is the Alt key ability which neither of the Android apps have (or if they have I haven't found it yet), a function I find a lot of use for.
(I should add that the only Android device I have at present is an HTC Desire....so I guess that could be the limitation rather than the apps)
I don't really understand what you mean by alt key ability. Could you please explain, and maybe we can help sugest a solution?
What is it that this alt key ability of air mouse do, or more importantly, what is it that you want to accomplish with such an alt key ability?
Thanks for the reply, I had a feeling I wasn't being very clear.
I'd like to use my Android device as a trackpad and mouse for my HTPC.
My media player of choice (MPC-HC) uses a lot of keyboard shortcuts with the "Alt" signifier. For example Alt+X closes the program. These shortcuts are especially important because the program runs in a fullscreen mode which removes any context menus.
All the various android soft keyboards I have seen have no Alt key so I would lose a lot of functionality controlling the HTPC from an android device.
I have read that pressing the trackball twice on an HTC Desire may be a substitute for pressing the "Alt" key but have never got this to work in practice.
Just found an app that might suit your needs. I suggest you check it out.
GRemote Pro
Edit:
Ok, I just tried this app out, and it does exactly what you need.
It comes packed with an app alt, ctrl, tab and del buttons that let you alt+tab among other things.
I didn't see MPC-HC in the server setup, but that's not a problem as you can configure your own profiles with specific commands.
Fair warning, it's a bit on the slow side (seems to be a port of a winmo app), but I'm sure it'll get better with time and updates. It's a very polished Remote app for android and it even comes with drivers for a G-sensor controller to play games with (use android as wii-mote/controller).
This app defenitly rocks.
You sir (or madam) are a legend.
I was disappointed at first to see that this app doesn't simply add Alt and Ctrl keys to the standard keyboard, but it does allow considerable control of the media player directly.
Need to have a much longer play to see if it's really what I need...but I appreciate your effort already.
Another Suggestion
Have you tried unified remote?
It's got a full windows keyboard, You can create your own custom remotes and if you wanted, you could even have multiple droids connected.
Yes, this reply is s bit late, but better late than never
try Hackers Keyboard
I installed hackers keyboard and tried to activate it. It gives a prompt message that this will collect all information except passwords, including personal data and credit card numbers....!!!
I work at a power plant and carrying around a clipboard to write down logs and numbers is getting old. It's a waste of paper and ink. There are about 12 of us that rotate on a 3 shift rotation and I already convienced 3 of them to use Android phones and one has an iPhone (wouldn't listen, now he regrets).
If I can get them to them to use an app for data logging, maybe my work center will push for Android powered phones in my shop vs the use of late 90's windows mobile PDA's they are trying to get us.
I'm not sure if the app already exist, if not, maybe I'll use my spare time to try and learn to dev one to my taste.
Basically what I want is to have is a spreadsheet type look. If you look at the attched picture, you can get an idea of what my sheets already look like. In the app, if I could just touch a cell and I can input a number, or a menu pops open for auto/on/off/out of service(OOS). Save it/export it and transfer data onto paper log sheets.
Now my ideas are kicking and maybe I'll have to look into making an app. Any ideas? Right now I use gmail compose and just write the numbers which is kind of lame.
Why not use Quick Office mobile and create sheets.
I created an expense sheet on my PC and moved it to my phone and keep track of everything on the go via my phone using Quick Office.
It'd be much easier, I'd assume, I write up a nice looking spreadsheet as apposed to an app..
Hi,
You probably know about the Microsoft's Math Input Panel of windows (if you don't, type it in the search on start and get amazed).
So, as a student, which I use my laptop at study alot, I use the math input panel for easy equations and math letters by handwriting and it really makes life easier instead of typing it manually in word.
So now I also got an Android device (HTC Desire HD), and I thought why wouldn't I use the fantastic touch screen of it as a pad, and instead of "Handwriting" with the mouse on the laptop, I will use a real handwriting on the mobile (with stylus or finger) and it would send it or transfer it to the PC, it could be live, like when I writing something on my mobile, it will be appeared on the laptop display immediately,
or it can be like, writing the whole equation or something, then press Send, and it will send it all to the Math Input Panel.
If the "working with an exist software [the Microsoft's Math Panel]" is too difficult to make so I wouldn't mind that the whole "Math Handwriting recognizing" will be on the mobile as a app..
So, here is my idea,
If any developer would read it and start it up, it would be great, let me know
Or if this is already exist in a sort of a way, also tell me, although I looked pretty hard for such a thing, and found nothing relevant.
Thanks for any kind of help,
Yarden,
Guys, the app idea is great, have you considered adding remote control of the touchscreen? it is possible through adb by input tap, input swipe + input text commands.
If you would combine that with mouse tracking, coordinate capturing in the client, you'd have full blown device remote
proof of concept is done in VB:see http://forum.xda-developers.com/showthread.php?t=2786395
ogonzuhnina said:
Guys, the app idea is great, have you considered adding remote control of the touchscreen? it is possible through adb by input tap, input swipe + input text commands.
If you would combine that with mouse tracking, coordinate capturing in the client, you'd have full blown device remote
proof of concept is done in VB:see http://forum.xda-developers.com/showthread.php?t=2786395
Click to expand...
Click to collapse
Thank you for your suggestion, we'll consider adding it in future version. Actually we've receive some similar suggestions.
Personally, I think this feature is cool but not useful to me. I may use it when the screen is broken or the phone is not nearby. But since I can use AirDroid to send SMS, make calls, why would I use this for? I can do other things like tweet, watch video on pc directly.
Well, maybe I will found it useful when I broke my touchscreen.
I've moved your post to this new thread.
Hint: we are developing VNC feature in new version. Hope you like that.