| Reply | « Previous Thread | Next Thread » |
|
programatically from a MIDlet ?
This is like creating something like a receipt from a MIDlet dynamically. Is this possible? if yes, any leads/clues on how todo this? thanks . |
|
yes you can create business cards. Use fileoutputstream and create a file with a .vcf extension.
Check out this link to see how to write a bussiness card. http://affix.sourceforge.net/howto.shtml Hope this helps |
| thefrozenrose |
| View Public Profile |
| Find all posts by thefrozenrose |
|
Quote:
|
|
If you create a .vcf file that contains the data of a business card then you can send it via bluetooth by opening an input stream and reading the file and send it byte by byte over an outputstream that is opened to the other device.
First you need to discover the device, then discover the services and find the OBEX push service. Then send the file over that profile. As for the SMS, I think you need a special program to encode the vcard so that it can be sent over SMS. Hope this helps |
| thefrozenrose |
| View Public Profile |
| Find all posts by thefrozenrose |
|
Quote:
Now, doing this programmatically is what i need. :-) |
|
OK. First of all you need to write the business card e.g.
textResponse = "BEGIN:VCARD\r\nVERSION:2.1\r\nN"; if (unicodeFlag) { textResponse += ";CHARSET=UTF-8"; } textResponse += ":"; textResponse += document.forms[0].vCardName.value; textResponse += "\r\nTEL;PREF:"; textResponse += document.forms[0].vCardPhone.value; textResponse += "\r\nEND:VCARD\r\n"; Then for each character, get is decimal value and then convert it to hexedecimal. for (var i = 0; (!error && (i < textResponse.length)); i++) { var tempStr = decToHexUTF8(textResponse.charCodeAt(i)); hexText = hexText + tempStr; } After you have completed this process, put all the hexedecimal values in an SMS and send it over. The code above is taken from the program NowSMS from the file Send WAP vCard.htm www.nowsms.com Good luck |
| thefrozenrose |
| View Public Profile |
| Find all posts by thefrozenrose |
|
noice man! noice!!
Thanks i will get on this and get back to you on it. **thumbsup** |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| Easy way to create preinstall application (PA from SA) | Leanid | Symbian Tools & SDKs | 4 | 2008-07-14 10:00 |
| Internal Mifare card 6131 | tdelazzari | Near Field Communication | 4 | 2007-08-23 16:24 |
| Card not inserted windows CE 3.0 | koenjo | Multimodecards | 2 | 2004-02-10 08:30 |
| Compact Business Card format | ivoatnokia | Smart Messaging | 1 | 2002-05-14 09:09 |
| Business Card and Calendar specification | nkn_knockia | Smart Messaging | 1 | 2001-11-08 16:36 |