| Reply | « Previous Thread | Next Thread » |
|
Hello,
If want to read the content of an message. Code:
import inbox box=inbox.Inbox(inbox.ESent) messages=box.sms_messages() print box.content(1051660) Is there a way to display messages, which are longer than 263 chars? |
| Lukas Hetzenecker |
| View Public Profile |
| Find all posts by Lukas Hetzenecker |
|
Hello Lukas Hetzenecker
Well Yeah there is a solution to this problem. You can find the code at http://croozeus.googlepages.com/phase3 Hope it helps, |
|
I've got the same problem - the message get cut after ~256 characters.
I use: Code:
i = inbox.Inbox() mes = i.sms_messages() # all message ID's for m in mes: sms_text=i.content(m) req.write(sms_text) What I do wrong? I search http://croozeus.googlepages.com/phase3 and found nothing different from my code. |
|
Quote:
![]() That link was meant to read contents of the inbox.That wont help you. Have you tried to exploit the ctypes module? I think that may help you here.Try storing the text of a SMS (Longer then 263 characters in a long string or something like that.You can find other datatypes here http://docs.python.org/lib/node454.html Hope that Helps Regards |
|
Quote:
I tried import ctypes but it's not a module of python for s60. What's more - when I try sms_len=len(i.content(m)) it also shows no more than 256. So it's something wrong with inbox module I guess.. |
|
Quote:
Yes i came to know that ctypes wasnt available in S60 when i tried my code on the device.Also referred to jplauril's comments in a post Quote:
So unfortunately we have to find an other alternative to your problem ![]() |
|
I looked into PyS60 source and in ext/inbox/inboxadapter.cpp is a function GetMessageL and there are these lines:
Code:
// Check length because message is read to limited size TBuf
if (length >= KMessageBodySize)
{
message.Append(richText->Read(0, KMessageBodySize -1));
}
else
{
message.Append(richText->Read(0, length));
}
I think that this is the problem, but I don't know why the size of const on my python i 256.I also don't know why it's 512, it's only about 3 smses which is not so many.. |
|
Perhaps it *is* 512 and the data read there is unicode?
|
|
Quote:
|
|
You can do with the following installed (on windows):
- activeperl (from www.activestate.com) - python (from www.python.org) - S60 3rd Edition SDK for Symbian OS, Maintenance Release - Sensor API Plugin for S60 3rd Ed. SDK for Symbian OS - Extensions Plugin for 3rd Ed. SDK for Symbian OS - CSL ARM Toolchain (arm-symbianelf) 2005-Q1C (bundled with S60 3rd Ed. SDK) And finally you'll have to find some tool compatible with standard 'patch' to apply some diffs to the S60 include files needed to compile PyS60. Seems to exist for windows too but i've used a nearby BSD box for that :-/ With the above installed it gets as easy as - cd to PyS60 source directory - python setup.py configure <your config preferences given here> - python setup.py build_device - python setup.py bdist_sis SIGN_CERT=xxx.cer SIGN_KEY=xxx.key SIGN_PASS=whatever You may want to create a batchfile to specify your options to the configure command. If you want to create a package with the same uids as the nokia signed sis files, you need the following there (white space added for readability) PYS60_UID_S60=0x2000b1a0 PYS60_UID_CORE=0x2000b1a1 PYS60_UID_APPMGR=0x2000b1a2 PYS60_UID_RECOG=0x2000b1a3 PYS60_UID_APPMGR_WRAPPER=0x2000b1a4 PYS60_UID_SCRIPTSHELL=0x2000b1a5 PYS60_UID_LAUNCHER=0x2000b1a6 PYS60_UID_PYREPL=0x2000b1a9 Best regards, Niels Oh yes there were two other do's: - use the good old SUBST dos command to map a driveletter to the dir where the S60 SDK gets installed (that is, the one containing the EPOC directory) - set EPOCROOT=\ - cd to your subst'ed drive to do the build :-)
Last edited by nlsp : 2007-11-01 at 22:09.
Reason: added notes about SUBST and EPOCROOT
|
|
Thanks a lot. I've done all that stuff with compiling, patching, signing etc. and I faced with another problem - I'd selfsigned the file, installed it and then when I opened mymobileserver it couldn't load the module mod_python.
Do you think that when I signed the file with certificate and give the ID's that you wrote the python compiled by me will be a 100% substitute for Nokia's Python? Integration with mymobileserver is very importat for me but I also want to have an ability of fetching long text messages.. |
|
That's a tricky one. I didn't do anything with mobile webserver, so can only guess. General rule for capabilities on a dll is they should have the union of all capabilities assigned to all executables that load them. Some post mentioned the officially nokia signed python has more capabilites than a devcert is able to sign (i didn't check that). I guess mod_python depends on the python_222.dll and is loaded by the webserver executable, so if the error is -46 i would check capabilities down that chain.
Did you sign with a self-signed cert or with a devcert from symbiansigned? |
|
Update:
Quote:
Capabilities 0xff7be (ALL-TCB-DRM-AllFiles) In my devcert-signed GCCE compiled package: Capabilities 0xff1b4 (ALL-TCB-CommDD-MultimediaDD-DRM-DiskAdmin-NetworkControl-AllFiles) |
|
Quote:
So the solution is use nokia's python with cutted messages or self-compiled python without mobile webserver.. |
|
Or compile mobile webserver with a self-compiled python package?
|
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Rate This Thread | |
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| Audio Input Stream on N80 | tkaihock | Symbian Media (Graphics & Sounds) | 9 | 2006-06-30 10:15 |
| Has Nokia broken 7650 J2ME in v4.39? | LongSteve | Mobile Java General | 6 | 2003-06-03 18:05 |
| 7650 Bluetooth Modem with Toshiba Tecra 9000 Windows XP - RESOLVED Now! | d0lph1n | Bluetooth Technology | 5 | 2003-02-07 12:25 |
| Incorrect order parts of MMS (if parts qnty > 5) | marianwitkowski | General Messaging | 1 | 2002-08-29 05:36 |
| 7650 and MS Bluetooth Transceiver | damnedi | Bluetooth Technology | 1 | 1970-01-01 02:00 |