Share via


TelephonyManager.SetSignalStrengthUpdateRequest Method

Definition

Set a SignalStrengthUpdateRequest to receive notification when signal quality measurements breach the specified thresholds.

[Android.Runtime.Register("setSignalStrengthUpdateRequest", "(Landroid/telephony/SignalStrengthUpdateRequest;)V", "GetSetSignalStrengthUpdateRequest_Landroid_telephony_SignalStrengthUpdateRequest_Handler", ApiSince=31)]
[Android.Runtime.RequiresPermission("android.permission.MODIFY_PHONE_STATE")]
public virtual void SetSignalStrengthUpdateRequest (Android.Telephony.SignalStrengthUpdateRequest request);
[<Android.Runtime.Register("setSignalStrengthUpdateRequest", "(Landroid/telephony/SignalStrengthUpdateRequest;)V", "GetSetSignalStrengthUpdateRequest_Landroid_telephony_SignalStrengthUpdateRequest_Handler", ApiSince=31)>]
[<Android.Runtime.RequiresPermission("android.permission.MODIFY_PHONE_STATE")>]
abstract member SetSignalStrengthUpdateRequest : Android.Telephony.SignalStrengthUpdateRequest -> unit
override this.SetSignalStrengthUpdateRequest : Android.Telephony.SignalStrengthUpdateRequest -> unit

Parameters

request
SignalStrengthUpdateRequest

the SignalStrengthUpdateRequest to be set into the System

Attributes

Remarks

Set a SignalStrengthUpdateRequest to receive notification when signal quality measurements breach the specified thresholds.

To be notified, set the signal strength update request and then register TelephonyManager#listen(PhoneStateListener, int) with PhoneStateListener#LISTEN_SIGNAL_STRENGTHS. The notification will arrive through PhoneStateListener#onSignalStrengthsChanged(SignalStrength).

To stop receiving the notification over the specified thresholds, pass the same SignalStrengthUpdateRequest object to #clearSignalStrengthUpdateRequest(SignalStrengthUpdateRequest).

System will clean up the SignalStrengthUpdateRequest if the caller process died without calling #clearSignalStrengthUpdateRequest(SignalStrengthUpdateRequest).

If this TelephonyManager object has been created with #createForSubscriptionId, applies to the given subId. Otherwise, applies to SubscriptionManager#getDefaultSubscriptionId(). To request for multiple subIds, pass a request object to each TelephonyManager object created with #createForSubscriptionId.

Requires Permission: android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE or that the calling app has carrier privileges (see TelephonyManager#hasCarrierPrivileges).

Note that the thresholds in the request will be used on a best-effort basis; the system may modify requests to multiplex various request sources or to optimize power consumption. The caller should not expect to be notified with the exactly the same thresholds.

Java documentation for android.telephony.TelephonyManager.setSignalStrengthUpdateRequest(android.telephony.SignalStrengthUpdateRequest).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to