Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating an emulator for Galaxy S8? - Android Studio

I create a new hardware profile in an attempt to make and emulator for the Galaxy S8/S8+. I set the screen size to 5.8/6.2 inches (depending on whether S8 or S8+, despite the fact this doesn't appear to affect emulator anyway), and the screen resolution to 1440 x 2960, like the device. The emulator appears nothing like it does on the real device. Testing my app on a real S8+ shows it to be laid out poorly, but on the emulator it appear to be relatively organised, and I noticed it uses the dimens for my Nexus 6 emulator (xxxhdpi). Now the dimens values used isn't a big deal, because I'm happy to phase out the Nexus 6 considering it's no longer in production.

So I add some code to my launcher Java class that that gets me the dimensions of the emulator, here is what I get from my S8 emulator: {density=3.5, width=1440, height=2792, scaledDensity=3.5, xdpi=560.0, ydpi=560.0} Besides the fact the height says 2792 instead of 2960 (I assume this is meant to happen), I believe I see the issue - the density is 3.5. As suspected, this is the same density as the Nexus 6. So the emulator I'm creating is not for the Galaxy S8, and this is evident in my comparison to a real S8+ which displayed my app in a distorted manner. As far as I'm aware, the Galaxy S8 has a density of 4, not 3.5. The IDE says the device has 560dpi. Now I need to be able to create an emulator with a density of 4, and the same specs I've already put down. How can I do this? How can I test for the Galaxy S8 without using the real thing? There isn't a preconfigured emulator for this device provided by the IDE.

Many thanks in advance.

like image 622
4u53r Avatar asked Jul 25 '17 14:07

4u53r


People also ask

Can Android Studio be used as emulator?

The Android Emulator enables you to test your app on many different devices, virtually. The emulator comes with Android Studio by default, so you shouldn't have to manually install it. The basic workflow with the emulator goes as follows: Verify that you have the system requirements.

Can you emulate a Samsung phone?

Samsung Galaxy Emulator is an online virtual device that mimics the software and hardware conditions of that Galaxy device. A developer or QA can use this galaxy emulator as a platform to execute and test your applications & websites on your PC.


1 Answers

There is no preconfigured emulator. As per my experience, even if you try to create with matching device configuration it won't be much of use as it will still run stock android.

So, I found that Samsung provides online test lab like firebase.

You can go to http://developer.samsung.com/rtlLanding.do and check it out. They give 5 minutes free if you don't have developer account.

As per Samsung, you can get the following:

  • 20 credits are provided to each Samsung Developer user every day.
  • With 1 credit, users can use the Remote Test Lab service for 15 minutes.
  • Minimum reservation: 30 minutes (2 credits)
  • Maximum reservation: 10 hours a day (40 credits)

More details : http://developer.samsung.com/remotetestlab/rtlAboutRTL.action

like image 126
aksdch11 Avatar answered Sep 24 '22 04:09

aksdch11