Henrik Persson wrote:
> Hi there,
>
>
>> From: [email protected]
>>
> [mailto:[email protected]] On Behalf Of Rakesh Kumar
>
>> Sent: den 26 juni 2009 09:35
>> To: [email protected];
>>
> [email protected]
>
>> Subject: [android-porting] USSD feature on Android
>>
>>
>> Hi,
>> I am working on USSD feature on Android. USSD data is coming as
>>
> Unsolicited response whem I am giving AT+CUSD command. Now , Please help
> me how to handle these data.
>
> I guess you are trying to implement this in the RIL. It should be as
> simple as parsing the +CUSD unsolicited response and sending it to the
> android framework as an RIL_UNSOL_ON_USSD unsolicited response.
>
I start to work on it, but I don't terminated because, there is
somenthing wrong
in the response. Put in
static void onUnsolicited (const char *s, const char *sms_pdu)
{
...
else if (strStartsWith(s, "+CUSD:")) {
char *response[2] = { NULL, NULL };
char **cur;
char *tmp;
line = strdup(s);
tmp = line;
at_tok_start(&tmp);
err = at_tok_nextstr(&tmp, &(response[0]));
if (err < 0) {
LOGE("Error code not present");
goto out;
}
err = at_tok_nextstr(&tmp, &(response[1]));
RIL_onUnsolicitedResponse(
RIL_UNSOL_ON_USSD,
&response, sizeof(response));
}
Maybe you have time and you can fix
Michael
--~--~---------~--~----~------------~-------~--~----~
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting
-~----------~----~----~----~------~----~------~--~---