question

AkhilGNair-5265 avatar image
0 Votes"
AkhilGNair-5265 asked RoyLi-MSFT commented

Using of Mobilebroadbandpin class

Can I get any examples of usage of Mobilebroadbandpin class? Actually I want to create a cmd tool which used for pin operations

windows-uwp
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@AkhilGNair-6823 Do you have any other issues? Please feel free to contact us if you still have problems. If Nico's reply solves your issue, you could accept it as answer, so that other people who have the some issue could check that.

0 Votes 0 ·

1 Answer

NicoZhu-MSFT avatar image
0 Votes"
NicoZhu-MSFT answered NicoZhu-MSFT commented

Hello, Welcome to Micorosoft Q&A,

Can I get any examples of usage of Mobilebroadbandpin class? Actually I want to create a cmd tool which used for pin operations

Please refer this document to get MobileBroadbandModem instance, then access Mobilebroadbandpin step by step. MobileBroadbandModem -> DeviceInformation -> PinManager->GetPin()


 var modem = MobileBroadbandModem.GetDefault();
 var modeminfo = modem.DeviceInformation;
 var pinManager = modeminfo.PinManager;
 var pin = pinManager.GetPin(MobileBroadbandPinType.FirstSimPin);


Please note for using above code, you need to enable cellularDeviceControl cellularDeviceIdentity capability,
If you want to use this API and publish your app to the Store, you will need special approval. For more information, see the Special and restricted capabilities section under App capability declarations.


If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks for the reply.

i would like to use this API for some testing related to SIM pin and not to publish. Still I require the approval ?
Is there any app already available in store which satisfies the same.

0 Votes 0 ·

You just need to add the capability to the package manifest file that allow the api permission. And it need not require the approval, you could use it directly after add above capability.

1 Vote 1 ·