ISMSSTORAGE_ReadMsg | developer.brewmp.com ISMSSTORAGE_ReadMsg | developer.brewmp.com

Developer

ISMSSTORAGE_ReadMsg

Forums:

I am trying to read the SMS from inbox.

I get the staus of inbox using GetStorageStatus().
but unable to read SMS from inbox using

ISMSSTORAGE_ReadMsg(pMe->pISMSStorage, AEESMS_NV_CDMA, pMe->nIndex, &pMe->cb, &pMe->pISMSMsg, &pMe->nErr);

pMe->pISMSMsg returns null..

can anybody help me...

Hii u got any solution? Even i'm facing the same prob..

Hii u got any solution? Even i'm facing the same prob..

same here
ISMSSTORAGE_EnumNextMsg never returns me anything useful

same here
ISMSSTORAGE_EnumNextMsg never returns me anything useful

Hii,
I'm working on a small app where we need to invoke native inbox sms to my application.. But in ISMSSTORAGE_ReadMsg i'm facing a problem.. Please find the code snippet.
boolean PopulateInboxSMS(smsapp *pMe)
{
uint32 pnErr = 0;
if(!pMe)
return FALSE;
if(!pMe->pISMSStorage)
ISHELL_CreateInstance(pMe->pIShell, AEECLSID_SMSSTORAGE, (void**) & pMe->pISMSStorage);
if(pMe->pISMSStorage)
{
CALLBACK_Init(&pMe->m_SMSStorageInitCallback, (PFNNOTIFY) EnumMsgInitResult, pMe);
ISMSSTORAGE_EnumMsgInit(pMe->pISMSStorage, AEESMS_NV_CDMA, AEESMS_TAG_NONE, &pMe->m_SMSStorageInitCallback, &pMe->pSmsEnumInitErr);
}
return TRUE;
}
void EnumMsgInitResult(smsapp *pMe)
{
if(!pMe)
return;
/*if(pMe->m_SMSStorageInitCallback.pfnCancel)
{
CALLBACK_Cancel(&pMe->m_SMSStorageInitCallback);
pMe->m_SMSStorageInitCallback.pfnCancel = NULL;
}*/
if(pMe->pSmsEnumInitErr == SUCCESS)
{
CALLBACK_Init(&pMe->m_SMSInitResult, (PFNNOTIFY) ReadInboxSMS, pMe);
ISMSSTORAGE_EnumNextMsg(pMe->pISMSStorage, AEESMS_NV_CDMA, &pMe->m_SMSInitResult, &pMe->PSmsEnumNextMsgIndex,&pMe->m_piSmsMsg, &pMe->pSmsInitResultErr);
}
}
void EnumMsgInitnextMsg(smsapp *pMe)
{
if(!pMe)
return;
/*if(pMe->m_SMSStorageInitCallback.pfnCancel)
{
CALLBACK_Cancel(&pMe->m_SMSStorageInitCallback);
pMe->m_SMSStorageInitCallback.pfnCancel = NULL;
}*/
if(pMe->pSmsInitResultErr == SUCCESS)
{
CALLBACK_Init(&pMe->m_SMSInitNextMsg, (PFNNOTIFY) ReadInboxSMS, pMe);
ISMSSTORAGE_ReadMsg(pMe->pISMSStorage, AEESMS_NV_CDMA, pMe->PSmsEnumNextMsgIndex, &pMe->m_SMSInitNextMsg, &pMe->m_piSmsMsg, &pMe->pSmsInitNextMsgErr);
}

Here in ISMSSTORAGE_ReadMsg i'm getting pMe->pSmsInitNextMsgErr value 1. Means it failed.. Dont know where i got the problem.. Please check the code and help. Also i got the pMe->PSmsEnumNextMsgIndex value as 4294967295. Dont know whether this index is the problem.
Thanks in advance
Jithen.

Hii,
I'm working on a small app where we need to invoke native inbox sms to my application.. But in ISMSSTORAGE_ReadMsg i'm facing a problem.. Please find the code snippet.
boolean PopulateInboxSMS(smsapp *pMe)
{
uint32 pnErr = 0;
if(!pMe)
return FALSE;
if(!pMe->pISMSStorage)
ISHELL_CreateInstance(pMe->pIShell, AEECLSID_SMSSTORAGE, (void**) & pMe->pISMSStorage);
if(pMe->pISMSStorage)
{
CALLBACK_Init(&pMe->m_SMSStorageInitCallback, (PFNNOTIFY) EnumMsgInitResult, pMe);
ISMSSTORAGE_EnumMsgInit(pMe->pISMSStorage, AEESMS_NV_CDMA, AEESMS_TAG_NONE, &pMe->m_SMSStorageInitCallback, &pMe->pSmsEnumInitErr);
}
return TRUE;
}
void EnumMsgInitResult(smsapp *pMe)
{
if(!pMe)
return;
/*if(pMe->m_SMSStorageInitCallback.pfnCancel)
{
CALLBACK_Cancel(&pMe->m_SMSStorageInitCallback);
pMe->m_SMSStorageInitCallback.pfnCancel = NULL;
}*/
if(pMe->pSmsEnumInitErr == SUCCESS)
{
CALLBACK_Init(&pMe->m_SMSInitResult, (PFNNOTIFY) ReadInboxSMS, pMe);
ISMSSTORAGE_EnumNextMsg(pMe->pISMSStorage, AEESMS_NV_CDMA, &pMe->m_SMSInitResult, &pMe->PSmsEnumNextMsgIndex,&pMe->m_piSmsMsg, &pMe->pSmsInitResultErr);
}
}
void EnumMsgInitnextMsg(smsapp *pMe)
{
if(!pMe)
return;
/*if(pMe->m_SMSStorageInitCallback.pfnCancel)
{
CALLBACK_Cancel(&pMe->m_SMSStorageInitCallback);
pMe->m_SMSStorageInitCallback.pfnCancel = NULL;
}*/
if(pMe->pSmsInitResultErr == SUCCESS)
{
CALLBACK_Init(&pMe->m_SMSInitNextMsg, (PFNNOTIFY) ReadInboxSMS, pMe);
ISMSSTORAGE_ReadMsg(pMe->pISMSStorage, AEESMS_NV_CDMA, pMe->PSmsEnumNextMsgIndex, &pMe->m_SMSInitNextMsg, &pMe->m_piSmsMsg, &pMe->pSmsInitNextMsgErr);
}

Here in ISMSSTORAGE_ReadMsg i'm getting pMe->pSmsInitNextMsgErr value 1. Means it failed.. Dont know where i got the problem.. Please check the code and help. Also i got the pMe->PSmsEnumNextMsgIndex value as 4294967295. Dont know whether this index is the problem.
Thanks in advance
Jithen.

help plz...

help plz...

cjiang;80813 wrote:same here
ISMSSTORAGE_EnumNextMsg never returns me anything useful
What the error you are getting.
Ensure that ISMSSTORAGE_EnumMsgInit() has been called before using ISMSSTORAGE_EnumNextMsg(...) !

cjiang;80813 wrote:same here
ISMSSTORAGE_EnumNextMsg never returns me anything useful
What the error you are getting.
Ensure that ISMSSTORAGE_EnumMsgInit() has been called before using ISMSSTORAGE_EnumNextMsg(...) !

here is what i did. it simply does not return me any index other than -1. help plz
http://brewforums.qualcomm.com/showthread.php?t=27659

here is what i did. it simply does not return me any index other than -1. help plz
http://brewforums.qualcomm.com/showthread.php?t=27659

Hi,
Message index value is return -1 or 0xffffffff if there is no item to return by calling ISMSSTORAGE_EnumNextMsg(...).
In your case index value is always -1 means used tag slots is zero for the AEESMSStorageType, AEESMS_NV_CDMA.
You can check the used tag slots by ISMSSTORAGE_GetStorageStatus(...).
Try with AEESMS_CARD_RUIM for AEESMSStorageType.

Hi,
Message index value is return -1 or 0xffffffff if there is no item to return by calling ISMSSTORAGE_EnumNextMsg(...).
In your case index value is always -1 means used tag slots is zero for the AEESMSStorageType, AEESMS_NV_CDMA.
You can check the used tag slots by ISMSSTORAGE_GetStorageStatus(...).
Try with AEESMS_CARD_RUIM for AEESMSStorageType.

I tried almost all the possible AEESMSStorageType including the 4 template
the only one that gives me some reasonable feedback is AEESMS_NV_CDMA.
here is the results for cdma
03/16/10 10:39:59.641343 get storage sts of tag 0
03/16/10 10:39:59.642137 storage type = 2
03/16/10 10:39:59.642381 getstorage sts = 0
03/16/10 10:39:59.642564 nMaxSlots = 99
03/16/10 10:39:59.642717 nFreeSlots = 99
03/16/10 10:39:59.642991 nUsedTagSlots = 0
here is the results for ruim
03/16/10 10:58:27.934043 get storage sts of tag 0
03/16/10 10:58:27.934897 storage type = 0
03/16/10 10:58:27.935142 getstorage sts = 0
03/16/10 10:58:27.935325 nMaxSlots = 0
03/16/10 10:58:27.935477 nFreeSlots = 0
03/16/10 10:58:27.935752 nUsedTagSlots = 0
and i am very sure the device has a lot of messages been saved in the inbox (read and unread)
and here is the code i used to get the status
c_samplesms_GetStorageStatus(pApp, AEESMS_TAG_NONE);
void c_samplesms_GetStorageStatus(myApp *pMe, AEESMSTag msgTag) {
CALLBACK_Cancel(&pMe->m_cbStorageSts);
CALLBACK_Init(&pMe->m_cbStorageSts, (PFNNOTIFY)c_samplesms_GetStorageStatusCB, pMe);
DBGPRINTF("get storage sts of tag %d", (int) msgTag);
pMe->m_curTag = msgTag;
ISMSSTORAGE_GetStorageStatus(pMe->m_pISMSStorage, pMe->m_storageType, msgTag,
&pMe->m_cbStorageSts, &pMe->m_storageSts, &pMe->m_errStorageSts);

void c_samplesms_GetStorageStatusCB(myapp *pMe) {
DBGPRINTF("storage type = %d", pMe->m_storageType);
DBGPRINTF("getstorage sts = %d", pMe->m_retVal);
DBGPRINTF("nMaxSlots = %d", pMe->m_storageSts.nMaxSlots);
DBGPRINTF("nFreeSlots = %d", pMe->m_storageSts.nFreeSlots);
DBGPRINTF("nUsedTagSlots = %d", pMe->m_storageSts.nUsedTagSlots);
if (pMe->m_errStorageSts == SUCCESS) {
ISHELL_SendEvent(pMe->a.m_pIShell, AEECLSID_MYAPP,
EVT_STSSTORAGE, NULL, pMe->m_storageSts.nUsedTagSlots);
}
else {
// Calling ISMSSTORAGE_GetStorageStatus may be unsuccessful
// if the function was called before SMSStorage is not ready
c_samplesms_GetStorageStatus(pMe, pMe->m_curTag);
}

I tried almost all the possible AEESMSStorageType including the 4 template
the only one that gives me some reasonable feedback is AEESMS_NV_CDMA.
here is the results for cdma
03/16/10 10:39:59.641343 get storage sts of tag 0
03/16/10 10:39:59.642137 storage type = 2
03/16/10 10:39:59.642381 getstorage sts = 0
03/16/10 10:39:59.642564 nMaxSlots = 99
03/16/10 10:39:59.642717 nFreeSlots = 99
03/16/10 10:39:59.642991 nUsedTagSlots = 0
here is the results for ruim
03/16/10 10:58:27.934043 get storage sts of tag 0
03/16/10 10:58:27.934897 storage type = 0
03/16/10 10:58:27.935142 getstorage sts = 0
03/16/10 10:58:27.935325 nMaxSlots = 0
03/16/10 10:58:27.935477 nFreeSlots = 0
03/16/10 10:58:27.935752 nUsedTagSlots = 0
and i am very sure the device has a lot of messages been saved in the inbox (read and unread)
and here is the code i used to get the status
c_samplesms_GetStorageStatus(pApp, AEESMS_TAG_NONE);
void c_samplesms_GetStorageStatus(myApp *pMe, AEESMSTag msgTag) {
CALLBACK_Cancel(&pMe->m_cbStorageSts);
CALLBACK_Init(&pMe->m_cbStorageSts, (PFNNOTIFY)c_samplesms_GetStorageStatusCB, pMe);
DBGPRINTF("get storage sts of tag %d", (int) msgTag);
pMe->m_curTag = msgTag;
ISMSSTORAGE_GetStorageStatus(pMe->m_pISMSStorage, pMe->m_storageType, msgTag,
&pMe->m_cbStorageSts, &pMe->m_storageSts, &pMe->m_errStorageSts);

void c_samplesms_GetStorageStatusCB(myapp *pMe) {
DBGPRINTF("storage type = %d", pMe->m_storageType);
DBGPRINTF("getstorage sts = %d", pMe->m_retVal);
DBGPRINTF("nMaxSlots = %d", pMe->m_storageSts.nMaxSlots);
DBGPRINTF("nFreeSlots = %d", pMe->m_storageSts.nFreeSlots);
DBGPRINTF("nUsedTagSlots = %d", pMe->m_storageSts.nUsedTagSlots);
if (pMe->m_errStorageSts == SUCCESS) {
ISHELL_SendEvent(pMe->a.m_pIShell, AEECLSID_MYAPP,
EVT_STSSTORAGE, NULL, pMe->m_storageSts.nUsedTagSlots);
}
else {
// Calling ISMSSTORAGE_GetStorageStatus may be unsuccessful
// if the function was called before SMSStorage is not ready
c_samplesms_GetStorageStatus(pMe, pMe->m_curTag);
}

Hi cjiang,
On which device you are testing your application ?
I have tested the code in device Huawei 5330 and working fine. Try with some other devices also.

Hi cjiang,
On which device you are testing your application ?
I have tested the code in device Huawei 5330 and working fine. Try with some other devices also.

I am using
LG voyager, vx10000, 3.1.4
LG env 2, vx9100, 3.1.4
LG env 3, vx9200, 3.1.5 (i believe)
none of these works.

I am using
LG voyager, vx10000, 3.1.4
LG env 2, vx9100, 3.1.4
LG env 3, vx9200, 3.1.5 (i believe)
none of these works.

you may want to check the OEM Exceptions listed in the device pack.
VX10K is one of the example for this.
SMSStorage is not supported on some devices, you may be able to instantiate it but it might not work. If such is the case the same should be mentioned under the OEM Exceptions.
It is good to check the Device Pack before targeting a App/Feature to a device.
thanks.

you may want to check the OEM Exceptions listed in the device pack.
VX10K is one of the example for this.
SMSStorage is not supported on some devices, you may be able to instantiate it but it might not work. If such is the case the same should be mentioned under the OEM Exceptions.
It is good to check the Device Pack before targeting a App/Feature to a device.
thanks.

this is what i have for the voyager (vx10000). it has isms, ismsmsg, and ismsstorage in the exception list. but, i am very sure isms and ismsmsg are working fine.
anybody can explain?
[HTML] IADDRBOOK_REMOVEALLRECS(),IADDRBOOK,refer to VZW Spec,
IDISPLAY_SetAnnunciators(),IDISPLAY,Refer to,
IBTAG,IBTAG,Not support Bluetooth in BREW,
IBTSDG,IBTSDG,Not support Bluetooth in BREW,
IBTSIOPORT,IBTSIOPORT,Not support Bluetooth in BREW,
ISMS,ISMS,Not support ISMS,
ISMSMSG,ISMSMSG,Not support ISMSMSG,
ISMSSTORAGE,ISMSSTORAGE,Not support ISMSSTORAGE,
ISMSBCSRVOPTS,ISMSBCSRVOPTS,None,
ISMSBCCONFIG,ISMSBCCONFIG,None,
IQoSSession,IQoSSession,None
[/HTML]

this is what i have for the voyager (vx10000). it has isms, ismsmsg, and ismsstorage in the exception list. but, i am very sure isms and ismsmsg are working fine.
anybody can explain?
[HTML] IADDRBOOK_REMOVEALLRECS(),IADDRBOOK,refer to VZW Spec,
IDISPLAY_SetAnnunciators(),IDISPLAY,Refer to,
IBTAG,IBTAG,Not support Bluetooth in BREW,
IBTSDG,IBTSDG,Not support Bluetooth in BREW,
IBTSIOPORT,IBTSIOPORT,Not support Bluetooth in BREW,
ISMS,ISMS,Not support ISMS,
ISMSMSG,ISMSMSG,Not support ISMSMSG,
ISMSSTORAGE,ISMSSTORAGE,Not support ISMSSTORAGE,
ISMSBCSRVOPTS,ISMSBCSRVOPTS,None,
ISMSBCCONFIG,ISMSBCCONFIG,None,
IQoSSession,IQoSSession,None
[/HTML]

Hi Shivendra,
Thanks for your kind reply and showing interest in this thread ,
shivendra;80897 wrote:
SMSStorage is not supported on some devices, you may be able to instantiate it but it might not work. If such is the case the same should be mentioned under the OEM Exceptions.
I am able to instantiate the SMSStorage in the device and getting StorageStatus correctly for the StorageType AEESMS_CARD_RUIM, but for the storage type AEESMS_NV_CDMA ISMSSTORAGE_GetStorageStatus () does not give the right answer.
For Type: AEESMS_NV_CDMA and Tag AEESMS_TAG_NONE
NSize: 16
MaxSlots: 300
FreeSlots: 300
UsedTagSlots: 0
For type:AEESMS_CARD_RUIM and Tag AEESMS_TAG_NONE ,give right result
NSize: 16
MaxSlots: 50
FreeSlots: 38
UsedTagSlots:12
I am testing with ZTE-366 and the OEM Exception is (From the DDS)
ISMSMSG_AddOpt unsupported,
However am able to send the message successfully from this device.
I am sure that there are message in my device phone memory but can't understand this behavior. :confused:
Help Appreciated.

Hi Shivendra,
Thanks for your kind reply and showing interest in this thread ,
shivendra;80897 wrote:
SMSStorage is not supported on some devices, you may be able to instantiate it but it might not work. If such is the case the same should be mentioned under the OEM Exceptions.
I am able to instantiate the SMSStorage in the device and getting StorageStatus correctly for the StorageType AEESMS_CARD_RUIM, but for the storage type AEESMS_NV_CDMA ISMSSTORAGE_GetStorageStatus () does not give the right answer.
For Type: AEESMS_NV_CDMA and Tag AEESMS_TAG_NONE
NSize: 16
MaxSlots: 300
FreeSlots: 300
UsedTagSlots: 0
For type:AEESMS_CARD_RUIM and Tag AEESMS_TAG_NONE ,give right result
NSize: 16
MaxSlots: 50
FreeSlots: 38
UsedTagSlots:12
I am testing with ZTE-366 and the OEM Exception is (From the DDS)
ISMSMSG_AddOpt unsupported,
However am able to send the message successfully from this device.
I am sure that there are message in my device phone memory but can't understand this behavior. :confused:
Help Appreciated.

cjiang;80900 wrote:[HTML] IADDRBOOK_REMOVEALLRECS(),IADDRBOOK,refer to VZW Spec,
IDISPLAY_SetAnnunciators(),IDISPLAY,Refer to,
IBTAG,IBTAG,Not support Bluetooth in BREW,
IBTSDG,IBTSDG,Not support Bluetooth in BREW,
IBTSIOPORT,IBTSIOPORT,Not support Bluetooth in BREW,
ISMS,ISMS,Not support ISMS,
ISMSMSG,ISMSMSG,Not support ISMSMSG,
ISMSSTORAGE,ISMSSTORAGE,Not support ISMSSTORAGE,
ISMSBCSRVOPTS,ISMSBCSRVOPTS,None,
ISMSBCCONFIG,ISMSBCCONFIG,None,
IQoSSession,IQoSSession,None
[/HTML]
As in the above case the features listed may not work correctly on this device.
You may take it as a warning.

cjiang;80900 wrote:[HTML] IADDRBOOK_REMOVEALLRECS(),IADDRBOOK,refer to VZW Spec,
IDISPLAY_SetAnnunciators(),IDISPLAY,Refer to,
IBTAG,IBTAG,Not support Bluetooth in BREW,
IBTSDG,IBTSDG,Not support Bluetooth in BREW,
IBTSIOPORT,IBTSIOPORT,Not support Bluetooth in BREW,
ISMS,ISMS,Not support ISMS,
ISMSMSG,ISMSMSG,Not support ISMSMSG,
ISMSSTORAGE,ISMSSTORAGE,Not support ISMSSTORAGE,
ISMSBCSRVOPTS,ISMSBCSRVOPTS,None,
ISMSBCCONFIG,ISMSBCCONFIG,None,
IQoSSession,IQoSSession,None
[/HTML]
As in the above case the features listed may not work correctly on this device.
You may take it as a warning.

Prayag;80903 wrote:
For Type: AEESMS_NV_CDMA and Tag AEESMS_TAG_NONE
try storing some messages on NV through your BREW App.

Prayag;80903 wrote:
For Type: AEESMS_NV_CDMA and Tag AEESMS_TAG_NONE
try storing some messages on NV through your BREW App.

Hi shivendra,
I tried storing message through brew apps and able to retrieve them by using AEESMS_NV_CDMA, but those messages are not visible in native inbox.
I want to access native message and tried with all AEESMSStorageType but failed,
however able to access native message by using AEESMS_NV_CDMA for other devices.
What could be reason behind it ??

Hi shivendra,
I tried storing message through brew apps and able to retrieve them by using AEESMS_NV_CDMA, but those messages are not visible in native inbox.
I want to access native message and tried with all AEESMSStorageType but failed,
however able to access native message by using AEESMS_NV_CDMA for other devices.
What could be reason behind it ??

Through some lights on above discussion.
Anybody :confused:

Through some lights on above discussion.
Anybody :confused:

If its a sim based device it may be possible that it supports only saving messages on SIM through BREW.
thanks.

If its a sim based device it may be possible that it supports only saving messages on SIM through BREW.
thanks.