InCallService Class
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.
This service is implemented by an app that wishes to provide functionality for managing phone calls.
[Android.Runtime.Register("android/telecom/InCallService", ApiSince=23, DoNotGenerateAcw=true)]
public abstract class InCallService : Android.App.Service
[<Android.Runtime.Register("android/telecom/InCallService", ApiSince=23, DoNotGenerateAcw=true)>]
type InCallService = class
inherit Service
- Inheritance
- Attributes
Remarks
This service is implemented by an app that wishes to provide functionality for managing phone calls. <h2>Becoming the Default Phone App</h2> The default dialer/phone app is one which provides the in-call user interface while the device is in a call. It also provides the user with a means to initiate calls and see a history of calls on their device. A device is bundled with a system provided default dialer/phone app. The user may choose a single app to take over this role from the system app. An app which wishes to fulfill this role uses the android.app.role.RoleManager
to request that they fill the android.app.role.RoleManager#ROLE_DIALER
role.
The default phone app provides a user interface while the device is in a call, and the device is not in car mode (i.e. UiModeManager#getCurrentModeType()
is not android.content.res.Configuration#UI_MODE_TYPE_CAR
).
In order to fill the android.app.role.RoleManager#ROLE_DIALER
role, an app must meet a number of requirements: <ul> <li>It must handle the Intent#ACTION_DIAL
intent. This means the app must provide a dial pad UI for the user to initiate outgoing calls.</li> <li>It must fully implement the InCallService
API and provide both an incoming call UI, as well as an ongoing call UI.</li> </ul>
Note: If the app filling the android.app.role.RoleManager#ROLE_DIALER
returns a null
InCallService
during binding, the Telecom framework will automatically fall back to using the dialer app preloaded on the device. The system will display a notification to the user to let them know that their call was continued using the preloaded dialer app. Your app should never return a null
binding; doing so means it does not fulfil the requirements of android.app.role.RoleManager#ROLE_DIALER
.
Note: If your app fills android.app.role.RoleManager#ROLE_DIALER
and makes changes at runtime which cause it to no longer fulfil the requirements of this role, android.app.role.RoleManager
will automatically remove your app from the role and close your app. For example, if you use android.content.pm.PackageManager#setComponentEnabledSetting(ComponentName, int, int)
to programmatically disable the InCallService
your app declares in its manifest, your app will no longer fulfil the requirements expected of android.app.role.RoleManager#ROLE_DIALER
.
The preloaded dialer will ALWAYS be used when the user places an emergency call, even if your app fills the android.app.role.RoleManager#ROLE_DIALER
role. To ensure an optimal experience when placing an emergency call, the default dialer should ALWAYS use android.telecom.TelecomManager#placeCall(Uri, Bundle)
to place calls (including emergency calls). This ensures that the platform is able to verify that the request came from the default dialer. If a non-preloaded dialer app uses Intent#ACTION_CALL
to place an emergency call, it will be raised to the preloaded dialer app using Intent#ACTION_DIAL
for confirmation; this is a suboptimal user experience.
Below is an example manifest registration for an InCallService
. The meta-data TelecomManager#METADATA_IN_CALL_SERVICE_UI
indicates that this particular InCallService
implementation intends to replace the built-in in-call UI. The meta-data TelecomManager#METADATA_IN_CALL_SERVICE_RINGING
indicates that this InCallService
will play the ringtone for incoming calls. See below for more information on showing the incoming call UI and playing the ringtone in your app.
{@code
<service android:name="your.package.YourInCallServiceImplementation"
android:permission="android.permission.BIND_INCALL_SERVICE"
android:exported="true">
<meta-data android:name="android.telecom.IN_CALL_SERVICE_UI" android:value="true" />
<meta-data android:name="android.telecom.IN_CALL_SERVICE_RINGING"
android:value="true" />
<intent-filter>
<action android:name="android.telecom.InCallService"/>
</intent-filter>
</service>
}
<em>Note: You should NOT mark your InCallService
with the attribute android:exported="false"
; doing so can result in a failure to bind to your implementation during calls.</em>
In addition to implementing the InCallService
API, you must also declare an activity in your manifest which handles the Intent#ACTION_DIAL
intent. The example below illustrates how this is done:
{@code
<activity android:name="your.package.YourDialerActivity"
android:label="@string/yourDialerActivityLabel">
<intent-filter>
<action android:name="android.intent.action.DIAL" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.DIAL" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="tel" />
</intent-filter>
</activity>
}
When a user installs your application and runs it for the first time, you should use the android.app.role.RoleManager
to prompt the user to see if they would like your app to be the new default phone app. <p id="requestRole"> The code below shows how your app can request to become the default phone/dialer app:
{@code
private static final int REQUEST_ID = 1;
public void requestRole() {
RoleManager roleManager = (RoleManager) getSystemService(ROLE_SERVICE);
Intent intent = roleManager.createRequestRoleIntent(RoleManager.ROLE_DIALER);
startActivityForResult(intent, REQUEST_ID);
}
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
if (requestCode == REQUEST_ID) {
if (resultCode == android.app.Activity.RESULT_OK) {
// Your app is now the default dialer app
} else {
// Your app is not the default dialer app
}
}
}
}
<p id="companionInCallService"> <h3>Access to InCallService for Wearable Devices</h3> <ol> If your app is a third-party companion app and wants to access InCallService APIs, what your app could do are:
<ol> <li> Declare MANAGE_ONGOING_CALLS permission in your manifest <li> Associate with a physical wearable device via the android.companion.CompanionDeviceManager
API as a companion app. See: https://developer.android.com/guide/topics/connectivity/companion-device-pairing <li> Implement this InCallService with BIND_INCALL_SERVICE permission </ol> </ol>
</pre> <p id="incomingCallNotification"> <h3>Showing the Incoming Call Notification</h3> When your app receives a new incoming call via InCallService#onCallAdded(Call)
, it is responsible for displaying an incoming call UI for the incoming call. It should do this using android.app.NotificationManager
APIs to post a new incoming call notification.
Where your app declares the meta-data TelecomManager#METADATA_IN_CALL_SERVICE_RINGING
, it is responsible for playing the ringtone for incoming calls. Your app should create a android.app.NotificationChannel
which specifies the desired ringtone. For example:
<code>
NotificationChannel channel = new NotificationChannel(YOUR_CHANNEL_ID, "Incoming Calls",
NotificationManager.IMPORTANCE_MAX);
// other channel setup stuff goes here.
// We'll use the default system ringtone for our incoming call notification channel. You can
// use your own audio resource here.
Uri ringtoneUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_RINGTONE);
channel.setSound(ringtoneUri, new AudioAttributes.Builder()
// Setting the AudioAttributes is important as it identifies the purpose of your
// notification sound.
.setUsage(AudioAttributes.USAGE_NOTIFICATION_RINGTONE)
.setContentType(AudioAttributes.CONTENT_TYPE_SONIFICATION)
.build());
NotificationManager mgr = getSystemService(NotificationManager.class);
mgr.createNotificationChannel(channel);
</code>
When your app receives a new incoming call, it creates a android.app.Notification
for the incoming call and associates it with your incoming call notification channel. You can specify a android.app.PendingIntent
on the notification which will launch your full screen incoming call UI. The notification manager framework will display your notification as a heads-up notification if the user is actively using the phone. When the user is not using the phone, your full-screen incoming call UI is used instead. For example:
<code>{@code
// Create an intent which triggers your fullscreen incoming call user interface.
Intent intent = new Intent(Intent.ACTION_MAIN, null);
intent.setFlags(Intent.FLAG_ACTIVITY_NO_USER_ACTION | Intent.FLAG_ACTIVITY_NEW_TASK);
intent.setClass(context, YourIncomingCallActivity.class);
PendingIntent pendingIntent = PendingIntent.getActivity(context, 1, intent, PendingIntent.FLAG_MUTABLE_UNAUDITED);
// Build the notification as an ongoing high priority item; this ensures it will show as
// a heads up notification which slides down over top of the current content.
final Notification.Builder builder = new Notification.Builder(context);
builder.setOngoing(true);
builder.setPriority(Notification.PRIORITY_HIGH);
// Set notification content intent to take user to the fullscreen UI if user taps on the
// notification body.
builder.setContentIntent(pendingIntent);
// Set full screen intent to trigger display of the fullscreen UI when the notification
// manager deems it appropriate.
builder.setFullScreenIntent(pendingIntent, true);
// Setup notification content.
builder.setSmallIcon( yourIconResourceId );
builder.setContentTitle("Your notification title");
builder.setContentText("Your notification content.");
// Use builder.addAction(..) to add buttons to answer or reject the call.
NotificationManager notificationManager = mContext.getSystemService(
NotificationManager.class);
notificationManager.notify(YOUR_CHANNEL_ID, YOUR_TAG, YOUR_ID, builder.build());
}
Java documentation for android.telecom.InCallService
.
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.
Constructors
InCallService() | |
InCallService(IntPtr, JniHandleOwnership) |
Fields
AccessibilityService |
Use with |
AccountService |
Use with |
ActivityService |
Use with |
AlarmService |
Use with |
AppOpsService |
Use with |
AppSearchService |
Use with |
AppwidgetService |
Use with |
AudioService |
Use with |
BatteryService |
Use with |
BindAllowActivityStarts |
Obsolete.
Flag for |
BindExternalServiceLong |
Works in the same way as |
BindNotPerceptible |
Obsolete.
Flag for |
BindSharedIsolatedProcess |
Obsolete.
Flag for |
BiometricService |
Use with |
BlobStoreService |
Use with |
BluetoothService |
Use with |
BugreportService |
Service to capture a bugreport. (Inherited from Context) |
CameraService |
Use with |
CaptioningService |
Use with |
CarrierConfigService |
Use with |
ClipboardService |
Use with |
CompanionDeviceService |
Use with |
ConnectivityDiagnosticsService |
Use with |
ConnectivityService |
Use with |
ConsumerIrService |
Use with |
CredentialService |
Use with |
CrossProfileAppsService |
Use with |
DeviceIdDefault |
The default device ID, which is the ID of the primary (non-virtual) device. (Inherited from Context) |
DeviceIdInvalid |
Invalid device ID. (Inherited from Context) |
DeviceLockService |
Use with |
DevicePolicyService |
Use with |
DisplayHashService |
Use with |
DisplayService |
Use with |
DomainVerificationService |
Use with |
DownloadService |
Use with |
DropboxService |
Use with |
EuiccService |
Use with |
FileIntegrityService |
Use with |
FingerprintService |
Use with |
GameService |
Use with |
GrammaticalInflectionService |
Use with |
HardwarePropertiesService |
Use with |
HealthconnectService |
Use with |
InputMethodService |
Use with |
InputService |
Use with |
IpsecService |
Use with |
JobSchedulerService |
Use with |
KeyguardService |
Use with |
LauncherAppsService |
Use with |
LayoutInflaterService |
Use with |
LocaleService |
Use with |
LocationService |
Use with |
MediaCommunicationService |
Use with |
MediaMetricsService |
Use with |
MediaProjectionService |
Use with |
MediaRouterService |
Use with |
MediaSessionService |
Use with |
MidiService |
Use with |
NetworkStatsService |
Use with |
NfcService |
Use with |
NotificationService |
Use with |
NsdService |
Use with |
OverlayService |
Use with |
PeopleService |
Use with |
PerformanceHintService |
Use with |
PowerService |
Use with |
PrintService |
|
ReceiverExported |
Obsolete.
Flag for |
ReceiverNotExported |
Obsolete.
Flag for |
ReceiverVisibleToInstantApps |
Obsolete.
Flag for |
RestrictionsService |
Use with |
RoleService |
Use with |
SearchService |
Use with |
SensorService |
Use with |
ServiceInterface |
The |
ShortcutService |
Use with |
StatusBarService |
Use with |
StopForegroundDetach |
Obsolete.
Selector for |
StopForegroundLegacy |
Selector for |
StopForegroundRemove |
Obsolete.
Selector for |
StorageService |
Use with |
StorageStatsService |
Use with |
SystemHealthService |
Use with |
TelecomService |
Use with |
TelephonyImsService |
Use with |
TelephonyService |
Use with |
TelephonySubscriptionService |
Use with |
TextClassificationService |
Use with |
TextServicesManagerService |
Use with |
TvInputService |
Use with |
TvInteractiveAppService |
Use with |
UiModeService |
Use with |
UsageStatsService |
Use with |
UsbService |
Use with |
UserService |
Use with |
VibratorManagerService |
Use with |
VibratorService |
Use with |
VirtualDeviceService |
Use with |
VpnManagementService |
Use with |
WallpaperService |
Use with |
WifiAwareService |
Use with |
WifiP2pService |
Use with |
WifiRttRangingService |
Use with |
WifiService |
Use with |
WindowService |
Use with |
Properties
Application |
Return the application that owns this service. (Inherited from Service) |
ApplicationContext |
Return the context of the single, global Application object of the current process. (Inherited from ContextWrapper) |
ApplicationInfo |
Return the full application info for this context's package. (Inherited from ContextWrapper) |
Assets |
Return an AssetManager instance for your application's package. (Inherited from ContextWrapper) |
AttributionSource | (Inherited from Context) |
AttributionTag |
Attribution can be used in complex apps to logically separate parts of the app. (Inherited from Context) |
BaseContext | (Inherited from ContextWrapper) |
CacheDir |
Returns the absolute path to the application specific cache directory on the filesystem. (Inherited from ContextWrapper) |
CallAudioState |
Obtains the current phone call audio state. |
Calls |
Obtains the current list of |
Class |
Returns the runtime class of this |
ClassLoader |
Return a class loader you can use to retrieve classes in this package. (Inherited from ContextWrapper) |
CodeCacheDir |
Returns the absolute path to the application specific cache directory on the filesystem designed for storing cached code. (Inherited from ContextWrapper) |
ContentResolver |
Return a ContentResolver instance for your application's package. (Inherited from ContextWrapper) |
CurrentCallEndpoint |
Obtains the current CallEndpoint. |
DataDir | (Inherited from ContextWrapper) |
DeviceId |
Gets the device ID this context is associated with. (Inherited from Context) |
Display |
Get the display this context is associated with. (Inherited from Context) |
ExternalCacheDir |
Returns the absolute path to the directory on the primary external filesystem (that is somewhere on ExternalStorageDirectory where the application can place cache files it owns. (Inherited from ContextWrapper) |
FilesDir |
Returns the absolute path to the directory on the filesystem where files created with OpenFileOutput(String, FileCreationMode) are stored. (Inherited from ContextWrapper) |
ForegroundServiceType |
If the service has become a foreground service by calling
|
Handle |
The handle to the underlying Android instance. (Inherited from Object) |
IsDeviceProtectedStorage | (Inherited from ContextWrapper) |
IsRestricted |
Indicates whether this Context is restricted. (Inherited from Context) |
IsUiContext |
Returns |
JniIdentityHashCode | (Inherited from Object) |
JniPeerMembers | |
MainExecutor |
Return an |
MainLooper |
Return the Looper for the main thread of the current process. (Inherited from ContextWrapper) |
NoBackupFilesDir |
Returns the absolute path to the directory on the filesystem similar to FilesDir. (Inherited from ContextWrapper) |
ObbDir |
Return the primary external storage directory where this application's OBB files (if there are any) can be found. (Inherited from ContextWrapper) |
OpPackageName |
Return the package name that should be used for |
PackageCodePath |
Return the full path to this context's primary Android package. (Inherited from ContextWrapper) |
PackageManager |
Return PackageManager instance to find global package information. (Inherited from ContextWrapper) |
PackageName |
Return the name of this application's package. (Inherited from ContextWrapper) |
PackageResourcePath |
Return the full path to this context's primary Android package. (Inherited from ContextWrapper) |
Params |
Return the set of parameters which this Context was created with, if it
was created via |
PeerReference | (Inherited from Object) |
Resources |
Return a Resources instance for your application's package. (Inherited from ContextWrapper) |
Theme |
Return the Theme object associated with this Context. (Inherited from ContextWrapper) |
ThresholdClass | |
ThresholdType | |
Wallpaper | (Inherited from ContextWrapper) |
WallpaperDesiredMinimumHeight | (Inherited from ContextWrapper) |
WallpaperDesiredMinimumWidth | (Inherited from ContextWrapper) |
Methods
AttachBaseContext(Context) |
Set the base context for this ContextWrapper. (Inherited from ContextWrapper) |
BindService(Intent, Bind, IExecutor, IServiceConnection) |
Same as |
BindService(Intent, Context+BindServiceFlags, IExecutor, IServiceConnection) | (Inherited from Context) |
BindService(Intent, IServiceConnection, Bind) |
Connect to an application service, creating it if needed. (Inherited from ContextWrapper) |
BindService(Intent, IServiceConnection, Context+BindServiceFlags) | (Inherited from Context) |
BindServiceAsUser(Intent, IServiceConnection, Context+BindServiceFlags, UserHandle) | (Inherited from Context) |
BindServiceAsUser(Intent, IServiceConnection, Int32, UserHandle) |
Binds to a service in the given |
CanAddCall() |
Returns if the device can support additional calls. |
CheckCallingOrSelfPermission(String) |
Determine whether the calling process of an IPC or you have been granted a particular permission. (Inherited from ContextWrapper) |
CheckCallingOrSelfUriPermission(Uri, ActivityFlags) |
Determine whether the calling process of an IPC or you has been granted permission to access a specific URI. (Inherited from ContextWrapper) |
CheckCallingOrSelfUriPermissions(IList<Uri>, Int32) |
Determine whether the calling process of an IPC <em>or you</em> has been granted permission to access a list of URIs. (Inherited from Context) |
CheckCallingPermission(String) |
Determine whether the calling process of an IPC you are handling has been granted a particular permission. (Inherited from ContextWrapper) |
CheckCallingUriPermission(Uri, ActivityFlags) |
Determine whether the calling process and user ID has been granted permission to access a specific URI. (Inherited from ContextWrapper) |
CheckCallingUriPermissions(IList<Uri>, Int32) |
Determine whether the calling process and user ID has been granted permission to access a list of URIs. (Inherited from Context) |
CheckPermission(String, Int32, Int32) |
Determine whether the given permission is allowed for a particular process and user ID running in the system. (Inherited from ContextWrapper) |
CheckSelfPermission(String) | (Inherited from ContextWrapper) |
CheckUriPermission(Uri, Int32, Int32, ActivityFlags) |
Determine whether a particular process and user ID has been granted permission to access a specific URI. (Inherited from ContextWrapper) |
CheckUriPermission(Uri, String, String, Int32, Int32, ActivityFlags) |
Check both a Uri and normal permission. (Inherited from ContextWrapper) |
CheckUriPermissions(IList<Uri>, Int32, Int32, Int32) |
Determine whether a particular process and user ID has been granted permission to access a list of URIs. (Inherited from Context) |
ClearWallpaper() |
Obsolete.
(Inherited from ContextWrapper)
|
Clone() |
Creates and returns a copy of this object. (Inherited from Object) |
CreateAttributionContext(String) |
Return a new Context object for the current Context but attribute to a different tag. (Inherited from Context) |
CreateConfigurationContext(Configuration) |
Return a new Context object for the current Context but whose resources are adjusted to match the given Configuration. (Inherited from ContextWrapper) |
CreateContext(ContextParams) |
Creates a context with specific properties and behaviors. (Inherited from Context) |
CreateContextForSplit(String) | (Inherited from ContextWrapper) |
CreateDeviceContext(Int32) |
Returns a new |
CreateDeviceProtectedStorageContext() | (Inherited from ContextWrapper) |
CreateDisplayContext(Display) |
Return a new Context object for the current Context but whose resources are adjusted to match the metrics of the given Display. (Inherited from ContextWrapper) |
CreatePackageContext(String, PackageContextFlags) |
Return a new Context object for the given application name. (Inherited from ContextWrapper) |
CreateWindowContext(Display, Int32, Bundle) |
Creates a |
CreateWindowContext(Int32, Bundle) |
Creates a Context for a non-activity window. (Inherited from Context) |
DatabaseList() |
Returns an array of strings naming the private databases associated with this Context's application package. (Inherited from ContextWrapper) |
DeleteDatabase(String) |
Delete an existing private SQLiteDatabase associated with this Context's application package. (Inherited from ContextWrapper) |
DeleteFile(String) |
Delete the given private file associated with this Context's application package. (Inherited from ContextWrapper) |
DeleteSharedPreferences(String) | (Inherited from ContextWrapper) |
Dispose() | (Inherited from Object) |
Dispose(Boolean) | (Inherited from Object) |
Dump(FileDescriptor, PrintWriter, String[]) |
Print the Service's state into the given stream. (Inherited from Service) |
EnforceCallingOrSelfPermission(String, String) |
If neither you nor the calling process of an IPC you are handling has been granted a particular permission, throw a SecurityException. (Inherited from ContextWrapper) |
EnforceCallingOrSelfUriPermission(Uri, ActivityFlags, String) |
If the calling process of an IPC or you has not been granted permission to access a specific URI, throw SecurityException. (Inherited from ContextWrapper) |
EnforceCallingPermission(String, String) |
If the calling process of an IPC you are handling has not been granted a particular permission, throw a SecurityException. (Inherited from ContextWrapper) |
EnforceCallingUriPermission(Uri, ActivityFlags, String) |
If the calling process and user ID has not been granted permission to access a specific URI, throw SecurityException. (Inherited from ContextWrapper) |
EnforcePermission(String, Int32, Int32, String) |
If the given permission is not allowed for a particular process and user ID running in the system, throw a SecurityException. (Inherited from ContextWrapper) |
EnforceUriPermission(Uri, Int32, Int32, ActivityFlags, String) |
If a particular process and user ID has not been granted permission to access a specific URI, throw SecurityException. (Inherited from ContextWrapper) |
EnforceUriPermission(Uri, String, String, Int32, Int32, ActivityFlags, String) |
Enforce both a Uri and normal permission. (Inherited from ContextWrapper) |
Equals(Object) |
Indicates whether some other object is "equal to" this one. (Inherited from Object) |
FileList() |
Returns an array of strings naming the private files associated with this Context's application package. (Inherited from ContextWrapper) |
GetColor(Int32) |
Returns a color associated with a particular resource ID and styled for the current theme. (Inherited from Context) |
GetColorStateList(Int32) |
Returns a color state list associated with a particular resource ID and styled for the current theme. (Inherited from Context) |
GetDatabasePath(String) | (Inherited from ContextWrapper) |
GetDir(String, FileCreationMode) |
Retrieve, creating if needed, a new directory in which the application can place its own custom data files. (Inherited from ContextWrapper) |
GetDrawable(Int32) |
Returns a drawable object associated with a particular resource ID and styled for the current theme. (Inherited from Context) |
GetExternalCacheDirs() |
Returns absolute paths to application-specific directories on all external storage devices where the application can place cache files it owns. (Inherited from ContextWrapper) |
GetExternalFilesDir(String) |
Returns the absolute path to the directory on the primary external filesystem (that is somewhere on ExternalStorageDirectory) where the application can place persistent files it owns. (Inherited from ContextWrapper) |
GetExternalFilesDirs(String) |
Returns absolute paths to application-specific directories on all external storage devices where the application can place persistent files it owns. (Inherited from ContextWrapper) |
GetExternalMediaDirs() |
Obsolete.
Returns absolute paths to application-specific directories on all external storage devices where the application can place media files. (Inherited from ContextWrapper) |
GetFileStreamPath(String) |
Returns the absolute path on the filesystem where a file created with OpenFileOutput(String, FileCreationMode) is stored. (Inherited from ContextWrapper) |
GetHashCode() |
Returns a hash code value for the object. (Inherited from Object) |
GetObbDirs() |
Returns absolute paths to application-specific directories on all external storage devices where the application's OBB files (if there are any) can be found. (Inherited from ContextWrapper) |
GetSharedPreferences(String, FileCreationMode) |
Retrieve and hold the contents of the preferences file 'name', returning a SharedPreferences through which you can retrieve and modify its values. (Inherited from ContextWrapper) |
GetString(Int32, Object[]) |
Returns a localized string from the application's package's default string table. (Inherited from Context) |
GetString(Int32) |
Returns a localized string from the application's package's default string table. (Inherited from Context) |
GetSystemService(Class) |
Return the handle to a system-level service by class. (Inherited from Context) |
GetSystemService(String) |
Return the handle to a system-level service by name. (Inherited from ContextWrapper) |
GetSystemServiceName(Class) | (Inherited from ContextWrapper) |
GetText(Int32) |
Return a localized, styled CharSequence from the application's package's default string table. (Inherited from Context) |
GetTextFormatted(Int32) |
Return a localized, styled CharSequence from the application's package's default string table. (Inherited from Context) |
GrantUriPermission(String, Uri, ActivityFlags) |
Grant permission to access a specific Uri to another package, regardless of whether that package has general permission to access the Uri's content provider. (Inherited from ContextWrapper) |
JavaFinalize() |
Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. (Inherited from Object) |
MoveDatabaseFrom(Context, String) | (Inherited from ContextWrapper) |
MoveSharedPreferencesFrom(Context, String) | (Inherited from ContextWrapper) |
Notify() |
Wakes up a single thread that is waiting on this object's monitor. (Inherited from Object) |
NotifyAll() |
Wakes up all threads that are waiting on this object's monitor. (Inherited from Object) |
ObtainStyledAttributes(IAttributeSet, Int32[], Int32, Int32) |
Retrieve styled attribute information in this Context's theme. (Inherited from Context) |
ObtainStyledAttributes(IAttributeSet, Int32[]) |
Retrieve styled attribute information in this Context's theme. (Inherited from Context) |
ObtainStyledAttributes(Int32, Int32[]) |
Retrieve styled attribute information in this Context's theme. (Inherited from Context) |
ObtainStyledAttributes(Int32[]) |
Retrieve styled attribute information in this Context's theme. (Inherited from Context) |
OnAvailableCallEndpointsChanged(IList<CallEndpoint>) |
Called when the available CallEndpoint changes. |
OnBind(Intent) | |
OnBringToForeground(Boolean) |
Called to bring the in-call screen to the foreground. |
OnCallAdded(Call) |
Called when a |
OnCallAudioStateChanged(CallAudioState) |
Called when the audio state changes. |
OnCallEndpointChanged(CallEndpoint) |
Called when the current CallEndpoint changes. |
OnCallRemoved(Call) |
Called when a |
OnCanAddCallChanged(Boolean) |
Called when the ability to add more calls changes. |
OnConfigurationChanged(Configuration) |
Called by the system when the device configuration changes while your component is running. (Inherited from Service) |
OnConnectionEvent(Call, String, Bundle) |
Unused; to handle connection events issued by a |
OnCreate() |
Called by the system when the service is first created. (Inherited from Service) |
OnDestroy() |
Called by the system to notify a Service that it is no longer used and is being removed. (Inherited from Service) |
OnLowMemory() |
This is called when the overall system is running low on memory, and actively running processes should trim their memory usage. (Inherited from Service) |
OnMuteStateChanged(Boolean) |
Called when the mute state changes. |
OnRebind(Intent) |
Called when new clients have connected to the service, after it had
previously been notified that all had disconnected in its
|
OnSilenceRinger() |
Called to silence the ringer if a ringing call exists. |
OnStart(Intent, Int32) |
Obsolete.
This member is deprecated. (Inherited from Service) |
OnStartCommand(Intent, StartCommandFlags, Int32) |
Called by the system every time a client explicitly starts the service by calling
|
OnTaskRemoved(Intent) |
This is called if the service is currently running and the user has removed a task that comes from the service's application. (Inherited from Service) |
OnTimeout(Int32) |
Callback called on timeout for |
OnTrimMemory(TrimMemory) |
Called when the operating system has determined that it is a good time for a process to trim unneeded memory from its process. (Inherited from Service) |
OnUnbind(Intent) |
Called when all clients have disconnected from a particular interface published by the service. (Inherited from Service) |
OpenFileInput(String) |
Open a private file associated with this Context's application package for reading. (Inherited from ContextWrapper) |
OpenFileOutput(String, FileCreationMode) |
Open a private file associated with this Context's application package for writing. (Inherited from ContextWrapper) |
OpenOrCreateDatabase(String, FileCreationMode, SQLiteDatabase+ICursorFactory, IDatabaseErrorHandler) |
Open a new private SQLiteDatabase associated with this Context's application package. (Inherited from ContextWrapper) |
OpenOrCreateDatabase(String, FileCreationMode, SQLiteDatabase+ICursorFactory) |
Open a new private SQLiteDatabase associated with this Context's application package. (Inherited from ContextWrapper) |
PeekWallpaper() |
Obsolete.
(Inherited from ContextWrapper)
|
RegisterComponentCallbacks(IComponentCallbacks) |
Add a new |
RegisterDeviceIdChangeListener(IExecutor, IIntConsumer) |
Adds a new device ID changed listener to the |
RegisterReceiver(BroadcastReceiver, IntentFilter, ActivityFlags) |
Obsolete.
(Inherited from ContextWrapper)
|
RegisterReceiver(BroadcastReceiver, IntentFilter, ReceiverFlags) | (Inherited from Context) |
RegisterReceiver(BroadcastReceiver, IntentFilter, String, Handler, ActivityFlags) |
Obsolete.
(Inherited from ContextWrapper)
|
RegisterReceiver(BroadcastReceiver, IntentFilter, String, Handler, ReceiverFlags) | (Inherited from Context) |
RegisterReceiver(BroadcastReceiver, IntentFilter, String, Handler) |
Register to receive intent broadcasts, to run in the context of scheduler. (Inherited from ContextWrapper) |
RegisterReceiver(BroadcastReceiver, IntentFilter) |
Register a BroadcastReceiver to be run in the main activity thread. (Inherited from ContextWrapper) |
RemoveStickyBroadcast(Intent) |
Obsolete.
(Inherited from ContextWrapper)
|
RemoveStickyBroadcastAsUser(Intent, UserHandle) |
Obsolete.
(Inherited from ContextWrapper)
|
RequestBluetoothAudio(BluetoothDevice) |
Request audio routing to a specific bluetooth device. |
RequestCallEndpointChange(CallEndpoint, IExecutor, IOutcomeReceiver) |
Request audio routing to a specific CallEndpoint. |
RevokeSelfPermissionOnKill(String) |
Triggers the asynchronous revocation of a runtime permission. (Inherited from Context) |
RevokeSelfPermissionsOnKill(ICollection<String>) |
Triggers the revocation of one or more permissions for the calling package. (Inherited from Context) |
RevokeUriPermission(String, Uri, ActivityFlags) | (Inherited from ContextWrapper) |
RevokeUriPermission(Uri, ActivityFlags) |
Remove all permissions to access a particular content provider Uri that were previously added with M:Android.Content.Context.GrantUriPermission(System.String,Android.Net.Uri,Android.Net.Uri). (Inherited from ContextWrapper) |
SendBroadcast(Intent, String, Bundle) |
Broadcast the given intent to all interested BroadcastReceivers, allowing an optional required permission to be enforced. (Inherited from Context) |
SendBroadcast(Intent, String) |
Broadcast the given intent to all interested BroadcastReceivers, allowing an optional required permission to be enforced. (Inherited from ContextWrapper) |
SendBroadcast(Intent) |
Broadcast the given intent to all interested BroadcastReceivers. (Inherited from ContextWrapper) |
SendBroadcastAsUser(Intent, UserHandle, String) |
Version of SendBroadcast(Intent, String) that allows you to specify the user the broadcast will be sent to. (Inherited from ContextWrapper) |
SendBroadcastAsUser(Intent, UserHandle) |
Version of SendBroadcast(Intent) that allows you to specify the user the broadcast will be sent to. (Inherited from ContextWrapper) |
SendBroadcastWithMultiplePermissions(Intent, String[]) |
Broadcast the given intent to all interested BroadcastReceivers, allowing an array of required permissions to be enforced. (Inherited from Context) |
SendOrderedBroadcast(Intent, Int32, String, String, BroadcastReceiver, Handler, String, Bundle, Bundle) | (Inherited from ContextWrapper) |
SendOrderedBroadcast(Intent, String, BroadcastReceiver, Handler, Result, String, Bundle) |
Version of SendBroadcast(Intent) that allows you to receive data back from the broadcast. (Inherited from ContextWrapper) |
SendOrderedBroadcast(Intent, String, Bundle, BroadcastReceiver, Handler, Result, String, Bundle) |
Version of |
SendOrderedBroadcast(Intent, String, Bundle) |
Broadcast the given intent to all interested BroadcastReceivers, delivering them one at a time to allow more preferred receivers to consume the broadcast before it is delivered to less preferred receivers. (Inherited from Context) |
SendOrderedBroadcast(Intent, String, String, BroadcastReceiver, Handler, Result, String, Bundle) |
Version of
|
SendOrderedBroadcast(Intent, String) | (Inherited from ContextWrapper) |
SendOrderedBroadcastAsUser(Intent, UserHandle, String, BroadcastReceiver, Handler, Result, String, Bundle) | (Inherited from ContextWrapper) |
SendStickyBroadcast(Intent, Bundle) |
Perform a |
SendStickyBroadcast(Intent) |
Obsolete.
Perform a |
SendStickyBroadcastAsUser(Intent, UserHandle) |
Obsolete.
(Inherited from ContextWrapper)
|
SendStickyOrderedBroadcast(Intent, BroadcastReceiver, Handler, Result, String, Bundle) |
Obsolete.
(Inherited from ContextWrapper)
|
SendStickyOrderedBroadcastAsUser(Intent, UserHandle, BroadcastReceiver, Handler, Result, String, Bundle) |
Obsolete.
(Inherited from ContextWrapper)
|
SetAudioRoute(CallAudioRoute) |
Sets the audio route (speaker, bluetooth, etc. |
SetAudioRoute(VideoQuality) |
Obsolete.
Sets the audio route (speaker, bluetooth, etc. |
SetForeground(Boolean) |
This member is deprecated. (Inherited from Service) |
SetHandle(IntPtr, JniHandleOwnership) |
Sets the Handle property. (Inherited from Object) |
SetMuted(Boolean) |
Sets the microphone mute state. |
SetTheme(Int32) |
Set the base theme for this context. (Inherited from ContextWrapper) |
SetWallpaper(Bitmap) |
Obsolete.
(Inherited from ContextWrapper)
|
SetWallpaper(Stream) |
Obsolete.
(Inherited from ContextWrapper)
|
StartActivities(Intent[], Bundle) |
Launch multiple new activities. (Inherited from ContextWrapper) |
StartActivities(Intent[]) |
Same as StartActivities(Intent[], Bundle) with no options specified. (Inherited from ContextWrapper) |
StartActivity(Intent, Bundle) |
Launch a new activity. (Inherited from ContextWrapper) |
StartActivity(Intent) |
Same as StartActivity(Intent, Bundle) with no options specified. (Inherited from ContextWrapper) |
StartActivity(Type) | (Inherited from Context) |
StartForeground(Int32, Notification, ForegroundService) |
An overloaded version of |
StartForeground(Int32, Notification) |
If your service is started (running through |
StartForegroundService(Intent) | (Inherited from ContextWrapper) |
StartInstrumentation(ComponentName, String, Bundle) |
Start executing an Instrumentation class. (Inherited from ContextWrapper) |
StartIntentSender(IntentSender, Intent, ActivityFlags, ActivityFlags, Int32, Bundle) |
Like StartActivity(Intent, Bundle), but taking a IntentSender to start. (Inherited from ContextWrapper) |
StartIntentSender(IntentSender, Intent, ActivityFlags, ActivityFlags, Int32) | (Inherited from ContextWrapper) |
StartService(Intent) |
Request that a given application service be started. (Inherited from ContextWrapper) |
StopForeground(Boolean) |
Legacy version of |
StopForeground(StopForegroundFlags) |
Remove this service from foreground state, allowing it to be killed if more memory is needed. (Inherited from Service) |
StopSelf() |
Stop the service, if it was previously started. (Inherited from Service) |
StopSelf(Int32) |
Old version of |
StopSelfResult(Int32) |
Stop the service if the most recent time it was started was <var>startId</var>. (Inherited from Service) |
StopService(Intent) |
Request that a given application service be stopped. (Inherited from ContextWrapper) |
ToArray<T>() | (Inherited from Object) |
ToString() |
Returns a string representation of the object. (Inherited from Object) |
UnbindService(IServiceConnection) |
Disconnect from an application service. (Inherited from ContextWrapper) |
UnregisterComponentCallbacks(IComponentCallbacks) |
Remove a |
UnregisterDeviceIdChangeListener(IIntConsumer) |
Removes a device ID changed listener from the Context. (Inherited from Context) |
UnregisterFromRuntime() | (Inherited from Object) |
UnregisterReceiver(BroadcastReceiver) |
Unregister a previously registered BroadcastReceiver. (Inherited from ContextWrapper) |
UpdateServiceGroup(IServiceConnection, Int32, Int32) |
For a service previously bound with |
Wait() |
Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>. (Inherited from Object) |
Wait(Int64, Int32) |
Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed. (Inherited from Object) |
Wait(Int64) |
Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed. (Inherited from Object) |
Explicit Interface Implementations
IJavaPeerable.Disposed() | (Inherited from Object) |
IJavaPeerable.DisposeUnlessReferenced() | (Inherited from Object) |
IJavaPeerable.Finalized() | (Inherited from Object) |
IJavaPeerable.JniManagedPeerState | (Inherited from Object) |
IJavaPeerable.SetJniIdentityHashCode(Int32) | (Inherited from Object) |
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) | (Inherited from Object) |
IJavaPeerable.SetPeerReference(JniObjectReference) | (Inherited from Object) |
Extension Methods
JavaCast<TResult>(IJavaObject) |
Performs an Android runtime-checked type conversion. |
JavaCast<TResult>(IJavaObject) | |
GetJniTypeName(IJavaPeerable) |