Henrik Persson wrote:
> Hi there,
>
>   
>> From: android-porting@googlegroups.com
>>     
> [mailto:android-port...@googlegroups.com] On Behalf Of Rakesh Kumar
>   
>> Sent: den 26 juni 2009 09:35
>> To: android-porting@googlegroups.com;
>>     
> omapandroid-discuss...@omapzoom.org
>   
>> 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: android-porting+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-porting
-~----------~----~----~----~------~----~------~--~---

Reply via email to