WM (6.5) - Send SMS AND copy them into the "sent messages" folder - Windows Mobile Software Development

Hello,
I'm developing an application for windows mobile 6.5. Im writing the code in c#.net and want to send sms due to my app.
I checked out the POOM and sms sending worked fine.
Code:
SmsMessage msg = new SmsMessage();
msg.To.Add(receiver);
msg.Body = messageText;
msg.Send();
But there's one problem. I want that the messages will be saved/copied to the "send messages" folder, after my program has sent them.
How can I realize that. Is it possible with the POOM, oder should I work with MAPI and generate a converted copy of the msg-Object in the "send messages"-folder?
greets,
raffi
p.s.: Please excuse my english. I'm a german pupil and I knwo that my english isn't the best. So if you got in trouble, while reading my post, ask me and I'll try to explain the problematic part in another way...

I dont know how to implement the code, but I believe that it involves the SmsAccount class and the Folder class. I have seen examples online showing something like :
Code:
SmsAccount x;
Folder outbox;
outbox = x.outbox;
or something of the likes, but I cannot produce that code when making my own program without getting errors about undefined properties, etc. THe MSDN site is pretty useless on this topic too. It seems as tho the Microsoft.WindowsMobile class and its subclasses are under-documented...

Related

make call

i want to make a call from my application, please help
PS: i am using .net cf
thanx
Use "phoneMakeCall "function
Find "phoneMakeCall" function infomation in MSDN library.
I was unable to find that function in the MSDN library. I found more, but they were .NET functions.
I am interested in the same functionality as the tel: protocol. Does anyone know what the parameter is that I can send to cprog.exe so it knows what number I want to dial (if it's possible). And if there is a way to make the phone automatically dial that number would be great.
The tel: protocol is really kind of weak for applications outside of IE. Having to launch a blank window is a horrible user experience.
Thanks in advance,
-- Mike
Hi there
Try this link:
http://smartdevices.microsoftdev.com/Learn/Articles/622.aspx
Discribed is a away to use the TAPI through p/Invoke.
It was a bit of hard work, but after only 1/2 a Day i made my first phonecall to a telephonenumber, stored in my App's database.
Generally i found out, that http://smartdevices.microsoftdev.com is a good starting point for searching information (and of course this forum ;-))
Hi
Thx for the link, It helped me a lot. I didn't get the VB.NET part of the sample code (Downloaded) to work when I was calling a phone number. It seems that the phone is not converted correctly. The SMS part of the VB sample works ok although.
The CS sample work OK, I could make a phone call in minuts, using the sample code.
So if I can't find the reason for the error in the VB sample, I must stick to the CS code.
Klaus E. Frederiksen, Denmark
PhoneMakeCall
This function dials the specified phone number.
LONG PhoneMakeCall(
PHONEMAKECALLINFO *ppmci);
Parameters
ppmci
Pointer to the PHONEMAKECALLINFO structure that contains the information related to the call to be placed.
Return Values
Value Description
Non-zero The function was not successful.
Zero The function was successful.
Remarks
This function must be called in order to initiate a phone call.
Guest said:
I was unable to find that function in the MSDN library. I found more, but they were .NET functions.
I am interested in the same functionality as the tel: protocol. Does anyone know what the parameter is that I can send to cprog.exe so it knows what number I want to dial (if it's possible). And if there is a way to make the phone automatically dial that number would be great.
The tel: protocol is really kind of weak for applications outside of IE. Having to launch a blank window is a horrible user experience.
Thanks in advance,
-- Mike
Click to expand...
Click to collapse
Details for .Net developers:
The PhoneMakeCall function is not the tricky part of this.
For .net newcomers it's P/Invoke that makes this a little more difficult,
than just using a dll.
1. You have to create a Class (for Example: Phone) that hold the functionality. Because we are using P/Invoke, don't forget using System.Runtime.InteropServices!
2. In your new created Phone Class declare 2 statics, that help us with the option of Prompting before making a call, one of them will fill the dwFlags part of our Infostructure:
private static long PMCF_DEFAULT = 0x00000001;
private static long PMCF_PROMPTBEFORECALLING = 0x00000002;
3. Now to define the allready by yrj mentioned PhoneMakeCallInfo structure. it should look like this:
private struct PhoneMakeCallInfo
{
public IntPtr cbSize;//size of struct
public IntPtr dwFlags;//prompt or not
public IntPtr pszDestAddress;//pointer to CharArray with
//Phone number
public IntPtr pszAppName;//nothing
public IntPtr pszCalledParty;//nothing
public IntPtr pszComment;//nothing
}
4. The import of the Phone.dll function should be no problem:
[DllImport("phone.dll")]
private static extern IntPtr PhoneMakeCall(ref PhoneMakeCallInfo ppmci);
5. Now you have to create a fucntion that instantiates a PhoneMakeCall infoStructure and call the newly Invoked PhoneMakeCall-function.
Now, have fun!

Is there small unofficial API (or SDK) for PPC2002 ?

Hello there,
as you know, MS PPC SDK is too big for dial up user like me
So, I'm looking for small unofficial API so I can download it and develop for it
I don't need a big API, jus API lets me add textbox and button
If there is no such API like this, please I need some developer to develop small application. I'll tell him details (Its sooo small app)
Regards
For simple apps, it's quite easy to knock them up in HTML and javascript. Also the PPC platform contains an ASP web server, for more complex apps that need file access etc. It also means that you can build/tweak them on the go directly on the device.
Wow, thats would be great to develop in ASP,HTML and Javascript. especilally in ASP which has good functionality
but this would be in IE, or it will be ran as independent program ?
Pardon my english
Yeah, unfortunately it'd all run under pocket internet explorer.
There's a plethoa of other freebie/cheap languages out there
PocketC; NSBasic; CEBasic; PocketPCPython; Waba; PocketScheme; J; etc; but at the end of the day it's worth getting the MS dev tools as they're what everybody uses.
Don't MS offer a CD of it for a nominal charge .. aha eVT3 $7.85 from https://microsoft.order-5.com/trial...oper+Tools&product_id=X09-17298&cookie_test=1
What exactly is it you're trying to build and on what platform?
Thanks very much for the link
I'll buy it now, its really cheap
I want to develop a program for PPC2002 PE, Windows2003Mobile to handle SMS better than inbox program
I found good program for developing palm os,symbian and ppc applications using VB6. the program is MobileVB and it is not too big to download
Regards
Handling SMS - a word of caution, the XDAI doesn't have a decent way of handling SMS receiving - you either need to pick it up from the inbox, or replace the entire existing SMS handing application with your own app - and that's a lot of code - not just messages, but also receipts, QOS, WAP push etc.
MobileVB is quite nice, but it's rather expensive for the casual developer.
Hello there
Thanks for answering
I bought eVT and waiting for it
I tried MobileVB but it doesn't worth that money so I didn't buy it
Actually , my idea was to get the messages from sms inbox and show it to be compaitable with nokia screen in addition to to view MMS better and Biz Cards correctly
If you have any helpfull informations I'll be glad to hear from you
Regards

Send SMS Text Message

Hi Everyone,
I'm making a WinMo app that will help all those affected by Alzheimer's Disease, as well as its related illnesses. More information is at
JamesGeddes.com/TrackNan
It sends an SMS text to 1 or more mobile numbers when the patient goes outside of the GPS boundary, the only trouble is I can't work out how to get it to send SMS Text messages!
Any help would be fantastic as it will help this most worthy cause - I'll even come and buy you a drink if I can!
Thanks everyone!
James
Hey,
Is this program going to be run on Windows Mobile based phones / PPC or on a Personal Computer?
If it is on a phone, your choices are:
Using .NET CF:
Obtain GPS data (if a class is provided, i am not sure) and based on that data create an OutlookSession and Send a SMS with Microsoft.WindowsMobile.PocketOutlook
P\Invoke a C++ Method (http://msdn.microsoft.com/en-us/library/aa920513.aspx)
Using C++:
Use the methods i just mentioned before, except in a true C++ environment.
Otherwise, I have developed an application called CMail which will send SMS for you when it is run (Check my Signature for some of my projects) All you would need is a way to gather the GPS Data.
If it is on a PC:
I would reccomend looking up pre-set servers that send out SMS and make an app to link to those (just google and you will find ) ...
or you can send 'Email SMS' to phones.... IE: my number is 111-222-3333 and i use Tmobile...so you would email it to [email protected] (or .net? I cant remember)... THe list of these emails IS online
I hope this helps! (I think you are making a program for a great cause!)
Good Luck!
Hi,
I'll be running it on my HTC HD2, so on a Windows Mobile Phone. I'm working in C# and Microsoft have been unusually kind and given GPS code away with the WinMo6 SKD, so thats all good, however I just can't work out how to send a text!
Thanks!
James
It is really easy actually!
Just add a reference to your project for Microsoft.WindowsMobile.PocketOutlook. Then use the following:
Code:
SmsMessage x = new SmsMessage(RECIPIENT NUMBER, BODY);
x.send();
And that should do it!!
Hope this helps
I've use the following code
Code:
private void btn_send_Click(object sender, EventArgs e)
{
SmsMessage x = new SmsMessage(tb_Number, tb_Message);
x.send();
}[code]
However it returns
"The type or namespace name 'SmsMessage' could not be found (are you missing a using directive or an assembly reference?)"
What's going wrong?
OK, I got that working, I just forgot to put this at the top!
Code:
using Microsoft.WindowsMobile.PocketOutlook;
How do you send to multiple numbers though? I've asked the user to give me 3 mobile numbers in coma separated format, does that help?
well you can do a foreach loop
...
SO the user gives you 3 numbers :
123-456-7890
098-765-4321
132-465-7980
Store those to a String[]
Code:
string[] numbs = {1234567890, 09876543210, 1324657980};
foreach (string numb in numbs)
{
SmsMessage x = new SmsMessage(numb, BODY);
x.send();
}
That should do it. I had a few issues when i tried this with my program that i am upgrading ... It may give u a ArgumentException Invalid Address, but it still sends the SMS. To get rid of this just do the following:
Code:
string[] numbs = {1234567890, 09876543210, 1324657980};
try
{
foreach (string numb in numbs)
{
SmsMessage x = new SmsMessage(numb, BODY);
x.send();
}
}
catch {}
I found that sending an SMS took a little while - not too long, maybe about a second or something; but if you're sending to lots of people, the application may stop for a while.
I thought it would be better to use the "for each" idea Cyclonezephyrxz7 mentioned, and put it in a separate thread. I had alsorts of fun with it, but I found the answer.
I wrote something about it here:
http://forum.xda-developers.com/showthread.php?t=630537
I can post the code if you like (I've not got it here), but I wrote it in VB - it should be an easy port.
What this does is to allow your app to continue, while in the background the SMSs get sent - then the code raises an event when done.
Let me know, ok?
Paul.

[Search] Learning program (vocabulary) for WM (fingerfriendly)

Hi there,
I am so deeply searching a vocabulary trainer which is more or less fingerfriendly for my Touch HD.
It is unbelievable that there is no program like that available and I just need such a simple one:
I want to add "units", which store the vocabulary in German the foreign language. Then the program randomly chooses one of the words and shows the German translation and I, in my mind, think what it would be, and then I click "right" or "wrong" and go onto the next word. I don't even need a text insertion which must be compared...
Does anybody of you know such a program? Not finding this is for me now a reason to switch to Android, because in the market, they have such programs (vocablo). I would of course pay for it.
Thanks a lot!
I would love to program a thing like that. It would even be pretty easy (as far as i see it). The real problem however is creating the database for it.
I have bought the Japanese Trainer from SPB(?) of the store which isn't really great but it is okay-ish. One can even add a lot of words, although they probably didn't plan it that way, but one can simply add new folders and copy images and sound files into them to expand the library. However, if i knew Japanese well enough to create an extended database i would not need the app ... so the real problem in an app like this is always the database..
If you like you can give me an Excel-file with a hand full of words and i can set up a sample app. Unfortunately i will be away from the pc next week, but in the week after that i could give it a try...
please include at least:
Foreign Word, Native Word, Usage example, word class (I think one could then have a nice multiple choice mode, too)
Well, just checked SPBs app, but I would want a much easier program, no need for pictures, etc.
Frankly spoken, I tried to code it myself, but have the same problem with how to save the words. I thought of using a simple textfile, saving the words like that:
mothertongue#foreign language#box
Example:
Haus#house#1
Sommer#summer#3
Österreich#Austria#2
The box is the number of 5 boxes and the program needs to ask all words in the boxes 1 to 4. If I know the word, the number of the box is incremented as long as it is smaller than 5, if I don't know the word the number is decremented.
What is important to me, is that I can add new textfiles, which I then can edit, in order to add or delete words from that file.
Any other ideas?
I would also use a csv file:
word;translation;whatever
you could then easily manage your vocabulary list in excel and save it directly as csv again...
excelent program
Hello
Do you know Leitner system? Flash cards?
Read these two first!
http://en.wikipedia.org/wiki/Leitner_system
http://en.wikipedia.org/wiki/Flashcard
Then download this Iranian software... { it is in English }
http://soheil86.50webs.com/Leitner Box/Leitner-Box.html
It is working based on Leitner system...
I have memorized 7k English word with it... Including GRE
Word list..... It is a very very great software
Let me know if you need any help!
Have a nice day
Thanks for the link.
But tell me, can I add units and new words in the program?
I need the program to add words when I am at university.
Did you open the link?
Pay attention to the note at the bottom of the page:
3. You can create data base with leitner box in your device, but if you like to create faster with PC, download data base editor.by editor you can convert your excel files to leitner box data base, and also you can exchange your target and source languages.
4. If you want to import data from excel data sheets, and you dont have excel 2007 installed in your system, download and install this file, first.
http://www.microsoft.com/downloads/...36-8C28-4598-9B72-EF94E038C891&displaylang=en
Tell me if you need help... I have a program to create database....
but I think you can find everything in that link...
Please update the keywords in this thread and add :Leitner box , flash card
Thank you in advanced

Lack of Area Code notation removes contact detection on WinMo 6.5

Hello
Earlier today I upgraded to Windows Mobile 6.5.
Since none of my number are in 61+ notation [Country Code], there is not contact recognition, and I have to manually assign each person who's called me to there corresponding number.
How do I automate this process, i.e.; do I change something in the registry, or is their a tool to prepend 61+ to each stored number?
Please tell me how I can get contact detection to work accurately.
Thanks in advance,
Chip D. Panarchy
Found whilst searching the archives, I was certain I'd seen it somewhere before, serendipitously twas from a page which I'd replied to! =]
chotoomotoo said:
Use TrineFix to add +61 to all your contacts..its available here..
http://gydarindustries.com/?page_id=4
Click to expand...
Click to collapse
I had to go individually through all my contacts and assign the "+1" (for USA) to them. Yeah, it's aggrevating. But I didn't know of the above!
!!!
Too bad I couldn't of been of help earlier, manually changing them all must've sucked...!

Categories

Resources