how to simulate the incoming sms | developer.brewmp.com how to simulate the incoming sms | developer.brewmp.com

Developer

how to simulate the incoming sms

Forums:

it seems stated well in the sdk, but, i still could not get it to work.
here are what i did after installing brew 3.1.5.

i started thesimulator, and clicked on the sms icon on the tab.

1. check mobile terminated sms
2. priority: normal
3. timestamp: 0
4: encoding: unicode
5. from: 4162825333
6. privacy: normal
7. message: hello world
i left the field immediately under mobile terminated sms blank.

after i clicked on send, there is no response at all. not on the device in the simulator, not the sms emulation window.
and i could not find any .sms in my filesystem either.

could anybody help? what did i miss?
thx a ton
CJ

i made a little bit progress today.
what i have found out is, the sms emulation does send out the brew directed sms and it was received by my application (case EVT_APP_MESSAGE).
but, what i wanted to do is to monitor a generic sms.
so, i added the notification as AEECLSID_TAPI AND NMASK_TAPI_SMS_TEXT. then, i don't know how to deal with the host id. plus, so, i decided to put my application id 0x10101010 on there.
the result is disappointing. upon sending the mobile terminated sms, there is no notification of any kind for my application.
plz plz help

i made a little bit progress today.
what i have found out is, the sms emulation does send out the brew directed sms and it was received by my application (case EVT_APP_MESSAGE).
but, what i wanted to do is to monitor a generic sms.
so, i added the notification as AEECLSID_TAPI AND NMASK_TAPI_SMS_TEXT. then, i don't know how to deal with the host id. plus, so, i decided to put my application id 0x10101010 on there.
the result is disappointing. upon sending the mobile terminated sms, there is no notification of any kind for my application.
plz plz help

cjiang wrote:
the result is disappointing. upon sending the mobile terminated sms, there is no notification of any kind for my application.
plz plz help
Check SMS notifier
AEECLSID_SMSNOTIFIER
Interfaces -> ISMSNotifier
Following are the notification masks supported by ISMSNotifier:
#define NMASK_SMS_TYPE 0x0001 Arrival of SMS for specific AEESMSType
#define NMASK_SMS_BROADCAST 0x0002 Arrival of broadcast SMS
#define NMASK_SMS_TYPE_LOOPBACK 0x0004 Arrival of a loopback SMS

cjiang wrote:
the result is disappointing. upon sending the mobile terminated sms, there is no notification of any kind for my application.
plz plz help
Check SMS notifier
AEECLSID_SMSNOTIFIER
Interfaces -> ISMSNotifier
Following are the notification masks supported by ISMSNotifier:
#define NMASK_SMS_TYPE 0x0001 Arrival of SMS for specific AEESMSType
#define NMASK_SMS_BROADCAST 0x0002 Arrival of broadcast SMS
#define NMASK_SMS_TYPE_LOOPBACK 0x0004 Arrival of a loopback SMS

thx for the reply, but i guess i did not make myself clear enough.
i am very very new to brew. i have been working on j2me, symbian, wm, android...
what i am trying to achieve is: i want my application to be able to monitor (by monitor, i meant getting a copy of it) all the incoming sms (not application specific or brew specific). just normal sms. i am not trying to block it or delete it either.
so my question is:
1. in the emulator, is the "mobile terminated sms" just another name for the general sms we use daily?
2. in the "advanced applet information" for my application, i have notifications as "AEECLSID_TAPI" and mask as NMASK_TAPI_SMS_TEXT. is this correct? what is the purpose of host id? what value should i put there?
3. in my application, i have
case EVT_NOTIFY:
{
AEENotify * pNotify = (AEENotify*)dwParam;
AEESMSTextMsg * pTextMsg = (AEESMSTextMsg*)pNotify->pData;
}
is this the right way to get the payload?
if i got these right, why my application did not receive any notification?
once again, i appreciate you guys' help.
CJ

