3

There are two scenarios

  1. I run my Android App(fresh install) through Android Studio 2.2.2 and the default android preview screen(white screen) before the my app's splash screen stays close to 10-15 seconds. And this happens only the first time(fresh install) the app is run on any device.

  2. I install same .apk (fresh install) through linux terminal using the command

    /app/build/outputs/apk$ adb install -r app-debug.apk

and the click the app icon to launch the app and it shows the preview screen for less then 1 second.

So my question are 1- Why the time difference between these two modes of building and running the app and 2 - What will be the scenarios when I upload my app on play store and a user downloads it from there and tries to run it

Avijeet
  • 1,031
  • 1
  • 10
  • 27
  • What is the time you have added in the splash Screen? – Lips_coder Nov 23 '16 at 08:50
  • there is no time on splash screen, but that's not the issue as Splash doesn't take more then 3 seconds to load. it's the default android preview screen run by Android OS that's taking 15 seconds first time the app is launched from Android Studio – Avijeet Nov 23 '16 at 09:32
  • Found out that instant run in Android Studio 2.0 causes the preview screen to load for long time when fresh install happens. Here is the correct answer - http://stackoverflow.com/questions/36623917/first-launch-take-long-time-in-android-studio-2-0-gradle-2-0 – Avijeet Dec 12 '16 at 10:03

1 Answers1

0

So I found out why my app was taking so long while running from android studio 2.2.2. It's because of instant run feature. Please refer below links for more detailed explanation.

Link 1 and Link 2

Community
  • 1
  • 1
Avijeet
  • 1,031
  • 1
  • 10
  • 27