FAQ Database Discussion Community


When should I disconnect GoogleApiClient (Android)

android,google-plus,google-api-client,google-login
In my android app, I have 3 login options. Google+, Facebook, and my own login option. I've implemented all 3. I've implemented Google+ login using the steps outlined here. Server side access is enabled. I get the one time authorization code and pass it to my own api. Once I've...

Google Drive API 500 null errors when copying

google-api,google-drive-sdk,google-api-php-client,google-api-client
I'm getting this error message (100% of the time) when copying a shared file, using the latest version of php library. And I'm getting the same response via the API explorer: developers.google.com/drive/v2/reference/files/copy Google_Exception: Error calling POST https://www.googleapis.com/drive/v2/files/#fileid#/copy: (500) { "error": { "code": 500, "message": null } } This issue seem...

What is permissionId in Google API?

google-drive-sdk,google-api-client
I am trying to replicate the JavaScript client library example shown on https://developers.google.com/drive/v2/reference/permissions/update#examples. There is a reference to permissionId. How do I get this, I've looked everywhere, and my assumption is I am missing something dead obvious. Thanks in advance....

Error in Google Map API inside Navigation Bar Fragments

android,google-maps,android-fragments,android-fragmentactivity,google-api-client
I am trying to build an app with Navigation bar and Google Map API in it. I followed both of these: http://www.androidhive.info/2015/04/android-getting-started-with-material-design/ http://blog.teamtreehouse.com/beginners-guide-location-android tutorial and when I put the map tutorial into one of the fragment inside the navigation bar I'm getting these error: myGoogleApiClient = new GoogleApiClient.Builder(this) .addConnectionCallbacks(this) .addOnConnectionFailedListener(this)...

Image Search Example via Rails Google API Client

google-app-engine,ruby-on-rails-4,google-api-client,google-custom-search
I need to replicate "Search Google for this Image" in my rails app where image search is performed on an image in the app. I am using google-api-ruby-client gem. To test the api I am starting with a simple query search: Trying this for a regular search term but getting...

Linking to Google APIs Objective-C Client Library as iOS static library

ios,xcode,google-api,google-api-client,google-client
I have so far used Google APIs Client Library for Objective-C by compiling the source files directly into my app (as described here). If I were to switch over to linking to the iOS static library (as also described here), how would this insure that the code works on different...

Google+ Sign In cross client(android/web) authentication

android,google-api-php-client,google-api-client
i'm trying to integrate 'Log in with Google' in app that have an android and web component. Everything in the web component is working fine with the following steps: 1. Rendering the view with an anti-forgery token, client id and app name. $state = md5(rand()); Session::set('state', $state); $this->view->render('login', array( 'CLIENT_ID'...

Failed sending mail through google api with javascript

javascript,email,google-api,google-api-client
I'm trying to send an email through Google API with JavaScript. My issue is that when I try to send a simple mail with no attachments, I get the following error: 'raw' RFC822 payload message string or uploading message via /upload/* URL required` My code function sendMessage() { gapi.client.load('gmail', 'v1',...

Google API client bug, sending locations

android,google-api,google-api-client,android-googleapiclient
I want to create that I send every few seconds a message to GCM. But after some time I want to remove the locationupdates again. For sending the data to the intentservice of gcm I use a pendingintent. Now every time and it happens a lot I get this error...

Send location updates to IntentService

