ServiceInfo.ForegroundServiceTypeMicrophone Field
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Caution
This constant will be removed in the future version. Use Android.Content.PM.ForegroundService enum directly instead of this field.
Constant corresponding to microphone
in
the android.R.attr#foregroundServiceType
attribute.
[Android.Runtime.Register("FOREGROUND_SERVICE_TYPE_MICROPHONE", ApiSince=30)]
[System.Obsolete("This constant will be removed in the future version. Use Android.Content.PM.ForegroundService enum directly instead of this field.", true)]
public const Android.Content.PM.ForegroundService ForegroundServiceTypeMicrophone = 128;
[<Android.Runtime.Register("FOREGROUND_SERVICE_TYPE_MICROPHONE", ApiSince=30)>]
[<System.Obsolete("This constant will be removed in the future version. Use Android.Content.PM.ForegroundService enum directly instead of this field.", true)>]
val mutable ForegroundServiceTypeMicrophone : Android.Content.PM.ForegroundService
Field Value
Value = 128Implements
- Attributes
Remarks
Constant corresponding to microphone
in the android.R.attr#foregroundServiceType
attribute. Use the microphone device or record audio. For apps with targetSdkVersion
android.os.Build.VERSION_CODES#R
and above, a foreground service will not be able to access the microphone if this type is not specified in the manifest and in android.app.Service#startForeground(int, android.app.Notification, int)
.
Starting foreground service with this type from apps targeting API level android.os.Build.VERSION_CODES#UPSIDE_DOWN_CAKE
and later, will require permission android.Manifest.permission#FOREGROUND_SERVICE_MICROPHONE
and one of the following permissions: android.Manifest.permission#CAPTURE_AUDIO_OUTPUT
, android.Manifest.permission#RECORD_AUDIO
.
Java documentation for android.content.pm.ServiceInfo.FOREGROUND_SERVICE_TYPE_MICROPHONE
.
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.