Skip to content

Commit e7abfa7

Browse files
committed
Merge branch 'github/main' into main
2 parents 6a61a1e + bb57270 commit e7abfa7

3 files changed

Lines changed: 21 additions & 28 deletions

File tree

DynamicFeatures/README.markdown

Lines changed: 18 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -12,28 +12,22 @@ The sample contains several modules.
1212

1313
The `MainActivity` class demonstrates how to use the API to load and launch features.
1414

15-
The `BaseSplitActivity` abstract class implements the required `SplitCompat.Install()` call
16-
in the `attachBaseContext` method. This allow to launch an activity from a freshly downloaded
17-
dynamic module without having the restart the application.
15+
The `BaseSplitActivity` abstract class implements the required `SplitCompat.Install()` call in the `attachBaseContext` method. This allow to launch an activity from a freshly downloaded dynamic module without having the restart the application.
1816

1917
`features/*` -> Contains features which can be downloaded on demand using the PlayCore API.
2018
`instant/*` -> Contains instant enabled features which can be downloaded using the PlayCore API or via Url.
2119

2220
Each feature as some distinctly unique characteristics.
2321

24-
`features/assets` -> Feature containing only assets.
25-
`features/kotlin` -> Feature written in Kotlin.
26-
`features/java` -> Feature written in Java.
27-
`features/maxSdk` -> Conditionally delivered feature based on max sdk version
28-
`features/native` -> Feature written in Kotlin using JNI.
29-
`instant/split` -> Instant Feature without an URL route. Loaded using Split
30-
Install API
31-
`instant/url` -> Instant Feature with a URL route
22+
- `features/assets` -> Feature containing only assets.
23+
- `features/kotlin` -> Feature written in Kotlin.
24+
- `features/java` -> Feature written in Java.
25+
- `features/maxSdk` -> Conditionally delivered feature based on max sdk version
26+
- `features/native` -> Feature written in Kotlin using JNI.
27+
- `instant/split` -> Instant Feature without an URL route. Loaded using SplitInstall API
28+
- `instant/url` -> Instant Feature with a URL route
3229

33-
The `AndroidManifest` files in each feature show
34-
how to declare a feature module as part of a dynamic app. Any module with the
35-
instant attribute is instant enabled. In this sample these can be found in the
36-
`instant/` folder:
30+
The `AndroidManifest` files in each feature show how to declare a feature module as part of a dynamic app. Any module with the instant attribute is instant enabled. In this sample these can be found in the `instant/` folder:
3731

3832
```
3933
<dist:module
@@ -47,24 +41,23 @@ instant attribute is instant enabled. In this sample these can be found in the
4741

4842
## Getting Started
4943

50-
Clone this repository, enter the top level directory and run <code>./gradlew tasks</code>
51-
to get an overview of all the tasks available for this project.
44+
Clone this repository, enter the top level directory and run <code>./gradlew tasks</code> to get an overview of all the tasks available for this project.
5245

5346
## Testing dynamic delivery
5447

55-
To test dynamic delivery with this sample, you'll need to upload it to the Google Play Store's
56-
internal testing channel.
57-
58-
Before uploading, make sure to change the `applicationId` in `app/build.gradle`.
48+
To test dynamic delivery with this sample, you can follow any of the below steps:
49+
* Upload the aab to the Google Play Store's internal testing channel. Before uploading, make sure to change the `applicationId` in `app/build.gradle`.
50+
* Locally test the dynamic delivery by using [FakeSplitInstallManager](https://developer.android.com/guide/app-bundle/test/testing-fakesplitinstallmanager) and [bundletool](https://developer.android.com/studio/command-line/bundletool>bundletool):
51+
1. Build a set of APKs: `bundletool build-apks --local-testing --bundle=<path_to_aab> --output=<path_to_apks>`. _Make sure to include --local-testing flag_
52+
2. Connect to the device/emulator
53+
3. Deploy app to the device: `bundletool install-apks --apks=<path_to_apks>`
5954

6055
## Running instrumentation tests
6156

6257
In order to run instrumentation tests, parallel builds have to be turned off at the moment.
6358
This means you can run them via `./gradlew connectedAndroidTest --no-parallel`.
6459

65-
Tooling support for this is being worked on – currently it's not possible to run
66-
instrumentation tests for dynamic-feature modules from Android Studio directly.
67-
Use the command line instead.
60+
Tooling support for this is being worked on – currently it's not possible to run instrumentation tests for dynamic-feature modules from Android Studio directly. _Use the command line instead._
6861

6962
## Support
7063

@@ -74,6 +67,5 @@ If you've found an error *in this sample*, please file an issue:
7467

7568
https://github.com/android/app-bundle/issues
7669

77-
Patches are encouraged, and may be submitted by forking this project and
78-
submitting a pull request through GitHub.
70+
Patches are encouraged, and may be submitted by forking this project and submitting a pull request through GitHub.
7971

DynamicFeatures/app/src/main/res/values/feature_names.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,10 @@
2424
<string name="module_large">large</string>
2525
<string name="module_feature_maxsdk">maxSdk</string>
2626
<string name="module_native">native</string>
27-
<string name="module_initial">initial</string>
27+
<string name="module_initial">initialInstall</string>
2828
<string name="module_instant_feature_split_install">split</string>
2929
<string name="instant_feature_url">http://uabsample-405d6.firebaseapp.com/url</string>
30+
<string name="title_module_initial">initial</string>
3031
<string name="title_url_instant_module">url</string>
3132
<string name="title_activity_url_instant_module">url_instant_module_activity</string>
3233
</resources>

DynamicFeatures/features/initialInstall/src/main/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
package="com.google.android.samples.dynamicfeatures.initialinstall">
2020

2121
<dist:module
22-
dist:title="@string/module_initial">
22+
dist:title="@string/title_module_initial">
2323
<dist:fusing dist:include="true" />
2424
<dist:delivery>
2525
<dist:install-time />

0 commit comments

Comments
 (0)