How to Reduce android app opening time with Jetpack App Startup

Every users always wants to apps to be responsive and fast to load. When an application does not meet this expectation, it can be disappointing to users. This poor experience may cause a user to rate your app badly on the Play store, or even abandon your app altogether.

In 2018, Android has launched Android Jetpack as a suite of libraries to help developers follow best practices, reduce boilerplate code, and write code that works consistently across Android versions and devices. Now android has released many updates existing libraries as well as new libraries to help make building high-quality apps easier.


How to use Jetpack App Startup


1.For use App Startup in your app, add the following dependency to your gradle file:

repositories {
    google()
    maven()
}

dependencies {
  implementation "androidx.startup:startup-runtime:1.0.0-alpha02"
}


2. Now derfine an Initializer
 Here’s the interface you need to implement
repositories {
    google()
    maven()
}

dependencies {
  implementation "androidx.startup:startup-runtime:1.0.0-alpha02"
}


3. In  Last , we need to add an entry for WorkManagerInitializer in the AndroidManifest.xml:


<provider
    android:name="androidx.startup.InitializationProvider"
    android:authorities="${applicationId}.androidx-startup"
    android:exported="false"
    tools:node="merge">
    <!-- This entry makes WorkManagerInitializer discoverable. -->
    <meta-data android:name="com.example.WorkManagerInitializer"
          android:value="androidx.startup" />
</provider>



















Next Post Previous Post
1 Comments
  • Anonymous
    Anonymous July 28, 2020 at 11:02 AM

    Pls make a post about no time for opening app

Add Comment
comment url