Jump to content


Photo

Google Map Api Keys


  • Please log in to reply
11 replies to this topic

#1 thillerson

thillerson

    Active Member

  • O'Reilly Author
  • PipPipPipPip
  • 109 posts

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.c...pis/mapkey.html
http://code.google.c...ebugfingerprint
http://code.google.c...api-signup.html

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

Attached Thumbnails

  • Screen_shot_2010_03_02_at_10.05.41_AM.png


#2 LucyLizard

LucyLizard

    New Member

  • Members
  • Pip
  • 9 posts

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?


#3 applejay

applejay

    Active Member

  • Members
  • PipPip
  • 49 posts

Posted 06 March 2010 - 09:20 PM

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

#4 thillerson

thillerson

    Active Member

  • O'Reilly Author
  • PipPipPipPip
  • 109 posts

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.

#5 sarahkim

sarahkim

    Active Member

  • Root Admin
  • PipPipPipPipPip
  • 157 posts
  • 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.
http://community.oreilly.com

#6 cnamz

cnamz

    New Member

  • Members
  • Pip
  • 1 posts

Posted 26 April 2011 - 07:57 PM

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

#7 charles1983

charles1983

    New Member

  • Members
  • Pip
  • 6 posts

Posted 18 June 2011 - 12:38 PM

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.c...is/mapkey.html" target="_blank">http://code.google.c...mapkey.html</a>
<a href="http://code.google.c...bugfingerprint" target="_blank">http://code.google.c...fingerprint</a>
<a href="http://code.google.c...pi-signup.html" target="_blank">http://code.google.c...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.andro...pk/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.andro...pk/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

#8 arunnayak

arunnayak

    Active Member

  • Members
  • PipPip
  • 20 posts

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.

#9 jazzninja

jazzninja

    New Member

  • Members
  • Pip
  • 8 posts

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

#10 Khan Fused

Khan Fused

    New Member

  • Members
  • Pip
  • 1 posts

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

#11 pixon

pixon

    New Member

  • Members
  • Pip
  • 1 posts

Posted 18 September 2012 - 02:46 AM

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

Edited by pixon, 18 September 2012 - 02:48 AM.


#12 Software Developersinc

Software Developersinc

    New Member

  • Members
  • Pip
  • 5 posts

Posted 30 December 2014 - 06:06 AM

Excellent idea to explore more on Google Map API keys, read and understand will try to use in my android app. But if suppose I miss out please do clarify me at point of time.

Also Please any one help me out how to get an app for forum




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users