O'Reilly Forums: Google Map Api Keys - O'Reilly Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Google Map Api Keys

#1 User is offline   thillerson 

  • Active Member
  • PipPipPipPip
  • Group: O'Reilly Author
  • Posts: 109
  • Joined: 06-August 09

Posted 02 March 2010 - 09:07 AM

As mentioned at the end of the class for Week 3, here is the link to the instructions for obtaining a Google Maps API key, which you will need to see the maps for the class next week.

http://code.google.com/android/add-ons/goo...pis/mapkey.html
http://code.google.com/android/add-ons/goo...ebugfingerprint
http://code.google.com/android/maps-api-signup.html

Also, attached is an overview slide that gives you an idea of the steps involved.

Attached thumbnail(s)

  • Attached Image: Screen_shot_2010_03_02_at_10.05.41_AM.png

0

#2 User is offline   LucyLizard 

  • New Member
  • Pip
  • Group: Members
  • Posts: 9
  • Joined: 21-February 10

Posted 04 March 2010 - 05:10 PM

QUOTE (thillerson @ Mar 2 2010, 09:07 AM) <{POST_SNAPBACK}>
Also, attached is an overview slide that gives you an idea of the steps involved.


When I try to download the png, I get an error: "Please Log In to access this forum or feature." Which is odd because I am logged in (to O'Reilly).

Perhaps there is some permission problem?

0

#3 User is offline   applejay 

  • Active Member
  • PipPip
  • Group: Members
  • Posts: 49
  • Joined: 17-February 10

Posted 06 March 2010 - 09:20 PM

I just get "Error Message" when i click on it.
<-- Also logged in
0

#4 User is offline   thillerson 

  • Active Member
  • PipPipPipPip
  • Group: O'Reilly Author
  • Posts: 109
  • Joined: 06-August 09

Posted 07 March 2010 - 04:08 PM

Strange.. not sure what's up there. In any case, follow the instructions at the links and if you get a key, you're set.
0

#5 User is offline   sarahkim 

  • Active Member
  • PipPipPipPipPip
  • Group: Root Admin
  • Posts: 157
  • Joined: 12-November 07
  • Gender:Female
  • Interests:online communities

Posted 10 June 2010 - 09:45 AM

Hi,

The permissions are now fixed so anyone can download the png. Sorry for the inconvenience and for taking so long to respond.

Kind regards,
Sarah
Sarah Kim
Online Community Manager
O'Reilly Media, Inc.
<a href="http://community.oreilly.com" target="_blank">http://community.oreilly.com</a>
0

#6 User is offline   cnamz 

  • New Member
  • Pip
  • Group: Members
  • Posts: 1
  • Joined: 26-April 11

Posted 26 April 2011 - 07:57 PM

I previously had some issues with the position manipulation and rendering, but this helped. Thx.
0

#7 User is offline   charles1983 

  • New Member
  • Pip
  • Group: Members
  • Posts: 6
  • Joined: 11-June 11

Posted 18 June 2011 - 12:38 PM

View Postthillerson, on 02 March 2010 - 09:07 AM, said:

As mentioned at the end of the class for Week 3, here is the link to the instructions for obtaining a Google Maps API key, which you will need to see the maps for the class next week.

<a href="http://code.google.com/android/add-ons/google-apis/mapkey.html" target="_blank">http://code.google.com/android/add-ons/goo...pis/mapkey.html</a>
<a href="http://code.google.com/android/add-ons/google-apis/mapkey.html#getdebugfingerprint" target="_blank">http://code.google.com/android/add-ons/goo...ebugfingerprint</a>
<a href="http://code.google.com/android/maps-api-signup.html" target="_blank">http://code.google.com/android/maps-api-signup.html</a>

Also, attached is an overview slide that gives you an idea of the steps involved.














I am a student in uni. hertfordshire. i was given a course work to write a twitter app for android enabled mobile phones. i got the online tutorial of tonny and it has helped me to this point but i've not been able to go pass week 1 step 3 for the past 2 weeks. I am using twitter4j 2.2.4. my program always stop at the Authorization blank page instead of bringing in twitter log in page as shown at the end of week 1 step 3. the codes that i used are below pls i need help on this. pls it's urgent. Thanks


package com.seyi.android.projecttwitter;

import twitter4j.Twitter;
import twitter4j.TwitterException;
import twitter4j.auth.RequestToken;
import android.app.Application;
import twitter4j.TwitterFactory;


import com.seyi.android.projecttwitter.authorization.OAuthHelper;




public class MyProjectApplication extends Application {

private OAuthHelper oAuthHelper;
private RequestToken currentRequestToken;
private Twitter twitter;

@Override
public void onCreate() {
super.onCreate();
oAuthHelper = new OAuthHelper(this);
twitter = new TwitterFactory().getInstance();
oAuthHelper.configureOAuth(twitter);
}

public Twitter getTwitter(){
return twitter;
}

public boolean isAuthorized(){
return oAuthHelper.hasAccessToken();
}

public String beginAuthorization(){
try {
if (null == currentRequestToken){
currentRequestToken = twitter.getOAuthRequestToken();

}
return currentRequestToken.getAuthorizationURL();
}
catch (TwitterException e) {

e.printStackTrace();
}
return null;

}
}





package com.seyi.android.projecttwitter.activities;

import com.seyi.android.projecttwitter.MyProjectApplication;
import com.seyi.android.projecttwitter.R;
import android.app.Activity;
import android.os.Bundle;
import android.webkit.WebView;

public class AuthorizationActivity extends Activity {


private MyProjectApplication app;
private WebView webView;

@Override
protected void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);

app = (MyProjectApplication)getApplication();
setContentView(R.layout.authorization_view);
setUpViews();
}

