<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Tech Blog &#187; google maps api</title>
	<atom:link href="http://informationideas.com/news/tag/google-maps-api/feed/" rel="self" type="application/rss+xml" />
	<link>http://informationideas.com/news</link>
	<description>Using technology to help your business</description>
	<lastBuildDate>Sat, 17 Mar 2012 02:14:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Getting Android emulator working with Google Maps API Key</title>
		<link>http://informationideas.com/news/2008/11/06/getting-android-emulator-working-with-google-maps-api-key/</link>
		<comments>http://informationideas.com/news/2008/11/06/getting-android-emulator-working-with-google-maps-api-key/#comments</comments>
		<pubDate>Thu, 06 Nov 2008 19:47:46 +0000</pubDate>
		<dc:creator>frank</dc:creator>
				<category><![CDATA[android]]></category>
		<category><![CDATA[Coding]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[google maps api]]></category>

		<guid isPermaLink="false">http://informationideas.com/news/?p=64</guid>
		<description><![CDATA[I was trying to get an Android app that uses Google Maps API to display a MapView running on the emulator.Â  It took quite a bit of hair pulling to finally get it working. First, I tried using a self-signed keystore instead of the the debug.keystore provided through the Android SDK.Â  I created my keystore [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop --><!-- End Shareaholic LikeButtonSetTop --><p>I was trying to get an Android app that uses Google Maps API to display a MapView running on the emulator.Â  It took quite a bit of hair pulling to finally get it working.</p>
<p>First, I tried using a self-signed keystore instead of the the debug.keystore provided through the Android SDK.Â  I created my keystore using keytool -genkey from JDK.Â  Then I switch the app from using the default, debug.keystore, to my-new-self-signed.keystore.Â  Using keytool -list, I got the MD5 of the certificate that is needed to obtain a Google Map API key.Â  Then the API key was put into the MapView android:apikey attribute.Â  When I brought up the app in the emulator, I got a blank map grid screen.Â  The reason I wanted to use the self-signed keystore instead of the debug keystore is so I don't have to obtain a new Map API key and change the code to reflect this upon releasing the app.</p>
<p>So, I decided to go with the debug.keystore and that worked fine.Â  Here is what I had to do.</p>
<ol>
<li>
<pre class="prettyprint">$ keytool -list -alias androiddebugkey -keystore &lt;path_to_debug_keystore&gt;.keystore -storepass android -keypass android</pre>
</li>
<li>Copy that MD5 and goto <a href="http://code.google.com/android/maps-api-signup.html">http://code.google.com/android/maps-api-signup.html</a></li>
<li>Signup for an API key</li>
<li>In my xml file that has the views for the activity, add
<pre class="prettyprint">&lt;com.google.android.maps.MapView
 android:layout_width="fill_parent"
 android:layout_height="fill_parent"
 android:enabled="true"
 android:clickable="true"
 android:apiKey="example_Maps_ApiKey_String"
 /&gt;</pre>
</li>
<li>In the Manifest.xml file, add the permissions needed<br />
&lt;uses-permission android:name="android.permission.INTERNET"&gt;&lt;/uses-permission&gt;<br />
&lt;uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"&gt;&lt;/uses-permission&gt;</li>
<li>In the Manifest.xml file, add the maps library<br />
&lt;uses-library android:name="com.google.android.maps" /&gt;<br />
within the application tag</li>
<li>The entire Manifest.xml looks like this<br />
&lt;?xml version="1.0" encoding="utf-8"?&gt;<br />
&lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"<br />
package="com.informationideas.mapapp"<br />
android:versionCode="1"<br />
android:versionName="1.0.0"&gt;<br />
&lt;uses-permission android:name="android.permission.INTERNET"&gt;&lt;/uses-permission&gt;<br />
&lt;uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"&gt;&lt;/uses-permission&gt;<br />
&lt;application android:icon="@drawable/icon" android:label="@string/app_name"&gt;<br />
&lt;uses-library android:name="com.google.android.maps" /&gt;<br />
&lt;activity android:name=".ShowDesktop"<br />
android:label="@string/app_name"&gt;<br />
&lt;intent-filter&gt;<br />
&lt;action android:name="android.intent.action.MAIN" /&gt;<br />
&lt;category android:name="android.intent.category.LAUNCHER" /&gt;<br />
&lt;/intent-filter&gt;<br />
&lt;/activity&gt;<br />
&lt;/application&gt;<br />
&lt;/manifest&gt;</li>
<li>The default activity file should look like this
<p>package com.informationideas.mapapp;<br />
import android.os.Bundle;<br />
import com.google.android.maps.MapActivity;</p>
<p>public class ShowDesktop extends MapActivity {</p>
<p>/** Called when the activity is first created. */<br />
@Override<br />
public void onCreate(Bundle savedInstanceState) {<br />
super.onCreate(savedInstanceState);<br />
setContentView(R.layout.main);</p>
<p>}</p>
<p>@Override<br />
protected boolean isRouteDisplayed() {<br />
// TODO Auto-generated method stub<br />
return false;<br />
}<br />
}</li>
</ol>
<p>Now off to building cool things with the map!</p>
<div class="shr-publisher-64"></div><!-- Start Shareaholic LikeButtonSetBottom --><!-- End Shareaholic LikeButtonSetBottom -->]]></content:encoded>
			<wfw:commentRss>http://informationideas.com/news/2008/11/06/getting-android-emulator-working-with-google-maps-api-key/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.280 seconds -->

