9d37e3c6创建于 2023年4月13日历史提交

Cellular Data

Introduction

This sample shows how to use cellular data APIs to obtain SIM card information.

Usage Instruction

  1. Set the default SIM card. The default SIM card is rendered with a blue background.

  2. Enable or disable the mobile data service. Turn On is displayed if the mobile data service is enabled, and Turn Off is displayed otherwise.

  3. Enable or disable the roaming service. Turn On is displayed if the roaming service is enabled, and Turn Off is displayed otherwise.

  4. Check Data Flow Type for the data flow status of the default SIM card.

  5. Check Connect Data for the data connection status of the default SIM card.

Constraints

  1. This sample can only be run on standard-system devices.

  2. The device must support the SIM card function and have a SIM card installed.

  3. This sample demonstrates the stage model, which supports only API version 9.

  4. This sample requires DevEco Studio 3.1 Canary1 (Build Version: 3.1.0.100) to compile and run.