Thursday, April 18, 2013

[android help] How do I make a Telnet connection to an Android device?


I want to be able to make telnet calls to an Android device, for giving it a geo location similar to this answer in "How to emulate GPS location in the Android Emulator?".


I tried using the Net::Telnet class in Ruby, and this code does seem to be doing it:



require 'net/telnet'
telnet = Net::Telnet::new( "Host" => "localhost",
"Port" => 5554,
"Timeout" => 90 )
telnet.puts("geo fix -122.326 47.633")


I am not receiving any errors but the app doesn't get the location.


When I am running this in terminal I do not close the session, so how do I do to the same through Ruby?



.

stackoverflow.comm

No comments:

Post a Comment

Google Voice on T-Mobile? [General]

Google Voice on T-Mobile? So I recently switched from a GNex on Verizon to a Moto X DE on T-Mobile. I had always used Google Voice for my v...