How to create Huawei Android Emulator - android

I'm developing an Android app using Huawei's Push service. I have installed DevEco IDE plugin within Android Studio. But I don't have any Huawei device to test. So my question is that there is any Huawei's Android phone emulator or not for Windows PC. So, I can test and debug app. Thanks in advance.

Huawei provides cloud debugging functionality for Huawei developers as a free service.
If you use Huawei SDKs, you should have Huawei Developer Account. Just need to login Huawei developer console and follow below instruction;
Enables real-time debugging of apps on remote Android devices. Service Introduction
For details about how to use Cloud Debugging in your IDE, please refer to the HMS Toolkit Development Guide.
This functionality is really simple to use, The cloud debugging function allows for remote debugging on real devices. In the debugging process, you can view device information, upload and install your APK to the remote devices, obtain operation logs, and save the logs to your local computer for analysis.

If you don't have Huawei devices to test your apps, you can use Cloud Debugging of AppGallery Connect to test your app for Huawei Devices.
Cloud Debugging tests your app using mainstream Huawei devices provided by Huawei. You can run your app on the latest and most popular Huawei devices to test app functions. Besides, you can debug apps on two real devices at the same time using one HUAWEI ID. Assume that you have applied for a device successfully.
Work with Cloud Debugging
Sign in to AppGallery Connect and select My projects.
Select an app to be tested.
Go to Quality > Cloud Debugging.
Filter devices by Series, Android version, EMUI version, and Resolution.
In the Apply for device model dialog box that is displayed, set Debug duration based on your needs. The options are 30 min, 1 h, and 2 h.
Wait for the device initialization to finish.
Click the Debugging tab.
Click Upload to upload an APK.
Check the APK upload progress and install the APK after the upload is complete.
In the displayed dialog box indicating that the app is being installed, click OK. When the installation is complete, you can see the app icon on the device screen on the left.
Operate the device by moving or clicking your cursor on the device screen, or clicking the power button, home button, menu button, or back button. The device will respond like your own phone.
Check the screenshot below:
From: https://stackoverflow.com/a/63877454/13329100

If your app depends on any Hardware/Software specific service of Huawei device, using an emulator won't work. Also, Android Studio provides Google's generic Stock image so there's no way to create an emulator with EMUI (Huawei's Custom OS).
Fortunately, Google has Firebase Test Lab where you can test on real (5 tests/day) / virtual (10 tests/day) devices for free. Or you may try a 3rd party emulator like Genymotion

You do not need for most cases Huawei device. Here is my battle-tested solution.
If you're implementing HMS (Huawei Mobile Services) feature like push notifications, SMS retrieving or auth(orization) you can do simply:
Grab HMS Core APK from: https://www.huaweicentral.com/download-the-latest-huawei-mobile-services-apk/
Create new or run existing Android emulator via Android Studio or ADB
Install HMS Core APK downloaded from 1.
Go to Settings -> Apps & Notifications
Make sure that HMS Core has required permissions like SMS for SMS retrieving or push notifications
If you forget about 5., HMS library will return exception "Permissions not enabled"
I am pretty sure that instead of emulator you can use any of physical devices, grab APK and install HMS Core on it.
Happy coding!

Related

Is it possible to enroll emulator device to Android Management API for developing?

I am trying to develop an android mobile device management system using Android Management API. However I'm having a hard time provisioning my emulated device to my enterprise. I'm currently working from home so I don't really have access to android hardware.
I've been following google's Quick start guide, and things went well until I have my QR code and tried to provision my emulated device.
Fully managed mode
In fully managed mode the entire device is managed and the device needs to be factory reset before setup. To set up a device in fully managed mode you need to use a QR code.
For devices running Android 7.0 or above:
1.Turn on a new or factory-reset device.
2.Tap the same spot on the welcome screen six times to enter QR code mode.
3.Connect to a WiFi network.
4.Scan the QR code.
For devices running Android 6.0:
1.Turn on a new or factory-reset device.
2.Follow the setup wizard and enter your Wi-Fi details.
3.When prompted to sign in, enter afw#setup.
4.Tap Next, and then accept the installation of Android Device Policy.
5.Scan the QR code.
The thing is, in android studio AVD, there is no welcome screen, nor can I bring it up by factory resetting. I have also tried afw#setup and work profiles but all are in vein.
Is it possible to enroll a virtual device to test out Android Management APIs?
Please if anyone succeeds let me know how.
P.S. I'm using macOS with an M1 chip.

Can't install Galaxy store app on AWS Device Farm S10 Device

I'm need to download an app from the galaxy store app, but I can't open the galaxy store app. It installed (as system app), but don't have a way to open it.
I tryied to install it manauly from the web. It's installed, but can't be open (and don't have any app icon in with all the other device's apps).
I do see in the settings > apps > system apps that the app installed.
Anyone know how can I get the galaxy sotre app lunache and work correctly?
Using Galaxy S10+ device on the free year plan.
AWS Device Farm does not support the Galaxy app store as a default app on Device Farm. We would recommend that you either bring your own app via an APK file or download your app from the Google Play store after logging into your Google account. If you need assistance doing these things from an automation test, please see this forums post for sample code and instructions: https://forums.aws.amazon.com/thread.jspa?messageID=997193&#997193
Thank you,

How to install skype in Android Emulator?

I am new to android app development. I want to create an intent to launch Skype. In order to test this, I assume that the emulator must have Skype already installed.
I tried to launch the play store on the emulator to get the Skype App. But the Google Playstore, when launched on emulator it complains that there is no wifi or data connection.
How can I get the emulator to connect to the host wifi(Wifi which the laptop is connected to?)?
Is there a another way to get Skype app on emulator without playstore?
Thank you
Assuming that you're using the latest Android Studio and Emulator, you could get the Skype application APK file from other sites and drag it onto the emulator for it install the application.
However I do suggest as #CommonsWare stated, use a physical Android Device instead of an emulator as some (probably most) apps won't work correctly due to Google Play Services being missing. You could try the images in the Android SDK that contain part of the Google Play Services within them, it's worth a shot but not something to rely on for the long run.

App installation in Sony Smart Glass

I am a budding developer. I want to develop an app for Sony Smart Glass and I have bought the glass already started the process of developing with Android Studio. My question is how can I install the app in Sony Smart Glass? I have tried to read the Sony website but it's not mentioned there.
If it has USB debugging somewhere in the settings, then enable it. Then you would be able to run the app from studio or adb via usb cable. Or just push your .apk into that device and install it even with some file explorer. Even Bluetooth might be an option here if the device supports it.
This SDK is probably necessary.
If it has no port through which you could push your .apk to that device and it relies only on google play or its specific store (something like samsung used to have), then the only option is to use the store - but it shouldn't be that much restricted.

How to setup Eclipse to connect to a mobile device (generate crash logs regarding android/ios app crashes)

I've searched online about getting crash logs from android and/or ios devices but could not find anything. I am testing an external app atm and have solid steps to reproduce a crash. Though, I can get a crash log/dump for the developer by using Eclipse... any guides on how to do so? Thanks.
To be able to see log calls and other info, you have to enable Debug Mode in your device.
You also need a specific driver to use your device with ADT. If you don't have that driver you can download a generic one from google in SDK Manager > Extras.
But be aware that "commercial" apps (downloaded from Google Play) are not debuggable,
or at least should not be.
First install the driver software for your mobile. Enable your debugging mode in your mobile. Go to DDMS->windows->show view click device. Here u can able to know wether ur device is connected or not.

Categories

Resources