thx for the reply, but i guess i did not make myself clear enough.
i am very very new to brew. i have been working on j2me, symbian, wm, android...
what i am trying to achieve is: i want my application to be able to monitor (by monitor, i meant getting a copy of it) all the incoming sms (not application specific or brew specific). just normal sms. i am not trying to block it or delete it either.
so my question is:
1. in the emulator, is the "mobile terminated sms" just another name for the general sms we use daily?
2. in the "advanced applet information" for my application, i have notifications as "AEECLSID_TAPI" and mask as NMASK_TAPI_SMS_TEXT. is this correct? what is the purpose of host id? what value should i put there?
3. in my application, i have
case EVT_NOTIFY:
{
AEENotify * pNotify = (AEENotify*)dwParam;
AEESMSTextMsg * pTextMsg = (AEESMSTextMsg*)pNotify->pData;
}
is this the right way to get the payload?
if i got these right, why my application did not receive any notification?
once again, i appreciate you guys' help.
CJ

1. NMASK_TAPI_SMS_TEXT allows applications to register for all Text Messages (messages with TeleServce ID: SMS_TELESERVICE_CMT_95).
2. Correct. Hostid is not related to this. keep it as is (0x0, I guess). It is app host id but not required here.
3. Correct
Try debugging. I was able to get the notification. Just type message in SMS emulation and try. No need to provide other info.

1. NMASK_TAPI_SMS_TEXT allows applications to register for all Text Messages (messages with TeleServce ID: SMS_TELESERVICE_CMT_95).
2. Correct. Hostid is not related to this. keep it as is (0x0, I guess). It is app host id but not required here.
3. Correct
Try debugging. I was able to get the notification. Just type message in SMS emulation and try. No need to provide other info.

thank you guys. i appreciate your contribution to this forum.
i have set up my emulator correctly.
i have AEECLSID_TAPI and NMASK_TAPI_SMS_TEXT. my app is activated upon a message is sent. then, i tried to use
AEESMSMsg* pMsg = (AEESMSMsg *)pNoti->pData;
or
AEESMSTextMsg *pMsg = (AEESMSTextMsg *)pNoti->pData;
to get the payload.
1. Then, i realize that there is no way to retrieve the phone number in this way. Can anybody confirm me on this?
2. Does that mean i have to use ISMS interface? do i need to change anything in the setting such as AEECLSID_TAPI /NMASK_TAPI_SMS_TS / value 0x1002?

thank you guys. i appreciate your contribution to this forum.
i have set up my emulator correctly.
i have AEECLSID_TAPI and NMASK_TAPI_SMS_TEXT. my app is activated upon a message is sent. then, i tried to use
AEESMSMsg* pMsg = (AEESMSMsg *)pNoti->pData;
or
AEESMSTextMsg *pMsg = (AEESMSTextMsg *)pNoti->pData;
to get the payload.
1. Then, i realize that there is no way to retrieve the phone number in this way. Can anybody confirm me on this?
2. Does that mean i have to use ISMS interface? do i need to change anything in the setting such as AEECLSID_TAPI /NMASK_TAPI_SMS_TS / value 0x1002?

szDigits of AEESMSMsg specifies the phone number.

szDigits of AEESMSMsg specifies the phone number.

szDigits of AEESMSMsg keeps showing me the value "123456" which is definitely what i have put in. plus, it does not matter what value i put in the emulator. Can you confirm it?

szDigits of AEESMSMsg keeps showing me the value "123456" which is definitely what i have put in. plus, it does not matter what value i put in the emulator. Can you confirm it?

it works now. i appreciate everything.
btw, after i using
ISHELL_RegisterNotify(pMe->a.m_pIShell,
AEECLSID_MYSMSAPP,
AEECLSID_SMSNOTIFIER,
((AEESMS_TYPE_TEXT<<16) | NMASK_SMS_TYPE));
will the app get notified by incoming sms only or incoming/outgoing sms? if it is only incoming sms only, how do i get both?

it works now. i appreciate everything.
btw, after i using
ISHELL_RegisterNotify(pMe->a.m_pIShell,
AEECLSID_MYSMSAPP,
AEECLSID_SMSNOTIFIER,
((AEESMS_TYPE_TEXT<<16) | NMASK_SMS_TYPE));
will the app get notified by incoming sms only or incoming/outgoing sms? if it is only incoming sms only, how do i get both?

Hi,
Please let me know if I am wrong in assuming that the character limit of 160 applies to app directed SMSs too.
Thanks
sam

Hi,
Please let me know if I am wrong in assuming that the character limit of 160 applies to app directed SMSs too.
Thanks
sam

Yes, it should.

Yes, it should.