2

I am trying to access one of my google fusion tables from my android application. I have a few doubts I would like to clearify (few problems as well):

  1. I tried to query one of the public tables (for test) using this direct URL in my browser: https://www.google.com/fusiontables/api/query?sql=SELECT%20*%20FROM%201W-rjFNnEYYsfJiN2vR8m09XwGQqMQkBHbmRwpQ and faced no problem. Now I want to select all states that have a charcter u in it. (CHANGE) At this first job was to select names of states first. I tried this: https://www.google.com/fusiontables/api/query?sql=SELECT%20State/UT%20Code,India/State/Union%20Territory%20#%20FROM%201W-rjFNnEYYsfJiN2vR8m09XwGQqMQkBHbmRwpQ - I am stuck at this point. Can some body please help. This is a public data and can be viewed here. For this I have already looked at developer docs for querying fusion tables and developer guide for querying fusion tables

  2. I am lost on how to access this data at my android side and insert values in it. Do I have to give public permission to my table? I have looked at developer docs for fusion tables. Do I have to make a REST Client for it and do it that way?

  3. Also, inserting data from my app is problem. I have not tried anything yet in this regard, but have searched a lot and have not found any thing useful. Any link in this regard would do.

  4. What happens after number of request increases the limit? Also, if I create an application using an API key, does the number of hits per user of the application or total number of hits by the application count? Also, what are the charges if one wishes to to increase the limits?

Any link or code in this regard is highly appreciated.

Thanks

harshit
  • 3,788
  • 3
  • 31
  • 54

1 Answers1

1

If you want a simple way to test the API I recommend to use the Google API Explorer for Fusion Tables.

  1. If you have column names with spaces in them, you have to use quotes.
    -> See this example in the API explorer.

    SELECT 'State/UT Code', 'India/State/Union Territory #' FROM 1W-rjFNnEYYsfJiN2vR8m09XwGQqMQkBHbmRwpQ
    
  2. It's probably the easiest to use the already existing Java client for the Google API (there are also other libraries available). Check their Java example for Fusion Tables to get the idea how to use it.

  3. You have to use OAuth to authenticate yourself (see the OAUth guide for "Installed Applications"). The above mentioned Java library also has OAuth support.

  4. I already answered this one on another question.

Community
  • 1
  • 1
Odi
  • 6,916
  • 3
  • 34
  • 52