Running Google Glass GDK Sample on Android Device/Emulator - android

I want to run the Google Glass GDK Samples and test them on android device/emulator. I have followed the steps as mentioned in http://karanbalkar.com/2014/06/tutorial-83-hello-world-using-google-glass/ and am able to launch the "ok glass" screen and also able to get the list of commands on the subsequent screen but am unable to add any new commands. Thanks in advance

AFAIK, there is no emulator available as of now for testing GDK applications. You need to run your app on an actual device.

Related

How to create Huawei Android Emulator

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!

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.

Why Gmap and App Map do not work on Emulator?

I use Eclipse and Android SDK to develop apps for android,recently i wrote a program to show a map on it, it works fine on real device but it don't show any map on emulator.
I check the emulator internet connection and it works and i checked the browser on emulator and it works and i checked the Google map app on the emulator and it show me an black page.
I think about a graphical library or something would be missing, is it possible ? what can i do to correct it?
PS:
1-I use Google APIs 4.2.2 image.
2-I know there are many emulator but they don't works with DDMS on Eclipse.for example DDMS can't send GPS location or SMS to theme or call theme.and i want some log system like LogCat.
You have to use genny motion . Its works like real device.
http://www.genymotion.com/
android genymotion vs emulator
use the following steps to make avd for s4 or any type:withe help of genymotion third party pulgin:
download first genymotion https://cloud.genymotion.com/page/launchpad/download/
cmd for install genymotion http://schier.co/post/install-genymotion-2.0-in-ubuntu
then: The installation of the plugin can be done by launching Eclipse and going to "Help / Install New Software" menu, then just add a new Update Site with the following URL: http://plugins.genymotion.com/eclipse.
installing the google play service from the following : http://blog.zeezonline.com/2013/11/install-google-play-on-genymotion-2-0/
Genny Motion is the best solution by far and had almost all features a developer needs.
But the reason that i cant see the map is the time i should wait and https protocol which is don't work properly in our country because of it's encryption ,it seems it took a while to appear a map, i left the program to eat dinner , when i came back it appears !!! but Google map App still don't work , maybe it needs time too.
Emulator does not having gps hardware to run google map, that the reason it's showing blank, To run Map we need both a internet and gps as well.

How to run Google Glass Project on emulator?

I don't have a google glass device. But I am very interested to do apps for Google Glass. I want to run a Hello World in Google Glass without the use of device.
I followed the tutorials for Google Glass. Then I found some sample projects of Google glass. Can Anyone tell me how to run a simple Google Glass Project on an emulator or without a device.
And can you tell, Is there any alternative way to test the Glass APK developed by us without device.
First you need to set up Glass On mobile or an Emulator in Web. Gooogle Glass is orignally a launcher over android you need to install the apks of that launcher.
Here you will find the APK's (however Camera for Glass never worked for me.)
Here is an Album showing you the process (on Nexus 7)
And This is the set of Demo's
After all set up you have to connect the android phone and then install the apk's using adb.
e.g.
adb install -r com.sample.packagee
after that you can launch the app through voice command or if it doesnot support voice trigger then launch it like
adb shell am start -n com.mikedg.android.glass.launchy/.MainActivity
I am writing down a wiki for the issues and the to do's Please check it here..
There are no simulators right now available to do perform testing without the device.
First :
You can try this https://github.com/zhuowei/Xenologer and install the apk on mobile device which is more or less similar to what you are looking for.
Second :
You can try thus but u have to build your application based on Mirror API http ://glasssim.com/ or
https ://developers.google.com/glass/tools-downloads/playground
Third to have your custom apk install :
https ://developers.google.com/glass/develop/gdk/quick-start#installing_the_samples
To display your hello world Try second option it should work. It will add your card in Glass Timeline.
Hope this answers your question.
Thanks
There is not an emulator for Glass at this time. Testing on Glass is an important part of a Glassware development life cycle as the user experience is completely different from what you can experience on a phone or an emulator.
Feel free to follow issue 253 on our issue tracker for updates as the GDK evolves.

Is there any way to run glassware in an emulator?

Today Google just released the GDK Sneak Peak for Google Glass. I have tried to run the samples they have hosted in GitHub with no success:
gdk-stopwatch-sample
gdk-compass-sample
gdk-timer-sample
I am targetting against Android 4.0.3 Glass Development Kit Sneaky Preview and trying to run it in an AVD that also targets it with the following other specs:
640x360 hdpi
For the CPU I tried both ARM & Intel Atom
When I run the app and the dialog to choose the device is shown I do see the virtual device as non compatible.
If I skip it and try to run it I see the following error output:
Installing com.google.android.glass.sample.compass
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/com.google.android.glass.sample.compass"
pkg: /data/local/tmp/com.google.android.glass.sample.compass
Failure [INSTALL_FAILED_MISSING_SHARED_LIBRARY]
I have tried to force not to require the glass library (setting the requirement to false) in the AndroidManifest.xml:
<uses-library
android:name="com.google.android.glass"
android:required="false" />
... but obviously doesn't run properly, it's being shown in kind of an overlay:
I have also tried using Genymotion, but it doesn't run either.
Is there any way to run successfully glassware in an emulator?
EDIT:
Adding the gdk.jar as a library doesn't work.
Only a small percentage of the sample code seems to be using the GDK libraries. For example, the Compass example has a CompassService that is in charge of attaching the CompassRenderer into the Glass Live Card. It also has a CompassMenuActivity, that basically has calls to standard Android menu rendering. Those could be called a "glue" that wrap the compass-functionality into the Glass experience. Major parts of the compass code are just standard Android libraries.
Assuming that the emulator currently does not have a way to run glass libraries (and no-one has hacked them into it yet), and if you want to run the Compass example without actual Glass hardware, you need to implement the Service & MenuActivity in your own "standard Android" way. Basically, create an activity that implements the CompassRenderer in a surfaceview.
Have a look at these commits for an example (tested on Galaxy S4, views are being rendered and menu items are functional):
https://github.com/blaind/gdk-stopwatch-sample/commit/26e9801af983b9fc931d6dfe5ce1fcb80766fd10
https://github.com/blaind/gdk-compass-sample/commit/0d89e922a167c0fac6890684c514b9028e7bfea8

Categories

Resources