Tag: android-emulator

Monkey giving an odd error on android emulator

I’m letting monkey run on my app (via android emulator) using the following instruction: Monkey -p <packagename> -v 5000 I am getting the following errors: 01-28 11:45:55.392: ERROR/MediaPlayerService(34): error: -2 01-28 11:45:55.392: ERROR/MediaPlayer(58): Unable to to create media player 01-28 11:45:58.783: ERROR/MediaPlayerService(34): error: -2 01-28 11:45:58.783: ERROR/MediaPlayer(58): Unable to to create media player 01-28 11:46:13.742: […]

Geo Fix command does not pass altitude

On Android 2.2 Emulator, the “geo fix” command seems not to be working properly. The emulator responds “OK”, and onLocationChanged() is properly called in my program. However, the Location object seems not to be complete – it registers latitude and longitude just fine, but it does not contain an altitude reading: hasAltitude() returns false. Any […]

Android app can't access location on emulator using FusedLocationApi

I have an Android app that gets location: private LocationRequest createLocationRequest() { LocationRequest mLocationRequest = new LocationRequest(); mLocationRequest.setInterval(120000); mLocationRequest.setFastestInterval(60000); mLocationRequest.setPriority(LocationRequest.PRIORITY_BALANCED_POWER_ACCURACY); return mLocationRequest; } private GoogleApiClient getLocationApiClient(){ return new GoogleApiClient.Builder(App.instance) .addConnectionCallbacks(this) .addOnConnectionFailedListener(this) .addApi(LocationServices.API) .build(); } … apiClient = getLocationApiClient(); apiClient.connect(); @Override public void onConnected(@Nullable Bundle bundle) { … LocationRequest locationRequest = createLocationRequest(); LocationServices.FusedLocationApi.requestLocationUpdates(apiClient, locationRequest, new LocationListener() […]

External Display feature testing in Emulator JBMR1

I have downloaded Jelly Bean MR1 SDK in eclipse and wanted to see External Display feature. In Emulator, I enabled Secondary display in “Simulate secondary displays” feature in Development Settings => It created Overlay #1 I used the API Demo->App->Activity->Presentation , but Only “Display # 0 , Built in Screen” is showing up. Overlay is […]

Run custom ROM on Android Emulator

I downloaded a third-party ROM, and I want to run it on the emulator first before flash it into the phone. Here is the contents of cm-11-20140911-NIGHTLY-p3110.zip: 1. boot.img 2. file_contexts 3. META-INF/ 4. recovery/ 5. system/ I unpacked boot.img using the script unpack-bootimg.pl and get boot.img-kernel, and boot.img-ramdisk.cpio.gz. Then I repacked the system using […]

Passing Activity to non-activity object properly

In my app ive got a non-activity object which it’s role is being a manager class. many times i need to pass “source activity” to methods as parameter to that manager class in order to make some operations on that activity. for example let’s assume we have MyActivity which gotta do some toast. so i […]

my status bar in android 4.2.2 emulator is broken

Today I found the status bar in android 4.2.2 emulator is broken.I cannot pull it down. I have no idea what happened.

How can I allocate more than 1024 MB RAM on AVD?

I want to work with 1024MB or greater RAM sizes, but when I try to start my Virtual Device, I receive this error: Failed to allocate memory: 8 After research, some solutions which did not work for me are: Manually change avd‘s .ini files etc. Run emulator as Administrator Run from command line a solution […]

adb -s emu geo fix not works without using telnet

My app works on Google Apis 17. I want to set the gps location after an emulator is being launched. I try to this follow how-to-emulate-gps-location-in-the-android-emulator. 1st. get the serials number of the emulator. >adb devices emulator-5554 2nd run adb -s emulator-5554 emu geo fix 121.4961236714487 31.24010934431376 There are no warnings and errors. I am […]

Android 2 emulators communicating

I am new to android and want to create a simple game between 2 emulators. Emulator 1 can send a string to emulator 2 and emulator 2 can send a string back to emulator 1. Please can someone advise me on how to go about this as I have no idea. Thanks.

Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.