@Override
protected void onResume() {
super.onResume();
String authURL = app.beginAuthorization();
webView.loadUrl(authURL);
}
private void setUpViews() {
webView = (WebView)findViewById(R.id.web_view);

}

}






package com.seyi.android.projecttwitter.activities;

import com.seyi.android.projecttwitter.MyProjectApplication;
import com.seyi.android.projecttwitter.R;

import android.app.ListActivity;
import android.content.Intent;
import android.os.Bundle;

public class StatusListActivity extends ListActivity {
private MyProjectApplication app;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
app =(MyProjectApplication)getApplication();

setContentView(R.layout.main);
}
@Override
protected void onResume() {
super.onResume();
if(!app.isAuthorized()){
beginAuthorization();

}

else{
// load the user's home timeline
}
}
private void beginAuthorization() {
Intent intent = new Intent (this , AuthorizationActivity.class);
startActivity(intent);

}

}










package com.seyi.android.projecttwitter.authorization;

import java.io.InputStream;
import java.util.Properties;

import twitter4j.Twitter;

import android.content.Context;

import com.seyi.android.projecttwitter.R;


public class OAuthHelper {
private String consumerKey;
private String consumerSecretKey;
private Context context;

public OAuthHelper (Context context){
this.context = context;
loadConsumerKeys();

}

public void configureOAuth(Twitter twitter){
twitter.setOAuthConsumer(consumerKey,consumerSecretKey);
}
public boolean hasAccessToken(){
return false;
}
private void loadConsumerKeys() {

try {
Properties props = new Properties();
InputStream stream = context.getResources().openRawResource(R.raw.oauth);
props.load(stream);
consumerKey = (String)props.get("consumer_key");
consumerSecretKey = (String)props.get("consumer_secret_key");
} catch (Exception e) {
throw new RuntimeException("Unable to load consumer keys from oauth.properties", e);

}
}
}




authorization_view.xml


<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<WebView
android:id="@+id/web_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/enter_pin_title"/>

</RelativeLayout>





main.xml



<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<ListView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@id/android:list"/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@id/android:empty"
android:text="@string/no_tweets"
android:gravity="center_vertical|center_horizontal"/>
</RelativeLayout>


strings.xml



<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="authorization">Authorization</string>
<string name="authorize">Authorize</string>
<string name="enter_pin">To authorize, sign in to Twitter and enter Pin here:</string>
<string name="no_tweets">tweets are not available now</string>
<string name="app_name">Project Twitter</string>
</resources>




oauth.properties file



consumer_key=82Rdur4NgikjyxGXaVaA
consumer_secret_key=FuPg1qYJbZ8fy66OlBQuD4zJ981tFLvxWyMHYEYXQM
0

#8 User is offline   arunnayak 

  • Active Member
  • PipPip
  • Group: Members
  • Posts: 20
  • Joined: 12-June 12

Posted 13 June 2012 - 10:28 PM

The Google Maps JavaScript API v3 does not require an API key to function correctly. its better to load the Maps API using an APIs Console key which allows to monitor application's Maps API usage.
0

#9 User is offline   jazzninja 

  • New Member
  • Pip
  • Group: Members
  • Posts: 8
  • Joined: 25-August 10

Posted 01 August 2012 - 03:42 AM

Hello,
Im getting an error in my logcat that reads "couldn't get connection factory error". I can't go to and zoom in on the input addresses (vid 1 wk 4 pt 4 21mins) as its saying I have an IOException:Service not available.

I have put in both the coarse and fine location permissions in the manifest and am getting the map tiles ok (which I'm hoping means I have the correct key).

Any hints please?

Many thanks
0

#10 User is offline   Khan Fused 

  • New Member
  • Pip
  • Group: Members
  • Posts: 1
  • Joined: 05-August 12

Posted 05 August 2012 - 12:23 PM

FYI: Anyone who is working through these videos following release of Oracle's v7 JDK will run into a minor problem following the instructions to generate their keys.

v7 implemented a new version of the keytool, which by default outputs the hash in SHA format, not MD5. Google's API key webpage will refuse to work with an SHA hash.

When working in the shell with Linux (and probably Macintosh), you need to add the " -v " parameter to the keytool command. That will display the MD5 and SHA256 hashes as well as SHA1.

http://stackoverflow...-not-only-sha-1
http://code.google.c...035#makechanges
0

#11 User is offline   pixon 

  • New Member
  • Pip
  • Group: Members
  • Posts: 1
  • Joined: 18-September 12

Posted 18 September 2012 - 02:46 AM

how to fix api problem its taking long time to respond Posted Image :) :rolleyes:

This post has been edited by pixon: 18 September 2012 - 02:48 AM

0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users