- Programmer Help
- Call Screening on Android N
- Official Interpretation from android
- CallScreeningService
- Use of analysis in source code
- Use in cts code
- Call log
- The part of the incoming current flow related to incoming call filtering
- Делаем свой Google Call Screening на основе Voximplant и Dialogflow
- Архитектура
- Реализация
- Простой бэкенд на NodeJS
- Клиент
- Ответ на входящий вызов с помощью android.телеком и InCallService
- Call Screening Service Class
- Definition
- Remarks
- Constructors
- Fields
- Properties
- Methods
- Explicit Interface Implementations
- Extension Methods
Programmer Help
Where programmers get help
Call Screening on Android N
Official Interpretation from android
Android 7.0 allows the default phone app to screen incoming calls. The phone app does this by implementing the new CallScreeningService, which allows the phone app to perform a number of actions based on an incoming call’s Call.Details, such as:
- Reject the incoming call
- Do not allow the call to the call log
- Do not show the user a notification for the call
For more information, see the reference documentation for CallScreeningService.
Android 7.0 allows default mobile applications to filter incoming calls. The way mobile applications do this is to implement the new CallScreening Service, which allows mobile applications to be caller-based. Call.Details To perform a large number of operations, such as:
- do-not-call
- Calls are not allowed to reach the call record
- Do not display caller notification to users
For more information, see Downloadable API reference Android. telecom. CallScreening Service.
CallScreeningService
public abstract class CallScreeningService
extends Service
java.lang.Object | ||||
↳ | android.content.Context | |||
↳ | android.content.ContextWrapper | |||
↳ | android.app.Service | |||
↳ | android.telecom.CallScreeningService |
This service can be implemented by the default dialer (see getDefaultDialerPackage()) to allow or disallow incoming calls before they are shown to a user.
Below is an example manifest registration for a CallScreeningService.
Use of analysis in source code
Use in cts code
Call log
The part of the incoming current flow related to incoming call filtering
Источник
Делаем свой Google Call Screening на основе Voximplant и Dialogflow
Архитектура
Предлагаю не тратить время на объяснения, как работают Voximplant и Dialogflow, при желании вы легко найдете информацию в интернете. Так что давайте познакомимся с самой концепцией нашего Call Screening.
Предположим, что у вас уже есть некий номер телефона, которым вы пользуетесь ежедневно и на который вы получаете важные звонки. В таком случае нам понадобится второй номер, который будет указан везде – в почте, на визитке, когда вы заполняете онлайн-формы и т.д. Этот номер будет подключен к системе обработки естественного языка (в нашем случае это Dialogflow) и переадресовывать звонки на ваш главный номер, только если вы этого захотите. В виде схемы это выглядит так (картинка кликабельна):
Понимая архитектуру, мы можем взяться за реализацию, но с одной оговоркой: мы не будем делать мобильное приложение, чтобы показать диалог между Dialogflow и входящим абонентом, мы создадим простое веб-приложение с рендером диалога, чтобы наглядно показать принцип работы Call Screening. В этом приложении будет кнопка Intervene, по нажатию которой Voximplant будет соединять входящего абонента с набираемым абонентом, если последний решил поговорить сам.
Реализация
Войдите в свой аккаунт Voximplant и создайте новое приложение, например, screening:
Откройте раздел «Номера» и купите номер, который будет работать в качестве посредника:
Далее зайдите в приложение screening, в раздел «Номера», вкладка «Доступные». Здесь вы увидите только что купленный номер. Привяжите его к приложению с помощью кнопки «Прикрепить» – в появившемся окне оставьте все значения по умолчанию и нажмите «Прикрепить».
Находясь внутри приложения, перейдите на вкладку «Сценарии» и создайте сценарий myscreening – в нем мы используем код из статьи How to use Dialogflow Connector. При этом код будет немного изменен, потому что нам нужно «видеть» диалог между звонящим и ассистентом; весь код можно взять тут.
ВНИМАНИЕ: вам нужно будет изменить значение переменной server на имя вашего ngrok-сервера (подробности про ngrok будут чуть ниже). Также подставьте свои значения на 31 строке, где your phone number – это ваш главный номер (например, личный мобильный), а voximplant number – номер, который вы недавно купили.
Вызов callPSTN произойдет в тот момент, когда вы решите ворваться в разговор и лично побеседовать со входящим абонентом.
После того, как вы сохраните сценарий, вам нужно привязать его к купленному номеру. Для этого, все еще находясь внутри вашего приложения, перейдите на вкладку «Роутинг», чтобы создать новое правило – кнопка «Новое правило» в правом верхнем углу. Укажите имя (например, allcalls), оставьте маску по умолчанию (.* – что означает, что все входящие звонки будут обрабатываться сценариями, выбранными для этого правила) и укажите сценарий myscreening.
Отныне номер телефона привязан к сценарию. Последнее, что необходимо сделать – привязать бота к приложению. Для этого перейдите на вкладку «Dialogflow-коннектор», нажмите кнопку «Добавить Dialogflow агент» в правом верхнем углу и загрузите JSON-файл вашего агента Dialogflow.
Если вам нужен агент для примера/тестирования, то можете взять нашего по этой ссылке: github.com/aylarov/callscreening/tree/master/dialogflow. Только не требуйте от него многого, это всего лишь пример, который вы вольны переделывать как вам захочется и смело делиться результатами 🙂
Простой бэкенд на NodeJS
Давайте развернем простенький бэкенд на ноде, например, такой:
github.com/aylarov/callscreening/tree/master/nodejs
Это обычное приложение, которое требует всего двух команд для запуска:
Сервер запустится на 3000 порте вашей машины, поэтому чтобы соединить его с облаком Voximplant, мы используем утилиту ngrok. Когда вы установите ngrok, запустите его командой:
Вы увидите доменное имя, которое ngrok сгенерировал для вашего локального сервера – скопируйте его и подставьте в переменную server.
Клиент
Клиентское приложение выглядит как простой чат, который вы можете забрать отсюда.
Просто скопируйте все файлы в какую-нибудь директорию на вашем веб-сервере и оно будет работать. В файле script.js замените значение переменной server на доменное имя ngrok, а значение переменной callee – на номер, который вы купили. Сохраните файл и запустите приложение в браузере. Если все в порядке, то вы увидите WebSocket-соединение в панели разработчика.
Увидеть приложение в действии можно на этом видео:
Источник
Ответ на входящий вызов с помощью android.телеком и InCallService
начиная с API 21, Google добавляет функции в android.телеком!—5—> в целом, особенно путем реализации большего количества членов TelecomManager и . Этот последний должен позволить несистемным, сторонним приложениям предоставлять и заменять функциональность приложения системных вызовов на экране вызова — окне, которое появляется и позволяет действовать на EXTRA_STATE_OFFHOOK или EXTRA_STATE_RINGING трансляции (т. е. входящие и исходящие телефонные звонки).
В настоящее время только этот экран имеет полный контроль над звонками и активными вызовами и связанными системными обратными вызовами с мелкозернистой информацией с помощью root-restricted MODIFY_PHONE_STATE разрешение и много защищенного кода AOSP, даже недоступного для отражения. Это, в частности, один из самых измененных фрагментов кода в ароматах ROM разных производителей, вместе с пусковой установкой, контактами и камерой.
Это все очень красиво, но.
как сделать вы действительно разрабатываете сторонний InCallService?
- как вы получаете уведомление о, и приобретать экземпляры GSM-звонков
- как ответить на эти вызовы
- каков жизненный цикл обратных вызовов этого класса
- предоставляет ли Google какой-либо фактический учебник для этого, что я не нашел
Я не буду спрашивать ответы на все из них сразу, но любой один ответ, вероятно партнеры по другим вопросам. Это широко, но внутренне это должно быть: в интернете нет примера, на который я наткнулся, кроме AOSP-кода, и этот код основан на предположении о привилегиях root, что делает его непригодным для сторонних целей разработки приложений.
Источник
Call Screening Service Class
Definition
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 can be implemented by the default dialer (see TelecomManager#getDefaultDialerPackage() ) or a third party app to allow or disallow incoming calls before they are shown to a user.
Remarks
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
Fields
Use with #getSystemService(String) to retrieve a android.view.accessibility.AccessibilityManager for giving the user feedback for UI events through the registered event listeners.
(Inherited from Context)
Use with #getSystemService(String) to retrieve a android.accounts.AccountManager for receiving intents at a time of your choosing.
(Inherited from Context)
Use with #getSystemService(String) to retrieve a android.app.ActivityManager for interacting with the global system state.
(Inherited from Context)
Use with #getSystemService(String) to retrieve a android.app.AlarmManager for receiving intents at a time of your choosing.
(Inherited from Context)
Use with #getSystemService(String) to retrieve a android.app.AppOpsManager for tracking application operations on the device.
(Inherited from Context)
Use with #getSystemService(String) to retrieve an android.app.appsearch.AppSearchManager for indexing and querying app data managed by the system.
(Inherited from Context)
Use with #getSystemService(String) to retrieve a android.appwidget.AppWidgetManager for accessing AppWidgets.
(Inherited from Context)
Use with #getSystemService(String) to retrieve a android.media.AudioManager for handling management of volume, ringer modes and audio routing.
(Inherited from Context)
Use with #getSystemService(String) to retrieve a android.os.BatteryManager for managing battery state.
(Inherited from Context)
Flag for #bindService : If binding from an app that is visible or user-perceptible, lower the target service’s importance to below the perceptible level.
(Inherited from Context)
Use with #getSystemService(String) to retrieve a android.hardware.biometrics.BiometricManager for handling biometric and PIN/pattern/password authentication.
(Inherited from Context)
Use with #getSystemService(String) to retrieve a android.app.blob.BlobStoreManager for contributing and accessing data blobs from the blob store maintained by the system.
(Inherited from Context)
Use with #getSystemService(String) to retrieve a android.bluetooth.BluetoothManager for using Bluetooth.
(Inherited from Context)
Service to capture a bugreport.
(Inherited from Context)
Use with #getSystemService(String) to retrieve a android.hardware.camera2.CameraManager for interacting with camera devices.
(Inherited from Context)
Use with #getSystemService(String) to retrieve a android.view.accessibility.CaptioningManager for obtaining captioning properties and listening for changes in captioning preferences.
(Inherited from Context)
Use with #getSystemService(String) to retrieve a android.telephony.CarrierConfigManager for reading carrier configuration values.
(Inherited from Context)
Use with #getSystemService(String) to retrieve a android.content.ClipboardManager for accessing and modifying the contents of the global clipboard.
(Inherited from Context)
Use with #getSystemService(String) to retrieve a android.companion.CompanionDeviceManager for managing companion devices
(Inherited from Context)
Use with #getSystemService(String) to retrieve a android.net.ConnectivityDiagnosticsManager for performing network connectivity diagnostics as well as receiving network connectivity information from the system.
(Inherited from Context)
Use with #getSystemService(String) to retrieve a android.net.ConnectivityManager for handling management of network connections.
(Inherited from Context)
Use with #getSystemService(String) to retrieve a android.hardware.ConsumerIrManager for transmitting infrared signals from the device.
(Inherited from Context)
Use with #getSystemService(String) to retrieve a android.content.pm.CrossProfileApps for cross profile operations.
(Inherited from Context)
Use with #getSystemService(String) to retrieve a android.app.admin.DevicePolicyManager for working with global device policy management.
(Inherited from Context)
Use with #getSystemService(String) to access android.view.displayhash.DisplayHashManager to handle display hashes.
(Inherited from Context)
Use with #getSystemService(String) to retrieve a android.hardware.display.DisplayManager for interacting with display devices.
(Inherited from Context)
Use with #getSystemService(String) to access android.content.pm.verify.domain.DomainVerificationManager to retrieve approval and user state for declared web domains.
(Inherited from Context)
Use with #getSystemService(String) to retrieve a android.app.DownloadManager for requesting HTTP downloads.
(Inherited from Context)
Use with #getSystemService(String) to retrieve a android.os.DropBoxManager instance for recording diagnostic logs.
(Inherited from Context)
Use with #getSystemService(String) to retrieve a android.telephony.euicc.EuiccManager to manage the device eUICC (embedded SIM).
(Inherited from Context)
Use with #getSystemService(String) to retrieve an android.security.FileIntegrityManager .
(Inherited from Context)
Use with #getSystemService(String) to retrieve a android.hardware.fingerprint.FingerprintManager for handling management of fingerprints.
(Inherited from Context)
Use with #getSystemService(String) to retrieve a GameManager .
(Inherited from Context)
Use with #getSystemService(String) to retrieve a android.os.HardwarePropertiesManager for accessing the hardware properties service.
(Inherited from Context)
Use with #getSystemService(String) to retrieve a android.view.inputmethod.InputMethodManager for accessing input methods.
(Inherited from Context)
Use with #getSystemService(String) to retrieve a android.hardware.input.InputManager for interacting with input devices.
(Inherited from Context)
Use with #getSystemService(String) to retrieve a android.net.IpSecManager for encrypting Sockets or Networks with IPSec.
(Inherited from Context)
Use with #getSystemService(String) to retrieve a android.app.job.JobScheduler instance for managing occasional background tasks.
(Inherited from Context)
Use with #getSystemService(String) to retrieve a android.app.KeyguardManager for controlling keyguard.
(Inherited from Context)
Use with #getSystemService(String) to retrieve a android.content.pm.LauncherApps for querying and monitoring launchable apps across profiles of a user.
(Inherited from Context)
Use with #getSystemService(String) to retrieve a android.view.LayoutInflater for inflating layout resources in this context.
(Inherited from Context)
Use with #getSystemService(String) to retrieve a android.location.LocationManager for controlling location updates.
(Inherited from Context)
Use with #getSystemService(String) to retrieve a android.media.MediaCommunicationManager for managing android.media.MediaSession2 .
(Inherited from Context)
Use with #getSystemService(String) to retrieve a android.media.metrics.MediaMetricsManager for interacting with media metrics on the device.
(Inherited from Context)
Use with #getSystemService(String) to retrieve a android.media.projection.MediaProjectionManager instance for managing media projection sessions.
(Inherited from Context)
Use with #getSystemService to retrieve a android.media.MediaRouter for controlling and managing routing of media.
(Inherited from Context)
Use with #getSystemService(String) to retrieve a android.media.session.MediaSessionManager for managing media Sessions.
(Inherited from Context)
Use with #getSystemService(String) to retrieve a android.media.midi.MidiManager for accessing the MIDI service.
(Inherited from Context)
Use with #getSystemService(String) to retrieve a android.app.usage.NetworkStatsManager for querying network usage stats.
(Inherited from Context)
Use with #getSystemService(String) to retrieve a android.nfc.NfcManager for using NFC.
(Inherited from Context)
Use with #getSystemService(String) to retrieve a android.app.NotificationManager for informing the user of background events.
(Inherited from Context)
Use with #getSystemService(String) to retrieve a android.net.nsd.NsdManager for handling management of network service discovery
(Inherited from Context)
Use with #getSystemService(String) to access a PeopleManager to interact with your published conversations.
(Inherited from Context)
Use with #getSystemService(String) to retrieve a android.os.PerformanceHintManager for accessing the performance hinting service.
(Inherited from Context)
Use with #getSystemService(String) to retrieve a android.os.PowerManager for controlling power management, including «wake locks,» which let you keep the device on while you’re running long tasks.
(Inherited from Context)
android.print.PrintManager for printing and managing printers and print tasks.
(Inherited from Context)
Flag for #registerReceiver : The receiver can receive broadcasts from Instant Apps.
(Inherited from Context)
Use with #getSystemService(String) to retrieve a android.content.RestrictionsManager for retrieving application restrictions and requesting permissions for restricted operations.
(Inherited from Context)
Use with #getSystemService(String) to retrieve a android.app.role.RoleManager for managing roles.
(Inherited from Context)
Use with #getSystemService(String) to retrieve a android.app.SearchManager for handling searches.
(Inherited from Context)
Use with #getSystemService(String) to retrieve a android.hardware.SensorManager for accessing sensors.
(Inherited from Context)
The Intent that must be declared as handled by the service.
Use with #getSystemService(String) to retrieve a android.content.pm.ShortcutManager for accessing the launcher shortcut service.
(Inherited from Context)
Flag for #stopForeground(int) : if set, the notification previously provided to #startForeground will be detached from the service.
(Inherited from Service)
Flag for #stopForeground(int) : if set, the notification previously provided to #startForeground will be removed.
(Inherited from Service)
Use with #getSystemService(String) to retrieve a android.os.storage.StorageManager for accessing system storage functions.
(Inherited from Context)
Use with #getSystemService(String) to retrieve a android.app.usage.StorageStatsManager for accessing system storage statistics.
(Inherited from Context)
Use with #getSystemService(String) to retrieve a android.os.health.SystemHealthManager for accessing system health (battery, power, memory, etc) metrics.
(Inherited from Context)
Use with #getSystemService(String) to retrieve a android.telecom.TelecomManager to manage telecom-related features of the device.
(Inherited from Context)
Use with #getSystemService(String) to retrieve an android.telephony.ims.ImsManager .
(Inherited from Context)
Use with #getSystemService(String) to retrieve a android.telephony.TelephonyManager for handling management the telephony features of the device.
(Inherited from Context)
Use with #getSystemService(String) to retrieve a android.telephony.SubscriptionManager for handling management the telephony subscriptions of the device.
(Inherited from Context)
Use with #getSystemService(String) to retrieve a TextClassificationManager for text classification services.
(Inherited from Context)
Use with #getSystemService(String) to retrieve a android.view.textservice.TextServicesManager for accessing text services.
(Inherited from Context)
Use with #getSystemService(String) to retrieve a android.media.tv.TvInputManager for interacting with TV inputs on the device.
(Inherited from Context)
Use with #getSystemService(String) to retrieve a android.app.UiModeManager for controlling UI modes.
(Inherited from Context)
Use with #getSystemService(String) to retrieve a android.app.usage.UsageStatsManager for querying device usage stats.
(Inherited from Context)
Use with #getSystemService(String) to retrieve a android.hardware.usb.UsbManager for access to USB devices (as a USB host) and for controlling this device’s behavior as a USB device.
(Inherited from Context)
Use with #getSystemService(String) to retrieve a android.os.UserManager for managing users on devices that support multiple users.
(Inherited from Context)
Use with #getSystemService(String) to retrieve a android.os.VibratorManager for accessing the device vibrators, interacting with individual ones and playing synchronized effects on multiple vibrators.
(Inherited from Context)
Use with #getSystemService(String) to retrieve a android.os.Vibrator for interacting with the vibration hardware.
(Inherited from Context)
Use with #getSystemService(String) to retrieve a android.net.VpnManager to manage profiles for the platform built-in VPN.
(Inherited from Context)
Use with #getSystemService(String) to retrieve a com.
(Inherited from Context)
Use with #getSystemService(String) to retrieve a android.net.wifi.aware.WifiAwareManager for handling management of Wi-Fi Aware.
(Inherited from Context)
Use with #getSystemService(String) to retrieve a android.net.wifi.p2p.WifiP2pManager for handling management of Wi-Fi peer-to-peer connections.
(Inherited from Context)
Use with #getSystemService(String) to retrieve a android.net.wifi.rtt.WifiRttManager for ranging devices with wifi.
(Inherited from Context)
Use with #getSystemService(String) to retrieve a android.net.wifi.WifiManager for handling management of Wi-Fi access.
(Inherited from Context)
Use with #getSystemService(String) to retrieve a android.view.WindowManager for accessing the system’s window manager.
(Inherited from Context)
Properties
Return the application that owns this service.
(Inherited from Service)
Return the context of the single, global Application object of the current process.
(Inherited from ContextWrapper)
Return the full application info for this context’s package.
(Inherited from ContextWrapper)
Return an AssetManager instance for your application’s package.
(Inherited from ContextWrapper)
Attribution can be used in complex apps to logically separate parts of the app.
(Inherited from Context)
Returns the absolute path to the application specific cache directory on the filesystem.
(Inherited from ContextWrapper)
Returns the runtime class of this Object .
(Inherited from Object)
Return a class loader you can use to retrieve classes in this package.
(Inherited from ContextWrapper)
Returns the absolute path to the application specific cache directory on the filesystem designed for storing cached code.
(Inherited from ContextWrapper)
Return a ContentResolver instance for your application’s package.
(Inherited from ContextWrapper)
Get the display this context is associated with.
(Inherited from Context)
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)
Returns the absolute path to the directory on the filesystem where files created with OpenFileOutput(String, FileCreationMode) are stored.
(Inherited from ContextWrapper)
If the service has become a foreground service by calling #startForeground(int, Notification) or #startForeground(int, Notification, int) , #getForegroundServiceType() returns the current foreground service type.
(Inherited from Service)
The handle to the underlying Android instance.
(Inherited from Object)
Indicates whether this Context is restricted.
(Inherited from Context)
Returns true if the context is a UI context which can access UI components such as WindowManager , android.view.LayoutInflater LayoutInflater or android.app.WallpaperManager WallpaperManager .
(Inherited from Context)
Return an Executor that will run enqueued tasks on the main thread associated with this context.
(Inherited from Context)
Return the Looper for the main thread of the current process.
(Inherited from ContextWrapper)
Returns the absolute path to the directory on the filesystem similar to FilesDir.
(Inherited from ContextWrapper)
Return the primary external storage directory where this application’s OBB files (if there are any) can be found.
(Inherited from ContextWrapper)
Return the package name that should be used for android.app.AppOpsManager calls from this context, so that app ops manager’s uid verification will work with the name.
(Inherited from Context)
Return the full path to this context’s primary Android package.
(Inherited from ContextWrapper)
Return PackageManager instance to find global package information.
(Inherited from ContextWrapper)
Return the name of this application’s package.
(Inherited from ContextWrapper)
Return the full path to this context’s primary Android package.
(Inherited from ContextWrapper)
Return the set of parameters which this Context was created with, if it was created via #createContext(ContextParams) .
(Inherited from Context)
Return a Resources instance for your application’s package.
(Inherited from ContextWrapper)
Return the Theme object associated with this Context.
(Inherited from ContextWrapper)
Methods
Set the base context for this ContextWrapper.
(Inherited from ContextWrapper)
Same as #bindService(Intent, ServiceConnection, int) with executor to control ServiceConnection callbacks.
(Inherited from Context)
Connect to an application service, creating it if needed.
(Inherited from ContextWrapper)
Determine whether the calling process of an IPC or you have been granted a particular permission.
(Inherited from ContextWrapper)
Determine whether the calling process of an IPC or you has been granted permission to access a specific URI.
(Inherited from ContextWrapper)
Determine whether the calling process of an IPC or you has been granted permission to access a list of URIs.
(Inherited from Context)
Determine whether the calling process of an IPC you are handling has been granted a particular permission.
(Inherited from ContextWrapper)
Determine whether the calling process and user ID has been granted permission to access a specific URI.
(Inherited from ContextWrapper)
Determine whether the calling process and user ID has been granted permission to access a list of URIs.
(Inherited from Context)
Determine whether the given permission is allowed for a particular process and user ID running in the system.
(Inherited from ContextWrapper)
Determine whether a particular process and user ID has been granted permission to access a specific URI.
(Inherited from ContextWrapper)
Check both a Uri and normal permission.
(Inherited from ContextWrapper)
Determine whether a particular process and user ID has been granted permission to access a list of URIs.
(Inherited from Context)
Creates and returns a copy of this object.
(Inherited from Object)
Return a new Context object for the current Context but attribute to a different tag.
(Inherited from Context)
Return a new Context object for the current Context but whose resources are adjusted to match the given Configuration.
(Inherited from ContextWrapper)
Creates a context with specific properties and behaviors.
(Inherited from Context)
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)
Return a new Context object for the given application name.
(Inherited from ContextWrapper)
Creates a Context for a non-activity window.
(Inherited from Context)
Creates a Context for a non-activity window.
(Inherited from Context)
Returns an array of strings naming the private databases associated with this Context’s application package.
(Inherited from ContextWrapper)
Delete an existing private SQLiteDatabase associated with this Context’s application package.
(Inherited from ContextWrapper)
Delete the given private file associated with this Context’s application package.
(Inherited from ContextWrapper)
Print the Service’s state into the given stream.
(Inherited from Service)
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)
If the calling process of an IPC or you has not been granted permission to access a specific URI, throw SecurityException.
(Inherited from ContextWrapper)
If the calling process of an IPC you are handling has not been granted a particular permission, throw a SecurityException.
(Inherited from ContextWrapper)
If the calling process and user ID has not been granted permission to access a specific URI, throw SecurityException.
(Inherited from ContextWrapper)
If the given permission is not allowed for a particular process and user ID running in the system, throw a SecurityException.
(Inherited from ContextWrapper)
If a particular process and user ID has not been granted permission to access a specific URI, throw SecurityException.
(Inherited from ContextWrapper)
Enforce both a Uri and normal permission.
(Inherited from ContextWrapper)
Indicates whether some other object is «equal to» this one.
(Inherited from Object)
Returns an array of strings naming the private files associated with this Context’s application package.
(Inherited from ContextWrapper)
Returns a color associated with a particular resource ID and styled for the current theme.
(Inherited from Context)
Returns a color state list associated with a particular resource ID and styled for the current theme.
(Inherited from Context)
Retrieve, creating if needed, a new directory in which the application can place its own custom data files.
(Inherited from ContextWrapper)
Returns a drawable object associated with a particular resource ID and styled for the current theme.
(Inherited from Context)
Returns absolute paths to application-specific directories on all external storage devices where the application can place cache files it owns.
(Inherited from ContextWrapper)
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)
Returns absolute paths to application-specific directories on all external storage devices where the application can place persistent files it owns.
(Inherited from ContextWrapper)
Returns absolute paths to application-specific directories on all external storage devices where the application can place media files.
(Inherited from ContextWrapper)
Returns the absolute path on the filesystem where a file created with OpenFileOutput(String, FileCreationMode) is stored.
(Inherited from ContextWrapper)
Returns a hash code value for the object.
(Inherited from Object)
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)
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)
Returns a localized string from the application’s package’s default string table.
(Inherited from Context)
Returns a localized string from the application’s package’s default string table.
(Inherited from Context)
Return the handle to a system-level service by class.
(Inherited from Context)
Return the handle to a system-level service by name.
(Inherited from ContextWrapper)
Return a localized, styled CharSequence from the application’s package’s default string table.
(Inherited from Context)
Return a localized, styled CharSequence from the application’s package’s default string table.
(Inherited from Context)
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)
Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
(Inherited from Object)
Wakes up a single thread that is waiting on this object’s monitor.
(Inherited from Object)
Wakes up all threads that are waiting on this object’s monitor.
(Inherited from Object)
Retrieve styled attribute information in this Context’s theme.
(Inherited from Context)
Retrieve styled attribute information in this Context’s theme.
(Inherited from Context)
Retrieve styled attribute information in this Context’s theme.
(Inherited from Context)
Retrieve styled attribute information in this Context’s theme.
(Inherited from Context)
Called by the system when the device configuration changes while your component is running.
(Inherited from Service)
Called by the system when the service is first created.
(Inherited from Service)
Called by the system to notify a Service that it is no longer used and is being removed.
(Inherited from Service)
This is called when the overall system is running low on memory, and actively running processes should trim their memory usage.
(Inherited from Service)
Called when new clients have connected to the service, after it had previously been notified that all had disconnected in its #onUnbind .
(Inherited from Service)
Called when a new incoming or outgoing call is added.
Called by the system every time a client explicitly starts the service by calling android.content.Context#startService , providing the arguments it supplied and a unique integer token representing the start request.
(Inherited from Service)
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)
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)
Called when all clients have disconnected from a particular interface published by the service.
(Inherited from Service)
Open a private file associated with this Context’s application package for reading.
(Inherited from ContextWrapper)
Open a private file associated with this Context’s application package for writing.
(Inherited from ContextWrapper)
Open a new private SQLiteDatabase associated with this Context’s application package.
(Inherited from ContextWrapper)
Open a new private SQLiteDatabase associated with this Context’s application package.
(Inherited from ContextWrapper)
Add a new ComponentCallbacks to the base application of the Context, which will be called at the same times as the ComponentCallbacks methods of activities and other components are called.
(Inherited from Context)
Register a BroadcastReceiver to be run in the main activity thread.
(Inherited from ContextWrapper)
Register to receive intent broadcasts, to run in the context of scheduler .
(Inherited from ContextWrapper)
Responds to the given incoming call, either allowing it, silencing it or disallowing it.
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)
Broadcast the given intent to all interested BroadcastReceivers.
(Inherited from ContextWrapper)
Broadcast the given intent to all interested BroadcastReceivers, allowing an optional required permission to be enforced.
(Inherited from ContextWrapper)
Version of SendBroadcast(Intent) that allows you to specify the user the broadcast will be sent to.
(Inherited from ContextWrapper)
Version of SendBroadcast(Intent, String) that allows you to specify the user the broadcast will be sent to.
(Inherited from ContextWrapper)
Broadcast the given intent to all interested BroadcastReceivers, allowing an array of required permissions to be enforced.
(Inherited from Context)
Version of SendBroadcast(Intent) that allows you to receive data back from the broadcast.
(Inherited from ContextWrapper)
Perform a #sendBroadcast(Intent) that is «sticky,» meaning the Intent you are sending stays around after the broadcast is complete, so that others can quickly retrieve that data through the return value of #registerReceiver(BroadcastReceiver, IntentFilter) .
(Inherited from ContextWrapper)
Perform a #sendBroadcast(Intent) that is «sticky,» meaning the Intent you are sending stays around after the broadcast is complete, so that others can quickly retrieve that data through the return value of #registerReceiver(BroadcastReceiver, IntentFilter) .
(Inherited from Context)
(Inherited from ContextWrapper)
Sets the Handle property.
(Inherited from Object)
Set the base theme for this context.
(Inherited from ContextWrapper)
Same as StartActivities(Intent[], Bundle) with no options specified.
(Inherited from ContextWrapper)
Launch multiple new activities.
(Inherited from ContextWrapper)
Same as StartActivity(Intent, Bundle) with no options specified.
(Inherited from ContextWrapper)
Launch a new activity.
(Inherited from ContextWrapper)
If your service is started (running through Context#startService(Intent) ), then also make this service run in the foreground, supplying the ongoing notification to be shown to the user while in this state.
(Inherited from Service)
If your service is started (running through Context#startService(Intent) ), then also make this service run in the foreground, supplying the ongoing notification to be shown to the user while in this state.
(Inherited from Service)
Start executing an Instrumentation class.
(Inherited from ContextWrapper)
Like StartActivity(Intent, Bundle), but taking a IntentSender to start.
(Inherited from ContextWrapper)
Request that a given application service be started.
(Inherited from ContextWrapper)
Remove this service from foreground state, allowing it to be killed if more memory is needed.
(Inherited from Service)
Remove this service from foreground state, allowing it to be killed if more memory is needed.
(Inherited from Service)
Stop the service, if it was previously started.
(Inherited from Service)
Stop the service, if it was previously started.
(Inherited from Service)
Stop the service if the most recent time it was started was startId .
(Inherited from Service)
Request that a given application service be stopped.
(Inherited from ContextWrapper)
Returns a string representation of the object.
(Inherited from Object)
Disconnect from an application service.
(Inherited from ContextWrapper)
Remove a ComponentCallbacks object that was previously registered with #registerComponentCallbacks(ComponentCallbacks) .
(Inherited from Context)
Unregister a previously registered BroadcastReceiver.
(Inherited from ContextWrapper)
For a service previously bound with #bindService or a related method, change how the system manages that service’s process in relation to other processes.
(Inherited from Context)
Causes the current thread to wait until another thread invokes the java.lang.Object#notify() method or the java.lang.Object#notifyAll() method for this object.
(Inherited from Object)
Causes the current thread to wait until another thread invokes the java.lang.Object#notify() method or the java.lang.Object#notifyAll() method for this object.
(Inherited from Object)
Causes the current thread to wait until another thread invokes the java.lang.Object#notify() method or the java.lang.Object#notifyAll() method for this object.
(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
Performs an Android runtime-checked type conversion.
Источник