Update //docs/android_dynamic_feature_modules.md
Change-Id: I5bc9d4c7de8d6078e50919fac14660832a19f2f4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1903723
Reviewed-by: Christopher Grant <[email protected]>
Commit-Queue: Tibor Goldschwendt <[email protected]>
Auto-Submit: Tibor Goldschwendt <[email protected]>
Cr-Commit-Position: refs/heads/master@{#718756}
diff --git a/docs/android_dynamic_feature_modules.md b/docs/android_dynamic_feature_modules.md
index 19a0633a..7f0d56b 100644
--- a/docs/android_dynamic_feature_modules.md
+++ b/docs/android_dynamic_feature_modules.md
@@ -94,6 +94,9 @@
</histogram_suffixes>
```
+See [below](#metrics) for what metrics will be automatically collected after
+this step.
+
<!--- TODO(tiborg): Add info about install UI. -->
Lastly, give your module a title that Chrome and Play can use for the install
UI. To do this, add a string to
@@ -135,16 +138,13 @@
```
This will install Foo alongside the rest of Chrome. The rest of Chrome is called
-_base_ module in the bundle world. The Base module will always be put on the
+_base_ module in the bundle world. The base module will always be put on the
device when initially installing Chrome.
*** note
-**Note:** You have to specify `-m base` here to make it explicit which modules
-will be installed. If you only specify `-m foo` the command will fail. It is
-also possible to specify no modules. In that case, the script will install the
-set of modules that the Play Store would install when first installing Chrome.
-That may be different than just specifying `-m base` if we have non-on-demand
-modules.
+**Note:** The install script may install more modules than you specify, e.g.
+when there are default or conditionally installed modules (see
+[below](#conditional-install) for details).
***
You can then check that the install worked with:
@@ -637,15 +637,6 @@
}
```
-*** note
-**Warning:** While your module is emulated (see [below](#on-demand-install))
-your resources are only available through
-`ContextUtils.getApplicationContext()`. Not through activities, etc. We
-therefore recommend that you only access DFM resources this way. See
-[crbug/949729](https://bugs.chromium.org/p/chromium/issues/detail?id=949729)
-for progress on making this more robust.
-***
-
### Module install
@@ -782,6 +773,22 @@
</manifest>
```
+### Metrics
+
+After adding your module to `AndroidFeatureModuleName` (see
+[above](#create-dfm-target)) we will collect, among others, the following
+metrics:
+
+* `Android.FeatureModules.AvailabilityStatus.Foo`: Measures your module's
+ install penetration. That is, the share of users who eventually installed
+ the module after requesting it (once or multiple times).
+
+* `Android.FeatureModules.InstallStatus.Foo`: The result of an on-demand
+ install request. Can be success or one of several error conditions.
+
+* `Android.FeatureModules.UncachedAwakeInstallDuration.Foo`: The duration to
+ install your module successfully after on-demand requesting it.
+
### Integration test APK and Android K support