Use Google apps in the emulator - android

Would it be possible to provide a emulator image that has all the Google apps that come with real devices, like Gmail etc?
I don't have access to a 2.0 device which makes it close to impossible for me to develop/debug apps which uses AccountManager etc.

Download the Android Dev Phone system image from http://developer.htc.com/adp.html.
Then, create a new AVD (using the android tool or adb) with the matching version. The avd directory will appear at the .android directory inside your home directory (Run %USERPROFILE% on windows). Then, put system.img file downloaded into the <name of avd>.avd directory. Start the emulator and you will use Android with Google apps installed.
Disclaimer: about whether it is legal or not to download and use such images, I don't know. Please read the text there and decide yourself.

Given the trouble that Cyanogenmod had with trying to redistribute Google's apps, I would say it's not an option. However, if it's something in the Android source (like the calendar), you can compile it yourself.

If you just want to debug the app, you don't need to create a new image. You can run some of the google apps including gmail and google maps in the emulator. If you go to the Android SDK and AVD manager in the Eclipse Android plugin, and then go to "available packages", for every SDK there are two downloads for each version of the api. There is the one with Google Apps and one with out. The one with Google apps has apps such as gmail and google maps. It does not have all Google apps. The market is not there for instance .

Related

Google Play Services not supported

I am trying to develop an application on the Recon Jet and I am running into some issues. I am currently trying to run the Google Mobile Vision sample application called "FaceTracker." After running it on the Jet, I get an error message that says: FaceTracker relies on Google Play services, which is not supported by your device. Contact the manufacturer for assistance. Is there a way I can get Play services on the device? I have tried installing it's apk onto the device through ADB to no avail.
The device runs Android 4.2.1 and has a custom launcher so I can't access standard Android apps, although it does run a full fledged Android OS.
If anyone has any ideas, it would be greatly appreciated.
Thanks,
Aaron
As an example see cyanogen mod google play implementation
Based from this blog, this method requires root access.
Download a couple of APKs, you can usually find the newest bundle in a
zip package on XDA
Developers:
Google Play Store (the newest version you can find)
Google Services Framework
Google Login Service/Account Manager
If you are rooted you can copy them to your root directory to
System/App using a root manager like ES File
Explorer.
Then just restart your device.
If this doesn't work first time you might need to change the
permissions on the new APKs to match the rest on your device. Use a
file explorer like ES for this. Apparently if you're not rooted you
can simply install each APK then reboot and it works for some devices.
Reboot and add your Google account in Settings > Accounts > Add
account.
Look for the Play Store in your app drawer.
Hope this helps!

Auto Updating Sideloaded Android App on Start

We have an Android app (.apk) published to a publicly accessible URL, any user who knows the URL can download and install the app.
The app is already installed on the relevant user phones and allowing sideload option from the settings is turned on.
How can I force the app, on start, to check for update and replace the existing app if found, then restart the app (to pick up the latest version)?
Is there a standard solution or a software package? Should I be thinking in a different way?
I am using Xamarin Forms, however, I am happy with Xamarin Android or any Java-based solution.
One thing you could do is to have a small plain text file in the same server where the APK is, that contains the version number of the APK available on the server. The runing app then just reads that text file and compares against its own version number.
If the version on the server is newer (has a higher version number), you simply download the new APK to a temp dir and install the APK programatically using the method outlined here: Android: install .apk programmatically
The way to go is HockeyApp. It´s a distribution system that does exactly what you are looking for. Besides, you get a useful crash logger and some statistics, etc. It´s free for 2 apps.
Once you install and configure their SDK in your Android app, an activity will popup telling the user a new update is available if there is any.
The user can install the new version with a button tap. Simple.
The setup process involves installing a nuget package and write a few lines of code in your main Activity class.

how can generate apk file from installed android application?

Hi android developers I got an issue from android development. Actually one android app I installed in my mobile successfully it is installed. But I want my apk file from installed app. How can I get suggest me thanks!!
All installed APKs are located in /data/app/, but you can see this if you have rooted device
If you don't wants to root your device then there are many application available in market such as MyAppSharer
MyAppSharer is available on google play store.
Download MyAppSharer
The APKs will goes in /sdcard/MyAppSharer
Here is the solution.
First there are two types of application in android devices
Default application (i.e. installed by manufacture)
From third party app(i.e from play store etc)
If you want apk of the third party application connect your android device in your computer and launch android studio.
Open Device File Explore --> data -->app. Right click on the apk you want and save it on your local device(i.e computer);
For the default app which installed by manufacture repeat the previous procedure but in this step go to Device File Explore --> system -->app. Right click on apk you want and save it.

Google maps on emulator

I'm working on a project which use Google maps v2. I've tried many emulators configurations (even genymotion) unfortunately i didn't make it work.
Can someone please show how he made it work.
Thanks.
The recent version of Genymotion no longer contains the ARM library support and Google Apps. I believe this is due to legal reasons, since they are now selling Genymotion as a product for developers.
Build a new VM from the new version of Genymotion and start the VM. Make sure you know what version you selected!
Download Google Apps zip package from: http://wiki.rootzwiki.com/Google_Apps
a. Pick version that is compatible with the Android version on your VM
b. Drag and drop the zip file onto the Genymotion VM window
c. You’ll get a question “Do you want to flash...” Say OK
d. Reboot the device by either closing the window or holding the power button to power off the VM
e. On reboot, Google Apps should be installed and you can login to a Gmail account
f. Note, some Google apps will probably crash on first run
2. Flash ARM library libhoudini(google):
a. Download zip file(libhoudini.zip)
b. Drag and drop zip file to flash to the system
c. Reboot again
At this point, you should have ARM support and Google apps. Please let me know if you have problems or something doesn’t work correctly.
you can't run Google Maps v2 on the Android emulator.

How do I distribute Android app to beta tester without using Market

I have an early version of my app that I want some testers to take a look at. But I am not ready to put it on Market. How do I distribute it to my testers and how do they install it on their phones. One of the beta testers has a Asus eeePC with Android 2.0 installed and I would like him to try it too. How does this work?
They can just download it from any URL (go to the URL using the device browser) and install it.
They'll need to go to Settings->Applications and check the "Unknown Sources" checkbox.
You can just package the app up as a .apk from eclipse and host it anywhere. Then just have anyone you want visit the URL from their android an it will be installed. But as mentioned they will need to have the Settings->Applications and check the "Unknown Sources" checkbox checked first.
URL, ftp or any another manual distribution is good until you have a couple testers and less than 10 devices. Actually, there are many services for that. The biggest one was Testflightapps.com. But now it's Apple's service and they stoped support android. There are another though. Testfairy.com, Crashlitics(to collect and analize crashes from devices), etc. Just google it ;)
as mentioned in first answer you can download from unknown source by rendering to that URL
Apart from that, just make sure that your app hosting server supports MIME type downloading.(very basic but important)
On a device:
In Settings-> applications, check "unknown sources. Now by putting the apk on the devices sd card you can navigate to its directory with a file manager such as Astro and install it.
On a simulator:
While running an emulator, navigate to the /tools directory of the android SDK if you haven't added it to your PATH. Now execute "adb install path/to/your_application.apk".

Categories

Resources