ITAPI_SendSMS problem | developer.brewmp.com ITAPI_SendSMS problem | developer.brewmp.com

Developer

ITAPI_SendSMS problem

Forums:

Hi
I am working on an application in which i have to send an text sms whenever i get any brew directed sms for my applicaion.
Problem is that ITAPI_SendSMS(...) shows SUCCESS(0) status but i didn't get sms on other handset.

----Code----
...
...
case EVT_APP_MESSAGE:
{
int flag=0;
flag = ITAPI_SendSMS(
pMe->pTapi, "9223246976",
"Hello World",NULL,SendSmsCallBack,pMe);
DBGPRINTF("Status==%d",falg);
return TRUE;

..
..

I am testing this on MotoRazer handset.

Anyone can tell me what is the problem???

did you get control passed to SendSmsCallBack(). If not then some error

did you get control passed to SendSmsCallBack(). If not then some error

yes, i am getting.
My function is:
void SendSmsCallBack(void *pData, int status)
{
LBS* pMe = (LBS*)pData;
DBGPRINTF("Send SMS Status = %d",status);

It prints "Send SMS Status = 0" in logger.

yes, i am getting.
My function is:
void SendSmsCallBack(void *pData, int status)
{
LBS* pMe = (LBS*)pData;
DBGPRINTF("Send SMS Status = %d",status);

It prints "Send SMS Status = 0" in logger.

The return value for ITAPI_SendSMS() only tells you whether the message is accepted by ITAPI interface and the callback function "status" value only tells you whether the network system has accepted the message. In other words, there is no confirming the successful delivery of the message to another handset since the only way to do that is to rely on some ack msg back from the receiver. Otherwise there is no way of knowing if the message is actually received. You can consider the SMS system as a UDP protocol. If you really need such delivery confirmation, one way you can do it is to run a background app on the receiver that sends out such confirmation message (can be BREW directed) back to the sender when receiving a SMS successfully.
Tony
BREW Support

The return value for ITAPI_SendSMS() only tells you whether the message is accepted by ITAPI interface and the callback function "status" value only tells you whether the network system has accepted the message. In other words, there is no confirming the successful delivery of the message to another handset since the only way to do that is to rely on some ack msg back from the receiver. Otherwise there is no way of knowing if the message is actually received. You can consider the SMS system as a UDP protocol. If you really need such delivery confirmation, one way you can do it is to run a background app on the receiver that sends out such confirmation message (can be BREW directed) back to the sender when receiving a SMS successfully.
Tony
BREW Support

ITAPI_SendSMS and callback function return SUCCESS, but no sms was sent.
My handset is samsung sch_x639.

ITAPI_SendSMS and callback function return SUCCESS, but no sms was sent.
My handset is samsung sch_x639.

...
if ((uRet = ITAPI_SendSMS(pITapi, pszDst, pszMsg, clsDst, pfn, (void *)pme->m_pOwner)) != SUCCESS)
{
DBGPRINTF("ITAPI_SendSMS failed");
return FALSE;
}
...
static void SendSmsCallback(void * pUser, int status)
{
if (status == SUCCESS)
{
DBGPRINTF("SendSmsCallback success");
}
else
{
DBGPRINTF("SendSmsCallback failed:: %d", status);
}

ITAPI_SendSMS and callback function return SUCCESS, but no sms was sent.
I am testing this on samsung sch_x639.

...
if ((uRet = ITAPI_SendSMS(pITapi, pszDst, pszMsg, clsDst, pfn, (void *)pme->m_pOwner)) != SUCCESS)
{
DBGPRINTF("ITAPI_SendSMS failed");
return FALSE;
}
...
static void SendSmsCallback(void * pUser, int status)
{
if (status == SUCCESS)
{
DBGPRINTF("SendSmsCallback success");
}
else
{
DBGPRINTF("SendSmsCallback failed:: %d", status);
}

ITAPI_SendSMS and callback function return SUCCESS, but no sms was sent.
I am testing this on samsung sch_x639.

tonylee wrote:The return value for ITAPI_SendSMS() only tells you whether the message is accepted by ITAPI interface and the callback function "status" value only tells you whether the network system has accepted the message. In other words, there is no confirming the successful delivery of the message to another handset since the only way to do that is to rely on some ack msg back from the receiver. Otherwise there is no way of knowing if the message is actually received. You can consider the SMS system as a UDP protocol. If you really need such delivery confirmation, one way you can do it is to run a background app on the receiver that sends out such confirmation message (can be BREW directed) back to the sender when receiving a SMS successfully.
Tony
BREW Support
it is very interesting, but what if SMS is attempted. I think this is the question. After ITAPI_SendSMS() app doesn't receive EVT_APP_SUSPEND.
May be some mistake is in API Ref-ce and sintax of ITAPI_SendSMS(pApp->pITapi, "9013091232", "Hello",0,(PFNSMSSTATUS)MOSMSNotify,pApp); is wrong?

tonylee wrote:The return value for ITAPI_SendSMS() only tells you whether the message is accepted by ITAPI interface and the callback function "status" value only tells you whether the network system has accepted the message. In other words, there is no confirming the successful delivery of the message to another handset since the only way to do that is to rely on some ack msg back from the receiver. Otherwise there is no way of knowing if the message is actually received. You can consider the SMS system as a UDP protocol. If you really need such delivery confirmation, one way you can do it is to run a background app on the receiver that sends out such confirmation message (can be BREW directed) back to the sender when receiving a SMS successfully.
Tony
BREW Support
it is very interesting, but what if SMS is attempted. I think this is the question. After ITAPI_SendSMS() app doesn't receive EVT_APP_SUSPEND.
May be some mistake is in API Ref-ce and sintax of ITAPI_SendSMS(pApp->pITapi, "9013091232", "Hello",0,(PFNSMSSTATUS)MOSMSNotify,pApp); is wrong?

Can you clarify what your question is? It's OEM-specific whether or not the app will be suspended after calling ITAPI_SendSMS(). Most devices don't suspend the app.

Can you clarify what your question is? It's OEM-specific whether or not the app will be suspended after calling ITAPI_SendSMS(). Most devices don't suspend the app.

Mohlendo, may be my device doesn't support sending SMS. But there is the icon of TAPI process appeared on screen. And what about mistakes in API Reference (in my case version 2.1.3). Can it occures?

Mohlendo, may be my device doesn't support sending SMS. But there is the icon of TAPI process appeared on screen. And what about mistakes in API Reference (in my case version 2.1.3). Can it occures?