IPackageVerificationApiService
Known Indirect Subclasses
|
This is the main binder interface for the PackageVerificationApiService
Public Method Summary
abstract void |
|
abstract void |
|
abstract void |
|
Inherited Method Summary
From interface android.os.IInterface
Public Methods
public abstract void getVerifyAppsData (IVerifyAppsDataCallback
callback, long flags)
This method can be used to get a variety of VerifyApps related data. The data will
be returned as a Bundle in a call to callback.onGetVerifyAppsDataResult(), and the
exact data included depends on which flags are set in the flags argument. By default,
the bundle will contain the following fields: last_scan_time_ms: long - The time in
milliseconds since epoch of the last autoscan run harmful_apps_count: int - The number
of harmful apps that were present at the last autoscan run recently_removed_apps_count:
int - The number of harmful apps that have recently been removed
default_warning_string_id: int - A default warning string that can be used if an app is
missing a more specific warning id, and the provided warning_string is not in the
correct locale LIST_HARMFUL_APPS (1 << 0) - Use this flag to get a list of
harmful apps that are present on the device. harmful_apps: Bundle[] - An array of
bundles - 1 for each harmful app. Each bundle will contain the following fields:
package_name: string - the package name of the application version_code: int - the
version code of the application sha256: byte[] - the SHA-256 digest of the apk
warning_string_id: int - The resource id of a string in the Phonesky application that
contains the localized warning string to show to the user for this app. In some cases
this value will be missing, in which case the value from the "warning_string_text"
field should be used instead warning_string_text: string - The warning string as sent
from the server. This will only be set in case of new malware categories that we don't
have local warning strings for yet, and only if the current locale matches the locale
of the string. Otherwise, warning_string_id will be set to the generic malware warning
string. warning_string_locale: string - The locale of warning_string_text
remove_app_intent: PendingIntent - A pending intent to uninstall the application
LIST_RECENTLY_REMOVED_APPS (1 << 1) - Use this flag to get a list of harmful apps
that have been recently removed. recently_removed_apps: Bundle[] - An array of bundles.
One for each removed app. Each bundle will contain the following fields: package_name:
string - the package name of the application sha256: byte[] - the SHA-256 digest of the
apk app_title: string - The title of the removed application, in the current locale at
the time of removal app_title_locale: string - the locale of the included app title
string removed_time_ms: long - the time that the app was removed, in ms since epoch.
warning_string_id: int - The resource id of a string in the Phonesky application that
contains the localized warning string to show to the user for this app. In some cases
this value will be missing, in which case the value from the "warning_string_text"
field should be used instead warning_string_text: string - The warning string as sent
from the server. This will only be set in case of new malware categories that we don't
have local warning strings for yet, and only if the current locale matches the locale
of the string. Otherwise, warning_string_id will be set to the generic malware warning
string. warning_string_locale: string - The locale of warning_string_text
hide_removed_app_intent: PendingIntent - A pending intent to remove this app from the
list of recently removed apps.
Parameters
callback |
|
flags |
A bitfield specifying what data should be returned. The value values are:
LIST_HARMFUL_APPS and LIST_RECENTLY_REMOVED_APPS. |
Get a list of the harmful apps that are currently installed on the device.
Parameters
callback |
An IListHarmfulAppsCallback object that will be called with the results of this
API |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-31 UTC.
[null,null,["Last updated 2024-10-31 UTC."],[[["`IPackageVerificationApiService` is the primary interface for interacting with the Package Verification service."],["It provides methods to retrieve VerifyApps data, including harmful and recently removed apps."],["Developers can use this interface to access information about potentially harmful applications installed on a device."],["`getVerifyAppsData` allows retrieval of various data points, including the last scan time, harmful app counts, and warning strings."],["`listHarmfulApps` specifically retrieves a list of harmful apps currently installed."]]],["The `IPackageVerificationApiService` interface enables interaction with the VerifyApps service. Key actions include retrieving VerifyApps data via `getVerifyAppsData` and `getVerifyAppsDataV2`, which return data bundles via callbacks, specifying data types through flags. `getVerifyAppsData` returns last scan time, harmful/removed app counts, and details like package names, SHA-256 digests, and warning strings. It also gets a list of harmful apps through `listHarmfulApps`, delivering results via a callback. These methods can throw a `RemoteException`.\n"]]