Notices


Reply
Thread Tools
Posts: 94 | Thanked: 28 times | Joined on Oct 2009
#81
I started working on an adapted version which parses the XML files produced by gammu/wammu.

It seems to work fine, though I need to fine-tune date handling.

But I have a question. At the moment it seems that conversations are ordered by id (in el.db) and not by received (or sent) time so all the imported sms will be added *after* previously received sms. Do you know a way to change that? (except wiping the el.db, import sms and then add back the events).

Thanks for your code, btw!
 
Posts: 94 | Thanked: 28 times | Joined on Oct 2009
#82
Oh, and another problem is that it seems I can't erase those imported sms.
 
Posts: 28 | Thanked: 0 times | Joined on Dec 2009
#83
Originally Posted by niklas87 View Post
anyone?
I should pay more attention while reading...

- Added updated version of smsimporter. This version should automatically detect delimiter.
So it should work if i change the delimiter in the regional settings in windows. I'm going to try it...
 
Posts: 94 | Thanked: 28 times | Joined on Oct 2009
#84
Originally Posted by corsac View Post
I started working on an adapted version which parses the XML files produced by gammu/wammu.

It seems to work fine, though I need to fine-tune date handling.

But I have a question. At the moment it seems that conversations are ordered by id (in el.db) and not by received (or sent) time so all the imported sms will be added *after* previously received sms. Do you know a way to change that? (except wiping the el.db, import sms and then add back the events).

Thanks for your code, btw!
Hmh ok in fact it might be related to the “storage_time” indeed. Your code (and mine) sets the storage_time to the same time as the {start,end}_time but it's ignored by rtcom. But it might be possible to fix that later using a sqlite3.
 
Posts: 94 | Thanked: 28 times | Joined on Oct 2009
#85
Originally Posted by corsac View Post
Hmh ok in fact it might be related to the “storage_time” indeed. Your code (and mine) sets the storage_time to the same time as the {start,end}_time but it's ignored by rtcom. But it might be possible to fix that later using a sqlite3.
No, I tried to update the storage_time to be the same one as the start_time and it's still displayed in the end.

I've reported https://bugs.maemo.org/show_bug.cgi?id=7512 so maybe we'll have more informations about this.

I still don't get why I can't select the sms (to be able to delete it). Any idea?
 
Posts: 121 | Thanked: 75 times | Joined on Oct 2009
#86
Originally Posted by corsac View Post
Oh, and another problem is that it seems I can't erase those imported sms.
I think this might be related to the fact that when importing a "message-token" isn't added. This will probably also stop you from opening each message individually to forward them etc.

Here's some code that the devs for this can add to add a guid "message-token"

Code:
gint id = rtcom_el_add_event (el, ev, NULL);

if(id > 0)
{
	uuid_t uuid;
	char key[UUID_STR_LEN + 1];
	uuid_generate_random (uuid);
	uuid_unparse(uuid, key);

	gint header_id = rtcom_el_add_header(el, id, "message-token", key, NULL);
	if(header_id == -1)
		g_debug("header insertion failed");
}
UUID_STR_LEN is 36 and you need to include <uuid/uuid.h>

Last edited by matrim; 2009-12-30 at 22:24.
 
Posts: 94 | Thanked: 28 times | Joined on Oct 2009
#87
Yep, thanks. With that code I can now select the sms, and copy/forward/delete it.

I know just need to be able to reorder them and I'll be able to import for good all my previous sms.
 
Posts: 121 | Thanked: 75 times | Joined on Oct 2009
#88
Originally Posted by corsac View Post
Yep, thanks. With that code I can now select the sms, and copy/forward/delete it.

I know just need to be able to reorder them and I'll be able to import for good all my previous sms.
No problem. I "stole" some of the sms importer code (contact choosing) for my app so I should give back too

I can't really help with the reorder as I don't need that so haven't tried anything around it.
 
Posts: 94 | Thanked: 28 times | Joined on Oct 2009
#89
Yup, might make sense to standardize on a single app for SMS import (at least my code and rmoravcik's), though the ordering really needs to be solved for that (I don't think it's really a good idea to force user to import SMS as the *first* thing to do, especially since there are already quite some n900 already used).
 
Posts: 28 | Thanked: 0 times | Joined on Dec 2009
#90
Changing the delimiter to | was very useful and should be done by everyone before exporting the messages to csv (or something else if you have messages with | in it).

Has anyone compiled the smsimporter with the message-token code snippet yet?
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 21:36.