locked
Do not have acces to use Windows.Networking.NetworkOperators.UssdSession Apis.

    Question

  • Hi,

    I am using following code to access the account balance details.

            async private static void sendMessage(string networkAccountID, string messageText)
            {
                try
                {
                   
                    UssdSession session = UssdSession.CreateFromNetworkAccountId(networkAccountID);
                    UssdMessage message = new UssdMessage(messageText);
                    UssdReply reply = await session.SendMessageAndGetReplyAsync(message);
                    UssdResultCode code = reply.ResultCode;
                    string result = null;
                    if (code == UssdResultCode.ActionRequired || code == UssdResultCode.NoActionRequired)
                    {

                        UssdMessage message1 = reply.Message;
                        string payloadAsText = message1.PayloadAsText;
                        if (payloadAsText != "")
                        {
                            result = "Response: " + payloadAsText;
                        }
                        else
                        {
                            result = "Unsupported data coding scheme 0x" + message.DataCodingScheme.ToString("X");
                        }
                    }
                    else
                    {
                        result = "Request failed: " + code.ToString();
                    }
                    if (code == UssdResultCode.ActionRequired)
                    {
                        session.Close();
                    }
                }
                catch (Exception ex)
                {
               
                }
     }

     

    Here I got a exception at  UssdReply reply = await session.SendMessageAndGetReplyAsync(message);

    Error message is  "The request is not supported. (Exception from HRESULT: 0x80070032)".

    Here string messageText is USSD code for my prepaid service provider (*123#) as *123# gives correct result when used by mobile.

    (To verify I used some more USSD codes but every time got same result).

    I assume that access to these APIs are only provide by Service provider. Am I right?

    This is a very urgent Issue for me. Please help what I am missing here? 

    Thanks,

    Vipin

    Wednesday, December 28, 2011 11:28 AM

Answers

  • Ajay, this API requires the mobile broadband device to support NDIS 6.3. USSD support is an optional feature of the NDIS 6.3 interface revision. Please work with your operator and device vendor to get a compatible device and driver. If your current driver supports NDIS 6.2 only, this is not supported.
    Wednesday, June 13, 2012 1:33 AM

All replies

  • Does the UssdSample work for you?

    Your account needs to be set for this to work too.


    Jeff Sanders (MSFT)
    Wednesday, December 28, 2011 2:03 PM
    Moderator
  • Hi Jeff,

    The UssdSample also do not work for me. As it also give same exception as mentioned above after executing below statement

    UssdReply reply = await session.SendMessageAndGetReplyAsync(new UssdMessage(MessageText.Text));

    With sample USSD Application, Stack Trace for the exception shown below

    System.Runtime.InteropServices.COMException (0x8007029A): Exception from HRESULT: 0x8007029A at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
     at UssdSampleCS.MainPage.<Scenario1Button_Click>d__0.MoveNext() in c:\Users\Vipin\Desktop\USSD API SDK Sample\C#\MainPage.xaml.cs:line 113

    Please suggest How to set Account to make it workable. 

    Thanks,

    Vipin


    • Edited by viptyagi Thursday, December 29, 2011 11:26 AM
    Thursday, December 29, 2011 6:13 AM
  • Hi Jeff,

    Please suggest solution to overcome to this issue.

    As this issue is urgent for me. I have mentioned details and observations with stack trace related to this.

    Also please suggest how to set account as you mentioned "Your account needs to be set for this to work too.".

    Thanks,

    Vipin

    Friday, December 30, 2011 8:13 AM
  • Hi All,

    I am still waiting for help to resolve this issue.

    Please suggest to overcome to this issue.

    Thanks,

    Vipin

    Wednesday, January 04, 2012 9:42 AM
  • Hi All,

    I am still waiting for help to resolve this issue.

    Please suggest to overcome to this issue.

    Thanks,

    Vipin


    Hi All,

    Still I am not able to resolve the issue, as facing same problem as mentioned above.

    Please someone suggest to overcome to this issue.

    Thanks,

    Vipin

    Friday, January 06, 2012 9:39 AM
  • Vipin,

    http://msdn.microsoft.com/en-us/library/windows/apps/xaml/windows.networking.networkoperators.ussdsession.sendmessageandgetreplyasync.aspx

     This functionality is only available to mobile operator apps and Metro style apps given privileged access by mobile network operators. For more information, see Mobile Broadband: Metro style Device Apps.

    Best Wishes - Eric

    Wednesday, June 06, 2012 4:42 AM
    Moderator
  • Hi Eric,

           I am working on USSD since last 5 days but no luck, I am not able to send USSD messages and getting the same error mentioned above. I have setup the account also I am able to use other Network Information APIs but USSD is not working. Is there any issue regarding NDIS driver version?? Please help

    Thanks

    Ajay Rawat

    Wednesday, June 06, 2012 8:08 AM
  • Ajay,

    This functionality is only available to mobile operator apps and Metro style apps given privileged access by mobile network operators. For more information, see Mobile Broadband: Metro style Device Apps.

    Best Wishes  - Eric

    Wednesday, June 06, 2012 8:04 PM
    Moderator
  • Hi Eric,

                Thanks for your response,

    I am developing app for mobile operator, I have created "Prevising meta" file which provide privileged access to my application. I followed all the steps and I am getting error "Error message is  "The request is not supported. (Exception from HRESULT: 0x80070032)"."  I am using NDIS version 6.2, So please let me know how the USSD Sample code will work. because I could not find this sample helpful anymore its not working. This is very urgent for client requirement.

    Thanks

    Ajay Rawat

    Thursday, June 07, 2012 9:08 AM
  • Ajay,

    I am still working on this.

    Best Wishes - Eric

    Tuesday, June 12, 2012 11:15 PM
    Moderator
  • Ajay, this API requires the mobile broadband device to support NDIS 6.3. USSD support is an optional feature of the NDIS 6.3 interface revision. Please work with your operator and device vendor to get a compatible device and driver. If your current driver supports NDIS 6.2 only, this is not supported.
    Wednesday, June 13, 2012 1:33 AM