java.lang.Object | ||
↳ | com.google.android.gms.common.api.GoogleApi<com.google.android.gms.common.api.Api.ApiOptions.NoOptions> | |
↳ | com.google.android.gms.instantapps.InstantAppsClient |
Main entry point to APIs for Android Instant Apps.
Example use:
InstantAppsClient client = InstantApps.getInstantAppsClient(context);
Task<ParcelFileDescriptor> fileTask = client.getInstantAppData();
fileTask
.addOnCompleteListener(fileTask -> readData(fileTask.getResult()))
.addOnFailureListener(exception -> handleException(exception));
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Retrieves a
ParcelFileDescriptor to the caller's instant app's data. |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Retrieves a ParcelFileDescriptor
to the caller's instant app's data.
The file format is Zip, which is compatible with Android's native ZipOutputStream
and ZipInputStream
.
What is in the Zip file?
getFilesDir()
.
getDatabasePath(String)
, which also includes files created with
the SQLiteOpenHelper
class.
getDir(String, int)
.
Note: Since instant apps cannot access external storage, no information from external storage will be returned.
Files in directories returned by getCacheDir()
, getCodeCacheDir()
, or getNoBackupFilesDir()
are excluded. The files saved in these locations
are only needed temporarily, or are intentionally excluded from transfer operations.
Security Requirements:
getPackageName()
within your app.
Returns | |
---|---|
Task<ParcelFileDescriptor> |