Cellular Data
Introduction
This sample shows how to use cellular data APIs to obtain SIM card information.
Usage Instruction
-
Set the default SIM card. The default SIM card is rendered with a blue background.
-
Enable or disable the mobile data service. Turn On is displayed if the mobile data service is enabled, and Turn Off is displayed otherwise.
-
Enable or disable the roaming service. Turn On is displayed if the roaming service is enabled, and Turn Off is displayed otherwise.
-
Check Data Flow Type for the data flow status of the default SIM card.
-
Check Connect Data for the data connection status of the default SIM card.
Constraints
-
This sample can only be run on standard-system devices.
-
The device must support the SIM card function and have a SIM card installed.
-
This sample demonstrates the stage model, which supports only API version 9.
-
This sample requires DevEco Studio 3.0 Beta4 (Build Version: 3.0.0.992, built on July 14, 2022) to compile and run.