1

I'd like to know if it is possible to run an Android app in a real device with a specific API level.

I have a Moto G 2nd Generation running Lollipop and I want to test how the app would run in previous versions of Android.

Is it possible?

Thanks in advance

Rafael Redrado
  • 493
  • 1
  • 6
  • 19

2 Answers2

3

You can't downgrade the Android OS on a device for testing without reinstalling the OS. For test purposes, you should use an emulator or another device running older version of Android.

shauvik
  • 3,912
  • 2
  • 23
  • 18
  • The thing is, I want to test different styles, layouts, etc. for different API levels. I could this manually by removing the newer ones, but this is quite ugly, so isn't there a good way to do it? – Rafael Redrado Mar 29 '15 at 23:01
  • You're probably looking for Multi configuration preview. But that's for one API level only but you can test your layout on different screen sizes. http://developer.android.com/sdk/installing/studio-tips.html (See under Creative layout) – shauvik Mar 30 '15 at 02:21
  • That is partially useful. I also would like to test things like the behaviour of a button when is pressed – Rafael Redrado Mar 30 '15 at 19:25
  • I think your best bet for checking behavior would be to write it as an Espresso (UI) test and run it on different emulator configurations. There are some companies that also allow you to run tests on their cloud of devices for free or cheap -- testdroid.com appthwack.com – shauvik Mar 30 '15 at 19:28
1

Ok, I don't think you can do that. But for those purposes you can take genymotion for example. There are a lot of device images that you can virtualy run and test your app.

If an emulator doesn't have all the things you need, then the only thing is to get people with older devices and test on them

mdzeko
  • 932
  • 10
  • 19