andbook!.pdf - Learning Android Get an anddev.org - Android-Shirt Back to index
anddev.org Header Logo
FAQ Search Top rated articles Browse Feeds anddev.org - Authors Contact Details Register Log in

[VIDEO-Tut] - Simulating incoming Phone Calls / SMS via CMD


 
       anddev.org - Android Development Community | Android Tutorials | Index -> Novice Tutorials
Author Message
plusminus
Site Admin


Joined: 14 Nov 2007
Posts: 2067
Location: Germany

PostPosted: Wed Nov 28, 2007 5:49 pm    Post subject: [VIDEO-Tut] - Simulating incoming Phone Calls / SMS via CMD Reply with quote

[VIDEO-Tut] - Simulating incoming Phone Calls


What you learn: You will learn how to simulate a GSM-Call to the Android Emulator over a TelNet connection.

Difficulty: 0.5 of 5 Rolling Eyes

What it will look like:


Description in words:
  1. The emulator has to be running Exclamation
  2. Open the Ttelnet-Client of your choice (on WinXP is should already be installed, on probably have to install it later on (see below how to do that on WinVista).

  3. type to it: "o localhost 5554" // dunno exactly if it is always, could also be 5555... have a try.
    I. "o" stands for "Open", "localhost" is the 'IP' and "5554" is the port the telnet-server is listening to.

  4. Connection should establish in a few seconds.

  5. type: "gsm call 123456" to simulate an incoming call.

  6. See the emulator ringing Smile



Idea Simulating SMS Idea


Simulating an incoming SMS via the Commandline/Terminal is pretty the same, but you need at least Version m3-rc37a to do that.

The Command is like this:
Code:
// General style:
sms send <NUMBER> <TEXT>
// Example:
sms send 0160123456 HelloWorld



Installing TelNet-Client on Windows Vista wrote:
  1. Click Start then select Control Panel.
  2. Select Programs and Features (upper menu bar).
  3. Select Turn Windows features on or off.
  4. Select the Telnet Client option.
  5. Click OK.

  6. A dialog box will appear to confirm installation. The telnet command should now be available.


Regards,
plusminus

_________________

| Android Development Community / Tutorials


Last edited by plusminus on Sun Dec 16, 2007 8:10 pm; edited 5 times in total
Back to top
View user's profile Send private message Send e-mail Visit poster's website
JimCummins
Junior Developer


Joined: 28 Nov 2007
Posts: 10
Location: Ames, IA

PostPosted: Wed Nov 28, 2007 6:48 pm    Post subject: Reply with quote

Thanks for this! This is exactly what I was looking for when I came to anddev and here it is on the first page.

Jim

_________________
"I have no reason to learn this, which is what makes it interesting."
Back to top
View user's profile Send private message Visit poster's website AIM Address
JimCummins
Junior Developer


Joined: 28 Nov 2007
Posts: 10
Location: Ames, IA

PostPosted: Wed Nov 28, 2007 7:10 pm    Post subject: Reply with quote

I've noticed that the telnet connection works fine but sometimes when I am logged in to the phone and run a command I get:

Code:
KO: unknown command, try 'help'


This sometimes happens even when the command I am running is 'help'. Confused

Fortunately if I type 'help' a few times eventually I get the help command to run properly. At the end of the help command I see 'OK' which indicates that the phone is ready to receive other commands. At this point running 'gsm call' finally works. Just keep trying and eventually the emulator will respond. Smile

_________________
"I have no reason to learn this, which is what makes it interesting."
Back to top
View user's profile Send private message Visit poster's website AIM Address
plusminus
Site Admin


Joined: 14 Nov 2007
Posts: 2067
Location: Germany

PostPosted: Wed Nov 28, 2007 7:21 pm    Post subject: Reply with quote

Hello Jim,

I also have after correcting typos with [backspace].

simply type "quit"+ [ENTER] until the connection gets closed and reconnect after that.

Regards,
plusminus

_________________

| Android Development Community / Tutorials
Back to top
View user's profile Send private message Send e-mail Visit poster's website
JimCummins
Junior Developer


Joined: 28 Nov 2007
Posts: 10
Location: Ames, IA

PostPosted: Wed Nov 28, 2007 7:31 pm    Post subject: Reply with quote

plusminus,

I see now that you are correct. Backspace is indeed the culprit.

Thanks for the tip!

-Jim

_________________
"I have no reason to learn this, which is what makes it interesting."
Back to top
View user's profile Send private message Visit poster's website AIM Address
tagazok
Junior Developer


Joined: 18 Nov 2007
Posts: 12
Location: Nice / Paris

PostPosted: Thu Nov 29, 2007 9:25 pm    Post subject: Reply with quote

you can start the emulator by "./emulator -useaudio" or emulator.exe -useaudio to have a beautiful ring when you simulate a call Smile

I discovered this today Smile

_________________
L'idiot ne savait pas que cela était impossible...
...alors il l'a fait.
Back to top
View user's profile Send private message Visit poster's website
JimCummins
Junior Developer


Joined: 28 Nov 2007
Posts: 10
Location: Ames, IA

PostPosted: Fri Nov 30, 2007 2:16 am    Post subject: Reply with quote

I used -useaudio with my emulator today and the sound on the ring was skippy and sounded awkward. I thought I might be low on memory but restarted to be sure. Unfortunately the skipping continues. I am going to try +/-'s MediaPlayer tutorial to confirm that it is emulator wide and not just a problem with "ringing".
_________________
"I have no reason to learn this, which is what makes it interesting."
Back to top
View user's profile Send private message Visit poster's website AIM Address
plusminus
Site Admin


Joined: 14 Nov 2007
Posts: 2067
Location: Germany

PostPosted: Fri Nov 30, 2007 7:44 am    Post subject: Reply with quote

Hello JimCummins,

Yes, it is emulator wide. Something seems to be not optimal, as CPU usage doesn't really peak here. (Remember this is still a Developers Preview Exclamation).

Regards,
plusminus

_________________

| Android Development Community / Tutorials
Back to top
View user's profile Send private message Send e-mail Visit poster's website
waruna
Once Poster


Joined: 22 Dec 2007
Posts: 1

PostPosted: Sat Dec 22, 2007 8:20 pm    Post subject: SMS doesnt Work Reply with quote

Hi All,
I try to simulate a SMS using CMD but didnot work.
I have the latest SDK version as well.
Can any one suggest a solution.

Thanks in Advance
Waruna

_________________
Waruna de Silva
Ceylon Linux, SLIIT, LK-LUG
Back to top
View user's profile Send private message
plusminus
Site Admin


Joined: 14 Nov 2007
Posts: 2067
Location: Germany

PostPosted: Sun Dec 23, 2007 2:39 pm    Post subject: Reply with quote

Hello Waruna,

Can you simulate Phone-Calls Question
what is the "error"-message shown in the console Question

Or is there no "error"-message but nothing happens in the emulator (like "SMS received"-Popup) Question
Idea If "yes" to the last question Arrow Source go here.


Regards,
plusminus

_________________

| Android Development Community / Tutorials
Back to top
View user's profile Send private message Send e-mail Visit poster's website
derek_lan
Freshman


Joined: 25 Dec 2007
Posts: 8

PostPosted: Sat Jan 12, 2008 4:32 pm    Post subject: Reply with quote

very cool. if u could not test ,maybe u should update your SDK
Back to top
View user's profile Send private message
plusminus
Site Admin


Joined: 14 Nov 2007
Posts: 2067
Location: Germany

PostPosted: Sat Jan 12, 2008 5:23 pm    Post subject: Reply with quote

Hello derek_lan,

what do you mean Question
In a clean emulator, nothing will happen when you receive a simulated SMS, because there is no built in Application handling SMS at the moment (m3-rc37a).

Regards,
plusminus

_________________

| Android Development Community / Tutorials
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
       anddev.org - Android Development Community | Android Tutorials | Index -> Novice Tutorials All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


© 2007, Android Development Community
All rights reserved.
Powered by phpBB.