Welcome to MSDN Blogs Sign in | Join | Help

Windows Mobile Team Blog

The Official Windows Mobile Team Blog
Using Microsoft.WindowsMobile.Telephony

One of our MVPs pointed out today that using Phone.Talk was adding invalid characters at the end of the telephone.

Unfortunately it turns out we had a bug....we were passing a pointer to a string that was not null terminated.
This will be fixed, but until then here is the workaround:

   To call the number "555-0100" you would need to create the Phone object, and then call Talk as follows:

   Phone myPhone = new Microsoft.WindowsMobile.Telephony.Phone();

   myPhone.Talk("555-0100\0"); //Notice the null character appended at the end.

-Luis Cabrera
SDE - Microsoft.

*I did not write this bug...although I have written my share of bugs :-|

Posted: Tuesday, January 03, 2006 5:47 PM by windowsmobile
Filed under:

Comments

Neil Cawse said:

This blows me away!
I really hope this is not indicative of the level of testing Microsoft has given the compact framework? IMHO the biggest failing of Microsoft's Mobile operating system(s) is the lack of robustness caused by poor testing!
# January 3, 2006 10:56 PM

Shane Church said:

<sarcasm on> Another negative comment by a Windows Mobile developer. I guess it's time to shut off the comments. <sarcasm off> I've seen so much openness out of Microsoft since this blogging initiative started, but this blog has been particularly bad about this. You shut off the comments to the Windows Mobile 5.0 Security Model FAQ post when the comments turned negative (http://blogs.msdn.com/windowsmobile/archive/2005/12/17/security_model_faq.aspx) without an actual response to any of the developer complaints. Why should this be any different?

I have been a Windows Mobile developer since Pocket PC 2000 (look it up on my site), and I think it's a great operating system, but I think the Windows Mobile team does the worst job of any Microsoft team that I've dealt with in dealing with and addressing user feedback.
# January 4, 2006 12:38 PM

Cesar Fong said:

Since this bug affect VB.NET too, the solution also works in vb.net

myphone.Talk("+51739787799\0", True)
# January 5, 2006 11:22 PM

windowsmobile said:

Shane, we did block comments on the thread you pointed to, but we shouldn't have. We're sorry and it won't happen again.

Mike Calligaro
# January 6, 2006 12:33 PM

p.janowski said:

Error 1 The type or namespace name 'WindowsMobile' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) C:\Documents and Settings\...\Visual Studio 2005\Projects\DeviceApplication7\DeviceApplication7\Form1.cs 8 17 DeviceApplication7

---

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Microsoft.WindowsMobile.Telephony;

namespace DeviceApplication7
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void button1_Click(object sender, EventArgs e)
{
Phone myPhone = new Microsoft.WindowsMobile.Telephony.Phone();

myPhone.Talk("555-0100\0");

}
}
}
# January 18, 2006 4:41 AM

AK said:

Well, this is interesting, yet the real silver bullet would be if one could click on a phone number in IE in Windows Mobile and let the phone automatically dial this number.

Or is this already implemented and just needs activation?
# February 9, 2006 12:18 PM

Ian Blackburn's Weblog said:

# February 15, 2006 6:41 AM

Ian Blackburn's Weblog said:

# February 15, 2006 6:44 AM

Luis Cabrera said:

For p.janowski:

Right click on your project and add a Microsoft.WindowsMobile.Telephony reference to your mobile application. To see it as one of the references, your application should be a Windows Mobile 5.0 .Net CF application.

Good luck.
# February 15, 2006 5:25 PM

Miguel said:

How can i determine if the phone is currently muted using the Telephony namespace?
# May 13, 2006 9:38 PM

Luis Cabrera said:

Unfortunately you cannot do using the Telephony, but you can do it easily using Microsoft.WindowsMobile.Status:

There is a System State called PhoneRingerOff, and it gets a value indicating whether the phone's ringer is off (i.e., if it rings and/or vibrates).

i.e.

if (SystemSate.PhoneRingerOff)
{
 // do whatever
}

For a list of system states you can access take a look at  
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/mobilesdk5/html/T_Microsoft_WindowsMobile_Status_SystemState_Members.asp


Hope this helps!
-Luis E. Cabrera

# May 18, 2006 6:08 PM

Luis Cabrera said:

Unfortunately you cannot do using the Telephony, but you can do it easily using Microsoft.WindowsMobile.Status:

There is a System State called PhoneRingerOff, and it gets a value indicating whether the phone's ringer is off (i.e., if it rings and/or vibrates).

i.e.

if (SystemSate.PhoneRingerOff)
{
 // do whatever
}

For a list of system states you can access take a look at  
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/mobilesdk5/html/T_Microsoft_WindowsMobile_Status_SystemState_Members.asp


Hope this helps!
-Luis E. Cabrera

# May 18, 2006 6:48 PM

Chris Angus said:

Hi Luis,

I wonder if you can help me with my phone volume problem?  I have an O2 Atom and the ear piece volume is way too low even when turned fully up.  Everyone comlains about it and we have reported it to O2 but 3 ROM revisions later and its still the same.  Is there a registry hack that i can use to increase the maximum volume level of the ear piece?

Many thanx if you can spare the time to help me.

Regards Chris
# May 18, 2006 9:55 PM

Keith Burgoyne said:

Given the comments about testing, I'd like to atleast make the positive comment congratulating the Microsoft team on standing up and actually posting blog entries about the bugs.  The entire software industry has a long history of simply not acknowledging bugs until the fix has been released -- and in some cases, not even then.

I would like to point out that while it certainly would have been preferable to not have the bug at all (which I'm sure the Microsoft team would have also preferred), this blog entry, and others, have saved me countless hours "guessing" whether I was doing something wrong or whether there really was a bug.

The added information providing a recommended workaround also helps to avoid making my own workaround hack that perhaps Microsoft wouldn't not have anticipated and might have potentially broken in the future.

Thanks for providing this information, Luis.

-- Keith

# March 20, 2007 5:03 PM

Olgunka-cv said:

<a href= http://index2.arests.biz >stephanie michaud navy dental assistatnt</a> <a href= http://index1.arests.biz >sissy wears stockings lingerie masturbates</a> <a href= http://index3.arests.biz >adult videoes</a> <a href= http://index4.arests.biz >campgrounds in morris illinois area</a>

# April 17, 2008 2:07 PM

Olgunka-cv said:

<a href= http://index2.arests.biz >stephanie michaud navy dental assistatnt</a> <a href= http://index1.arests.biz >sissy wears stockings lingerie masturbates</a> <a href= http://index3.arests.biz >adult videoes</a> <a href= http://index4.arests.biz >campgrounds in morris illinois area</a>

# April 17, 2008 2:07 PM

leon anderson said:

I am wondering if anyone can point me to a great place

for learning about auto dialing, as I am trying to save myself a lot of trouble, when I dial a number from speed dial, it usually means I am trying to avoid typing, I may have to enter some more numbers after the line connects, is there a way of dialing those numbers through the framework in order to not dial them on the pad, however I cant assign this to a speed dial, as it pops open another call separate from the first one placed

# June 13, 2008 11:50 AM
Leave a Comment

(required) 

(required) 

(optional)

(required) 

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Page view tracker