no way to compare when less than two revisions

Differences

This shows you the differences between two versions of the page.


sdk:scripts:sms-read-inbox [2015/05/05 15:04] (current) – created - external edit 127.0.0.1
Line 1: Line 1:
 +====== SDK Script sms-read-inbox.are ======
 +<code c sms-read-inbox.are>
 +/* DESC: This script can be used to read the SMS inbox.
 + * Copyright (C) 2012 NetModule AG, Switzerland
 + */
 +
 +msgs = nb_sms_list();
 +
 +printf("there are %d messages in your SMS inbox\n", (int)msgs);
 +
 +for (i=0; i<(int)msgs; i++) {
 +    msg = nb_sms_retrieve(msgs[i]);
 +    if (!msg) continue;
 +
 +    printf("message %d (ID %s, length %d):\n%s\n\n", i, msgs[i], strlen(msg), msg);
 +
 +    ret = nb_sms_delete(msgs[i]);
 +    if (ret == 0) printf("deleted message %d\n", i);
 +}
 +
 +exit(0);
 +
 +</code>