sms Extraction | developer.brewmp.com sms Extraction | developer.brewmp.com

Developer

sms Extraction

Forums:

Hello Everybody,

Can anybody please help me to make this small piece of code run?. I have registered for sms notification in mif File and get the event notification, but i am not able to extract text from it

case EVT_NOTIFY:
pNoti = (AEENotify *)dwParam;
if ( pNoti->cls == AEECLSID_TAPI)
{
AEESMSMsg *pMsg;
pMsg = (AEESMSMsg *)pNoti->pData;
strData = (char *)pMsg->data,
DBGPRINTF("SMS Message = %s",strData);

strdata is always empty. Or if there is anyother way how to extract sms Text i am not concern in getting number.
thanks in advance

Check this link for your verification, it will help
http://brewforums.qualcomm.com/showthread.php?t=10972

Check this link for your verification, it will help
http://brewforums.qualcomm.com/showthread.php?t=10972

thanx for the link that was really of great help.but i have a small problem when i try to regsiter using the code
ISHELL_RegisterNotify(pIShell, AEECLSID_CALLHOOK,AEECLSID_SMSNOTIFIER,
((AEESMS_TYPE_TEXT<<16) | NMASK_SMS_TYPE));
I get the error undefined types AEESMS_TYPE_TEXT and NMASK_SMS_TYPE.
can u please tell me how do i solve this, any header file reference needed ? i m using brew 3.1.5. or how can i do that in mif file
thanx in advance.

thanx for the link that was really of great help.but i have a small problem when i try to regsiter using the code
ISHELL_RegisterNotify(pIShell, AEECLSID_CALLHOOK,AEECLSID_SMSNOTIFIER,
((AEESMS_TYPE_TEXT<<16) | NMASK_SMS_TYPE));
I get the error undefined types AEESMS_TYPE_TEXT and NMASK_SMS_TYPE.
can u please tell me how do i solve this, any header file reference needed ? i m using brew 3.1.5. or how can i do that in mif file
thanx in advance.

Include "AEETapi.h" and "AEESMS.h" header files.

Include "AEETapi.h" and "AEESMS.h" header files.

thanx for the last reply. I am now able to compile the application. When i try to send a mobile terminated message from simulator i get the event notification but the method ISMSMSG_GetOpt() returns failed and i can not get the number & Text.
The msgid returned to me is 0.
My code
pNoti = (AEENotify*)dwParam;
DBGPRINTF("EVT_NOTIFY: cls:0x%0x, mask:0x%0x", pNoti->cls, pNoti->dwMask);
if (pNoti->cls == AEECLSID_SMSNOTIFIER &&
(pNoti->dwMask == ((AEESMS_TYPE_TEXT<<16) | NMASK_SMS_TYPE)))
{
uint32 msgId = (uint32)pNoti->pData;
DBGPRINTF("EVT_NOTIFY: SMS! msg ID: %d", msgId);
// create a instance of ISMS interface;
success = ISHELL_CreateInstance(pMe->pIShell,AEECLSID_SMS,(void **)&m_pSms);
// create an instance of ISMSMsg interface
success = ISHELL_CreateInstance(pMe->pIShell,AEECLSID_SMSMSG,(void **)&m_pSmsMsg);
success = ISMS_ReceiveMsg(m_pSms, msgId, &m_pSmsMsg);
if (success == SUCCESS)
{
// Get number
SMSMsgOpt pwo;
success = ISMSMSG_GetOpt(m_pSmsMsg, MSGOPT_FROM_DEVICE_SZ, &pwo);
DBGPRINTF("ISMSMSG_GetOpt: success=%d",success)

Please let me know where i am going wrong so i forgot something.
Thanks in advance

thanx for the last reply. I am now able to compile the application. When i try to send a mobile terminated message from simulator i get the event notification but the method ISMSMSG_GetOpt() returns failed and i can not get the number & Text.
The msgid returned to me is 0.
My code
pNoti = (AEENotify*)dwParam;
DBGPRINTF("EVT_NOTIFY: cls:0x%0x, mask:0x%0x", pNoti->cls, pNoti->dwMask);
if (pNoti->cls == AEECLSID_SMSNOTIFIER &&
(pNoti->dwMask == ((AEESMS_TYPE_TEXT<<16) | NMASK_SMS_TYPE)))
{
uint32 msgId = (uint32)pNoti->pData;
DBGPRINTF("EVT_NOTIFY: SMS! msg ID: %d", msgId);
// create a instance of ISMS interface;
success = ISHELL_CreateInstance(pMe->pIShell,AEECLSID_SMS,(void **)&m_pSms);
// create an instance of ISMSMsg interface
success = ISHELL_CreateInstance(pMe->pIShell,AEECLSID_SMSMSG,(void **)&m_pSmsMsg);
success = ISMS_ReceiveMsg(m_pSms, msgId, &m_pSmsMsg);
if (success == SUCCESS)
{
// Get number
SMSMsgOpt pwo;
success = ISMSMSG_GetOpt(m_pSmsMsg, MSGOPT_FROM_DEVICE_SZ, &pwo);
DBGPRINTF("ISMSMSG_GetOpt: success=%d",success)

Please let me know where i am going wrong so i forgot something.
Thanks in advance

Lets try on the device with the same code and check the text message and phone number. Get the text from (char *)pwo.pVal.

Lets try on the device with the same code and check the text message and phone number. Get the text from (char *)pwo.pVal.