android,intentservice,google-api-client
How can location updates be sent directly to Intent Service? The following approach does not work. OnConnected function is called but then the intent is never received in the service: ... private PendingIntent getLocationPendingIntent(boolean shouldCreate) { Intent broadcast = new Intent(m_context,LocationUpdateService.class); int flags = shouldCreate ? 0 : PendingIntent.FLAG_NO_CREATE; return...

How to change the google API “service account” name/email address

google-api,google-oauth,google-api-client
I am using the Google API to create a spreadsheet on google drive. My app has a link that says 'Download To Google Doc' The app sends a file to google docs and shares it with the user. The user can then see it in google docs. This all works...

Android device needs restart/reboot to get GPS locations after having GPS chip active a long time

android,gps,google-api-client
I'm developing yet another GPS tracking application for Android and I'm testing my code in Sony Xperia SP c5302 with Android 4.3. I made a background service which uses Google Play Services' GoogleApiClient to get fused locations. I'm able to get locations fine but after a couple hours I realize...

Android - location not updating

android,android-emulator,gps,location,google-api-client
At the moment when i use the geo fix lng lat command my application doesn't pick up that the location has changed. My simplified code looks like this: if (googleApiClient.isConnected()) { Location lastKnownLocation = LocationServices.FusedLocationApi.getLastLocation(googleApiClient); if (lastKnownLocation!= null){ Log.d("Log", "Lat: " + lastKnownLocation.getLatitude()); Log.d("Log", "Lng: " + lastKnownLocation.getLongitude()); } else...

mGoogleApiClient.isConnected() returns null

android,google-play-services,google-api-client
I have gone through all the StackOverflow questions and tried every method but still the problem persists. public class PlaceInfoActivity extends ActionBarActivity implements GoogleApiClient.ConnectionCallbacks, GoogleApiClient.OnConnectionFailedListener { private static final String LOG_TAG = "PlaceInfoActivity"; private static final int GOOGLE_API_CLIENT_ID = 0; private GoogleApiClient mGoogleApiClient; TextView mTextView; String content = ""; @Override...

FusedLocationApi MapView in Fragment - addConnectionCallbacks, onConnectionSuspended

android,google-api-client,fusedlocationproviderapi
I have a MapView in a fragment, and I'm having two problems that I can't seem to find solutions for. I've searched but I don't see anyone else having these problems. For reference, I am mainly following this tutorial on the developer pages. This is my fragment: public class MapFragment...

Recursive entry to executePendingTransactions on using GoogleApiClient in Fragment

android,android-fragments,google-places-api,google-api-client
I am trying to use Place Autocomplete API in my app. I have a main Activity. I have a Fragment which is a part of MainActivity. In OnViewCreated() on this Fragment. private void rebuildGoogleApiClient() { // When we build the GoogleApiClient we specify where connected and connection failed // callbacks...

google api client callback is never called

android,google-api-client
I am trying to get the last known location using google services API, but after I build the GoogleApiClient, no callback method is ever fired. My activity looks like that : public class MainActivity extends Activity implements FragmentObserver, SessionSpotListObserver, ConnectionCallbacks, OnConnectionFailedListener{ //Objects used for the location API private Location mLastLocation;...

logout from Google+ from other activity

android,google-play,google-api-client
I have recently implemented the Google+ API. I managed to succesfully authenticated and move forward to the main activity. My issue is that I would like to include a "LogOut" option in the action bar menu and when the user comes back he will be prompted to login again. I...

Check if geo location(lat,lon) inside a circular geo fence

android,google-api-client,locationlistener,android-geofence
I have a saved geo location(latitude,longitude).when a user presses a action button in app, the current location is recorded. I want to check if the current latitude,longitude(which I have) falls in a circular geofence (who's center geo point I have ). I don't want to create a geofence on Google...

GoogleApiClient: not firing onConnected or onConnectionFailed

android,google-api-client
So, I'm trying to get my last location using GoogleApiClient. I'm executing a connect statement, but onConnected is not firing, nor is onConnectionFailed firing. Any ideas? Remark: I'm running this on an emulator, not a real device. Browsing on the emulator works. package com.example.jdc.testjdc; import android.location.Location; import android.support.v7.app.ActionBarActivity; import android.os.Bundle;...

android - service for interaction with wearable

android,android-service,android-wear,google-api-client,android-wear-data-api
I tried creating a service (which extends WearableListenerService) which should send as well as receive data with wearable. But when i created GoogleApiClient object in that service, it failed with NullPointerException. public class MyService extends WearableListenerService{ private GoogleApiClient mGoogleApiClient = new GoogleApiClient.Builder(this) .addApi(Wearable.API) .build(); private final String MESSAGE_PATH = "/message";...

GoogleApiClient null pointer exception

java,android,google-api-client
I try to learn android development and now i developing an app with fused location service. I got a RunFragment.java class when i want to put the GoogleMap fragment, Textviews with latitude and longitude and some other widgets. First of all i want to connect to GoogleApiClient and i created...

Google API: object oauth2 is not a member of package com.google.api.services

google-api,playframework-2.0,sbt,google-api-java-client,google-api-client
I'm developing a web backend using the Google APIs. In order to get the email address of a user, you have to send your access token to a Google tokenInfo service, that will return general information (including your email address). In general Google APIs do not return you the mail...

Multiple GoogleApiClient not firing connect()

android,authentication,google-plus,google-api-client,google-fit
TL;DR; GoogleFit Api client does not connect if is signed in with Google+ So... I'm facing a problem when using GoogleFit and Google+ api together. I am using Google+ to sign in a user and using GoogleFit to retrieve fitness. Besides Google+ I have several other login options such as...

Authorization issue with cron crawler inserting data into Google spreadsheet using Google API in Ruby

ruby,cron,google-api,web-crawler,google-api-client
My project is to crawl the certain web data and put them into my Google spreadsheet every morning 9:00. And it has to get the authorization to read & write something. That's why the code below is located at the top. # Google API CLIENT_ID = blah blah CLIENT_SECRET =...

Cannot Implement GoogleApiClient.ServerAuthCodeCallbacks in android

android,google-api-client,google-login
I am implementing Google plus login system to my android app by following the tutorial of google developer at https://developers.google.com/identity/sign-in/android/sign-in According to the tutorial, I should implement: GoogleApiClient.ServerAuthCodeCallbacks interface to enable server-side API access for the android app. However, 'ServerAuthCodeCallbacks' interface does not exist in the GoogleApiClient library, even in...