Using of Mobilebroadbandpin class

asked 2021-05-10T05:22:29.147+00:00
Akhil G Nair 1 Reputation point

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

Universal Windows Platform (UWP)
{count} votes

1 answer

Sort by: Most helpful
  1. answered 2021-05-10T06:23:31.52+00:00

    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.