Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

sending sms from pda using jni

 
Shreya mathew
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have got a code in C# to send sms from windows mobile device(pda) from this link: http://phvu.wordpress.com/2009/01/15/sending-sms-message-in-windows-ce/

I have converted the C# code into a dll...
Now I want to access the dll from a java application(which is done using IBM weme j9 ).
I need help on 'how to call a C# smart device dll from java'....
Anyone having done this please help asap..

The C# code is given below:



Thanks in advance..
 
Tim Holloway
Saloon Keeper
Posts: 18367
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the JavaRanch, Shreya,

There's a button on the message editor that you can use to make code easier to read. I've used it on your sample.

Normally you'd want to use a Java API to send SMS, but if you're running J9, I suspect that the phone is running Windows Mobile, and J9 doesn't include hardware-specific features.

Suspect? no, what other OS would have DLLs.

You need to look at the JNI docs for JME and make some glue code - a JNI class that invokes the functions in the DLL.
 
Shreya mathew
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes,the pda is using Windows Mobile OS.
Will somebody help me in writing the jni class for invoking the method 'SendSMS(string recipient, string sContent)' in the above code?
Its very urgent...
Thanks in advance..
 
Tim Holloway
Saloon Keeper
Posts: 18367
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We're here to help, but We need you to help too.
Because We are not a Code Mill.
We don't generally respond to private questions for reasons explained here.
Also, Be Patient.

There should be some samples on how to code for JME JNI on the Sun/Oracle JME website. I'm afraid I don't have any at the moment, myself.


 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic