Friday, March 19, 2021

LDPlayer an Android Emulator

 For an index to all my stories click this text

For one reason or another I always stumble upon new things for this blog. And sometimes I decide to pick up something that has been yelling for attention but I just never had the time for.
Blynk for example is something that has been around for a long time, but I never found time for it. Well the past holliday season gave me that time, so I started experimenting with Blynk.

Blynk is an IOT solution but all phone-oriented. As I wanted to write sdome entries in this web-log about Blynk I needed to make several screendumps on my phone and transfer them to my PC. I also needed to transfer some authentification tokens from the phone to my PC.

For previous stories I was copying screendumps from my phone to Google Drive. Next I opened Google drive on my PC and downloaded the screendumps. I did the same for texts. It works but is not very efficient. Every time I wanted to add a screendump I had to log into Google Drive again and repeat the procedure.  

Next to that I am building and testing some new apps. Some are build with Mitt's App-Inventor, and some are just plain Javascript files. Transferring them to my phone is a tedious task. Test the file on my PC. Copy it to Google Drive, open Google Drive on my phone and download the app.

So I was looking for something easier to transfer things to and from my phone. And then I had this stupid idea. Maybe there is an Android emulator for PC's on which I can experiment before actually transferring to my PC. And yes there is !!!

LDPlayer

Actually there are many Andoid emulators available for PC's but there is one that stood out from the rest and it is called LDPlayer.

LDplayer is actually build for those Android users that want to play their Android Games on their PC. So I was a bit reluctant to install it. But what the heck if it would not function I could remove it anyhow. So I gave it a go, and wow was I pleasantly surprised.

LDPlayer is a full Android emulator on your PC. It runs Andoid 7.1 so it is not the latest/newest version but recent enough to run most apps. Installing is just pressing a button on the website and then executing the installation program. This is a slow process, so take your time. It took several minutes on my PC.



Download it here: https://www.ldplayer.net/

Using the emulator



The emulator starts in landscape mode but clicking the small phone icon it switches to portrait mode.



The photo shows that it emulates a phone with just a few apps installed. Just as I prefer.



The combined System Apps icon expands when you click on it and the most essential apps are present: the file manager, the settings and the play store.

If you want to use the Play Store app (and you DO want that) you have to fill in your credentials just like you did on your phone. If you are afraid of your privacy just create a new account with Google.



Clicking on the scissor icon at the right side of the screen makes a screen dump of the Android screen. The screendump is stored on your PC in the folder C:\Users\yourname\Documents\XuanZhi\Pictures\Screenshots.

This makes life a lot easier for me !!!!
The screenshot only contains the Android screen not the rest of the program or anything else from your Windows screen.



Above you can see such a screenshot and it shows that I installed several apps. The Domoticz Control app, Wijnmaker app, testapp, Gauge and Toiletroll Stock app are all aps I created myself. The Firefox and Chrome apps are downloaded from the playstore just like the Blynk app.

Some general info.

LDPlayer is versatile. It is an emulator and not a real phone. Therefore it lacks the phones hardware. However the emulator is made in such a way that it uses your computers resources. The QR Code Reader for example uses your computers webcam.

If you open an app that plays music (like youtube) it will play the music over your computers speakers.

Naturally the App has no wifi so it uses your computers internet connection to perform tasks. That is why the Domoticz app and other apps work flawlessly.

Another neat option is when you have text on your screen you can copy it and paste it in a program on your PC. This way I was able to easily transfer the Blynk authentication codes to Arduino's IDE.


Blynk

I started this story with mentioning that I wanted to do some expermiments with Blynk. You already saw the Blynk icon on the home screen and here is a screendump of Blynk in action. Well Blynk connected flawlessly to my own Blynk server, and ran just as smooth as on my phone.



Pressing the OFF button switched it to ON and switched a led on my ESP32 on. I attached a button to the ESP32 and pressing that activated the big round Led next to the OFF button. The graph showed in real-time the temperature and updated it nicely when I put my fingers around the to the ESP32 attached DS18B20.

Concluding.

If you want to test Apps or websites before you transfer them to your phone LDPlay is a great tool that helps tremendous. Oh, and did I mention it is free ???

Till next time
have fun

Luc Volders