This base module will be responsible for requesting, installing and managing the dynamic feature module. ![]() By far the easiest way to achieve this is to declare the application as subclassing SplitCompatApplication in the main AndroidManifest.xml file (also referred to as the base module manifest) as follows: the Base Activity User InterfaceĪt this point, the project consists of a single activity which will serve as the entry point for the base module of the app. Fortunately, this shortcoming can be avoided by enabling the SplitCompat Library within the project. By default, however, newly installed feature modules are not available to the rest of the app until the app is restarted. Once a dynamic feature module has been downloaded, it is most likely that immediate access to code and resource assets that comprise the feature will be required by the user. Within Android Studio, open the app level adle file ( Gradle Scripts -> adle (Module: app)), locate the dependencies section and add the Play Core Library as follows. Since the project will be making extensive use of the Play Core Library, a directive needs to be added to the build configuration to include this library. Report this ad Adding Dynamic Feature Support to the Projectīefore embarking on the implementation of the app, two changes need to be made to the project to add support for dynamic features. The chapter will also explore the use of deferred dynamic feature installation. This tutorial will include steps to create a dynamic module from within Android Studio, upload the app bundle to the Google Play Store for testing, and use the Play Core Library to download and manage dynamic features. The app created in this chapter will consist of two activities, the first of which will serve as the base module for the app while the second will be designated as a dynamic feature to be downloaded on demand from within the running app. With the basic concepts of Android Dynamic Delivery and Dynamic Features covered in the previous chapter, this chapter will put this theory into practice in the form of an example project. ![]() Purchase the fully updated Android Studio Chipmunk Edition of this publication in eBook ($29.99) or Print ($46.99) formatĪndroid Studio Chipmunk Essentials - Java Edition Print and eBook (PDF) editions contain 94 chapters and over 800 pages You are reading a sample chapter from the Android Studio 3.4 Development Essentials - Java Edition book.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |