I have include Google map view in my android application. When I debug with my computer in office it gives the map in my map view. But when I try to test it at home it did not give any map.
I need to know how can I debug with custom debug key so I can test it with any computer other than my office computer.
Thanks in advance !!
Each key is unique for specific computer. You have to generate a debug key for each computer you use.
Another solution is to register an account in market and get account's key. Using this key, you can run the application from each computer you want, but you have to export signed apk.
Related
There is any way to configure google maps api key using command line or any other way without accessing the console website? I'm trying build and release Android APKs using command line, everything is already working fine, but every Android APK has different packageId and all of them use Google Maps. How can I automate this configuration?
BB:0D:AC:74:D3:21:C1:43:67:71:9B:62:71:AF:A1:66:6A:67:5B:75;com.example.myexample1
BB:0D:AC:74:D3:21:C1:43:67:71:9B:62:71:AF:A1:66:6A:67:5B:75;com.example.myexample2
BB:0D:AC:74:D3:21:C1:43:67:71:9B:62:71:AF:A1:66:6A:67:5B:75;com.example.myexample3
No, it is not possible. You can automate the creation of those strings (SHA and package of the app), but you can't send them and retrieve the key, you have to use the web console in the browser.
You need to create the key once, so it has a very low usefulness the script via commandline
I have a keystroke from google for my app. When I try to Export signed application package from eclipse, it gives me an option to either create a new keystore or to use an existing one.
As per my understanding I must use the "Base64-encoded RSA public key" that I got from Google. But there is no way I can download the key directly from the page where google displays it for me.
Can someone please let me know if I have to import it in someway or am I missing something?
Or should I just copy paste the key to some (binary) file in my project? Please help!
I have a keystroke from google for my app.
But there is no way I can download the key directly from the page where google displays it for me.
Which page is that? You shouldn't download a key in order to sign your application.
Or do you mean the debug.keystore which comes with the installation of the Android bundle? You can use it during development, but you need to create your own key when releasing the App. (Google Play won't accept an apk signed with the debug keystore)
If you are not releasing yet and you want to use the debug keytore - search your system for 'debug.keystore'. On Windows it can be in:
C:\Users\USERNAME\.android\debug.keystore
The passwords for the keystore and the android alias are android.
If however you want to create a new key for yourself - you can do that using the provided keytool as described here.
Finally, if you need an additional key for accessing some Google API (eg. Maps) with your App, then from the online developer console you need to create an additional Android key with the same fingerprint, as the one that you are signing the App with. This additional key is typically included in your manifest after that.
For reference, you can create new keys for your App here: https://console.developers.google.com
Is there a way I can provide the signed key to the builder and let the app build and install onto my device using the signed key directly? or I have to export the app manually and choose the key, enter the password, and then install it on my device manually?
So simply the question is: is there a way to use signed key while building app in eclipse (Which automatically installs it on device)?
Please notice: I'm not asking asking about how to debug it, I just need to run it directly from eclipse to device with signed key.
I have never done it but according to the docs you can. You have to configure it to run that way by giving it a path to the keystore and the password. But it looks like once you get it set up then it will be easy and do what you need.
Run in release mode
Here is also a SO post about it.
I have signed and get this kind of code:
<com.google.android.maps.MapView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:apiKey="0vzxVMvckBdI64O0FdGSRXawhfAlw"
/>
Then I put it to main.xml, under the . I run the project, it force close. The error is that XML can not find MapView. But I have add the library below. Moreover, I have test with google API Vitual machine, and it does not work too. Then I add Internet permission, and add:
<uses-library android:name="com.google.android.maps" />
under the in manifest, but it still does not work.
Could anybody tell me clearly step by step what I have to do, I am in a mess now and I can understand want to do next.
Before signed the apiKey, my application run well. Anybody help me.
Thanks in advance.
If you app worked well before signing your app then its the problem of you map Api key.
You can get a temporary Maps API Key based on your debug certificate, but before you publish your application, you must register for a new Key based on your release certificate and update references in your MapViews accordingly.
use adb to install the apk on your device/emulator (adb install app.apk). Don't forget to uninstall the debug version first, otherwise the signature difference will prevent the installation
EDIT:
When using GoogleMaps for Android, you need two keys - debug and release.
The "debug" key is kind of a misleading term. This key is also to be used when you develop the app in Eclipse. So essentially, use the debug key for development, testing, debugging.
When you're ready to launch the app to Market, set the android:debuggable="false" in the AndroidManifest.xml and use the Signed API key.
When using the signed API key, the MapView will show up ONLY when the app is installed from the Android Market. So, installing the app from Eclipse (Run As, Debug As, etc) or command line (adb install) won't show the MapView. Rest assured, once the app is in the Market - you download it and the MapView will show up.
With the signed API key, if you deploy the app from Eclise, you will get a "Server returned 3, IOProcessing Exception 26" as a warning - just ignore it.
Note: Also ensure there are no duplicate instances of the same MapView. If your app needs "x" no. of MapViews, generate "x" no. of new signed keys (one for each MapView) since GoogleMaps has a query limit for a single MapView instance.
For getting both the keys, follow the steps for Obtaining API keys for GoogleMaps on Android.
I have attached a mapview to my layout and have a it showing a compass and my current location. The problem I have is, that there is no street map shown in the view, so basically I just see the compass and my current location over a blank grid.
When you run or debug through Eclipse your app is signed with your debug key which will have been automatically created. It is not the same as the key you sign your app with when releasing it.
You need to get an API key using your debug key.
See the 'Getting the MD5 Fingerprint of the SDK Debug Certificate' section on http://code.google.com/android/add-ons/google-apis/mapkey.html
Once you are ready to release your app, you replace the debug API key with the API key you are currently using.
Make sure you have the INTERNET permission and a proper API key. Either of those will give you the blank grid effect.
http://code.google.com/android/add-ons/google-apis/mapkey.html
Turns out the map is only shown when the app is signed and uploaded using adb install {path to app}, the same app didn't work when I run or debug using Eclipse.
Check out the followings:
1. include jar of maps.
2. generate your certificate and register it. It should work now
:)