please help me with sending ussd request.
IReadOnlyList<string> networkAccIds = MobileBroadbandAccount.AvailableNetworkAccountIds;
if (networkAccIds.Count == 0)
{
return;
}
string networkAccountId = networkAccIds[0];
UssdSession session = UssdSession.CreateFromNetworkAccountId(networkAccIds[0]);
2 sim card installed in my phone. But networkAccIds.Count
always zero. What's my mistake?
update 1:
Thanks Jerry Li. I got the network identifiers. I have a new problem. When I do:
UssdReply reply = await session.SendMessageAndGetReplyAsync(new UssdMessage("*100#"));
I get exception:
Unexpected exception occured: System.Runtime.InteropServices.COMException (0x80070032): The request is not supported.
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at uwp_1.MainPage.<GetBalance>d__1.MoveNext()
Why do I get exception?