16e7c69efSopenharmony_ci# Observer
26e7c69efSopenharmony_ci
36e7c69efSopenharmony_ci### Overview
46e7c69efSopenharmony_ci
56e7c69efSopenharmony_ciThis sample demonstrates how to use observer APIs to subscribe to events of network status, signal status, call status, cellular data, and SIM card status changes.
66e7c69efSopenharmony_ci
76e7c69efSopenharmony_ci![](./screenshots/device/observer-en.png)
86e7c69efSopenharmony_ci
96e7c69efSopenharmony_ci
106e7c69efSopenharmony_ci### Concepts
116e7c69efSopenharmony_ci
126e7c69efSopenharmony_ci`@ohos.telephony.observer`
136e7c69efSopenharmony_ci
146e7c69efSopenharmony_ci  A module that allows you to register observers to subscribe to events of mobile network, signal, call, and SIM card status changes.
156e7c69efSopenharmony_ci
166e7c69efSopenharmony_ci### Required Permissions
176e7c69efSopenharmony_ci
186e7c69efSopenharmony_ciThe following permission must be declared in the `module.json5` file:
196e7c69efSopenharmony_ci
206e7c69efSopenharmony_ci**ohos.permission.GET_NETWORK_INFO**: Obtains the network status.
216e7c69efSopenharmony_ci
226e7c69efSopenharmony_ci**ohos.permission.READ_CALL_LOG**: Obtains the call status.
236e7c69efSopenharmony_ci
246e7c69efSopenharmony_ci### How to Use
256e7c69efSopenharmony_ci
266e7c69efSopenharmony_ci1. Open the application and enable all event subscription switches.
276e7c69efSopenharmony_ci
286e7c69efSopenharmony_ci2. Enable or disable the mobile network once to trigger a network status change.
296e7c69efSopenharmony_ci
306e7c69efSopenharmony_ci3. Make a call to trigger a call status change.
316e7c69efSopenharmony_ci
326e7c69efSopenharmony_ci4. Remove and insert the SIM card to trigger a SIM card status and signal status change.
336e7c69efSopenharmony_ci
346e7c69efSopenharmony_ci5. Touch the **Details** button. A page is displayed, showing the related status change events.
356e7c69efSopenharmony_ci
366e7c69efSopenharmony_ci### Constraints
376e7c69efSopenharmony_ci
386e7c69efSopenharmony_ci1. This sample can only be run on standard-system devices.
396e7c69efSopenharmony_ci
406e7c69efSopenharmony_ci2. This sample demonstrates the stage model, which supports only API version 9.
416e7c69efSopenharmony_ci
426e7c69efSopenharmony_ci3. This sample requires DevEco Studio 3.1 Canary1 (Build Version: 3.1.0.100) to compile and run.
43