Skip to content

Commit 724d21f

Browse files
committed
Merge branch 'github/master'
2 parents 8f54a98 + 7261b55 commit 724d21f

1 file changed

Lines changed: 16 additions & 4 deletions

File tree

PlayCoreKtx/README.markdown

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,17 @@ This is an API sample to showcase the following parts of the Play Core library i
1111
The sample app is a "flashlight" app that lets you light up the screen with a yellow background.
1212
You can also pick a color for the flashlight from a photo, by using the camera.
1313

14+
The photo color picker is an on-demand module, and will be installed only after the user clicks
15+
on the floating action button.
16+
17+
In-app reviews are triggered only after the user selects a color from a photo,
18+
and then turns the flashlight off.
19+
20+
Pay attention to the requirements for testing the in-app reviews dialog as described [here](https://developer.android.com/guide/playcore/in-app-review/test).
21+
Notably, the user must have downloaded the app from Play Store, which means you need to change
22+
the sample's `applicationId` and upload it to Play Console, and the user must not have reviewed
23+
the app previously.
24+
1425
## Implementation
1526
The app is designed to show how to use the respective Play Core APIs using by using the Play Core KTX artifact, which provides coroutine (`suspend` and `Flow`) versions of all Play Core APIs.
1627

@@ -22,7 +33,7 @@ Important parts of the code to look at are:
2233
* `PaletteFragment` - this fragment is in an on-demand dynamic feature module (`features/picure`) and takes care of requesting the camera to take a photo and extracting the colors from it. The color is stored in the `ColorViewModel` which is scoped to the Activity and is shared between both Fragments
2334

2435
## Usage
25-
To test the sample locally, you can use the following Gradle task:
36+
To test the on-demand feature module installation locally, you can use the following Gradle task:
2637
```
2738
./gradlew debugInstallApksForLocalTesting
2839
```
@@ -34,10 +45,11 @@ At runtime, based on the local testing meta-data set in the Manifest by `bundlet
3445
`SplitInstallManager` will load dynamic feature modules from local storage instead of connecting to
3546
the Play Store.
3647

37-
If you wish to test real behavior, including in-app updates and in-app reviews, you can use
38-
[internal app sharing](https://support.google.com/googleplay/android-developer/answer/9303479?hl=en) on the Play Store.
48+
If you wish to test real behavior, *including in-app updates and in-app reviews*, you can use
49+
[internal app sharing](https://support.google.com/googleplay/android-developer/answer/9303479?hl=en)
50+
on the Play Store.
3951

40-
### <variant>InstallApksForLocalTesting task
52+
### debugInstallApksForLocalTesting task
4153
The task described above comes from a custom Gradle plugin that can be found in the `buildSrc` directory. It uses the new [Android Gradle plugin Variant API](https://medium.com/androiddevelopers/new-apis-in-the-android-gradle-plugin-f5325742e614) to read the final location of the produced Android App Bundle file, then extracts APKs from it and installs them on the device.
4254

4355
While not the focus of this sample, if you're interested in learning more about custom Gradle tasks and using the Variant API, you're encouraged to look at the code or copy it to your project, however please note that this plugin is not production-ready and will not be supported.

0 commit comments

Comments
 (0)