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.
Related
I'm a newbie for Android development. I want to run a Hello World on the emulator in Eclipse as my starting point, but the magic words never show up. I just follow the tutorial, Launch the Android Virtual Device Manager, Create a New AVD and Click Run.
But Everything is fine if it runs on a real device. Is there any special setting on Mac?
Please help.
You have to wait a long time util it appears. I'd advise you to use USB debugging and a real device. It works much faster than the emulator. In addition you can use the app with the normal gestures and all the sensors like camera etc.. But as I said: it's much faster than the AVD.
Check Console tab in Eclipse for information about APK upload and installation progress.
Is there any special setting on Mac?
No there is not. Settings are pretty much the same on all platforms.
I am facing a strange issue wherein HTML5 Geolocation is not working only on Android Emulator. I have a very simple code as follows:
navigator.geolocation.getCurrentPosition(suc, locFail, { 'enableHighAccuracy': true, 'timeout': 60000, 'maximumAge': 60000 });
Once the emulator is running I do supply mock coordinates using DDMS/telnet geo fix.
But the moment it executes the above line of code, the emulator hangs. In LogCat I get messages notifying that each service is dying and then I get the Android Emulator Launch screen. I cannot do anything with the emulator except closing it and restarting it.
Version of Android: 2.3.3
ADT Version: 20
Emulator Settings: Allow mock locations is enabled. Use GPS Satellites is enabled.
The same code works perfectly fine on my desktop browser.
Any help will be highly appreciated.
Thank you
When you create an AVD, you will see two versions. For e.g. The Target names for 2.3.3 will be Android 2.3.3 and Google APIs (Google Inc). Try selecting the Google APIs version for your AVD and see if it works.
Try to move to the Google Maps version of the AVD and see if you are able to see the mock locations.
This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
How to emulate GPS location in the Android Emulator?
I'm struggling with activating the GPS functionality in the Android Emulator (Eclipse)
I wrote a test program for getting the current location. It's working on my Android Phone.. so I'm sure the app is working.
If I'm testing the program in the Android Emulator from Eclipse... nothing is happening! What am I missing?
I already added GPS support in the AVD
I know the Emulator control... but nothing is happening in the app.
Do I need to install some extra futures in the SDK?
I hope someone can point me in the right direction!
With the emulator running, do a
telnet localhost 5554
to connect to the emulator. Then you can do several commands, for example:
geo fix (longitude) (latitude)
That command instructs the emulator to behave as if the phone was at those location (basically fake the GPS coordinates).
You can use google maps feature called "drop latlong marker" to get GPS coordinates for a particular place.
You just need to send latitude and longitude via Emulator Control under DDMS, no need to other things.
pretty simple:)
the geo-fix solution works , but the eclipse ui solution should also work. you are not supposed to install anything special.
try to create a new emulator (which has gps support enabled in its features) and run it , select it in the emulators list under "devices" , and then go to the emulator control . set there the location and press "Send" .
in any case , if that doesn't work , you can even install third party apps on the emulator that do the same thing :
https://play.google.com/store/search?q=location+spoofer&c=apps
I developed an android maps application on Google API 2.1 update-1 platform. And it is the simplest code to show a map on the screen, there is no other things.
However, map doesn't shown on phone. The problem is, the same program runs on my android emulator right but it is not working on my android phone properly, I mean program starts on phone but I see only greeds instead of map. phone android version is th same, 2.1 update-1.
Please help me,
Thanks.
If the same APK file works on the emulator but does not work on the phone, ensure that:
The phone has a working Internet connection
The phone's built-in Maps application works
my problem : the app I have uploaded into my cellular device is shown without the pictures I have insert to it .
steps I have done in order to install:
I have inserted the xxx.apk file into the device via usb
I downloaded an apps installer via the Market
I opened the app using the installer and instead of picture an white background appeared
when I opened the xxx.apk file using file system I found the pictures.
note: even an application icon weren't appearing.
Apparently the res libary having problem to be bined to application.
I might ness to add something to my appliction manifest?
I might need to change something on my device ? (I already made a change and enabled user's not Market application )
I would be very grateful for some life saving answer I need to show my work in a few days in this is the first time i tested her on a real devise.
I also tried an example as shown in hello android book the same example worked perfectly on the emulator where on my android device (Motorola milestone ) the picture and icon weren't shown
Please tell me what I might be doing wrong guys I need to apply my project back at uni(I was the only one in uni who did it on android and in my country most of pep don't even know what android is so getting help outside of forum's like this is not an option ) so please please help me .
I don't know what app installer you downloaded from the Market, but you shouldn't need it. You should be installing the app to your phone using the same SDK tools you used to install it to the emulator. Ie, using Eclipse or the commandline "adb install" commmand.
I'm assuming you used the SDK tools to install the app to the emulators? In which case, start there. Start with looking at what you're doing different between when you installed unsuccessfully to your phone and when you installed to successfully to the SDK.
In my experiences so far, there should be very few differences between working with the emulator and working with the phone.
Well, something is wrong, but what is hard to tell from your question. What pictures are you talking about? Your drawable resources? My guess would be that your application works in the emulator (you have tested it?), but that it doesn't on the phone you're testing with. Have you checked the logcat output?
If you're developing from Eclipse, why not try a debugging session using the phone rather than the emulator?
Hard to narrow down without more details, but a few notes:
Pontus has a point - what's your logcat output? You can use logcat on a real device. Maybe not yours unless it's rooted, but with many phones you can.
Do you link the drawable to your app in the manifest file?
How do you test on emulator vs. device? Do you right-click the app and choose "Run As -> Android Application"? Do you do that for both emulator and device?
When you run on the device, do you first sign it? If so, can you verify the jar/apk and see the contents? Is the drawable under res/drawable?