google-api-client

Using GoogleApiClient in a service

吃可爱长大的小学妹 提交于 2019-12-18 12:19:14
问题 I am trying to get location update information in service. For this I have created a service and in onStartCommand of service class I am creating GoogleApiClient, but I am not getting connection call back in the service. Please help to resolve this. Below given is the service code and in activity I have started service using startService method : startService(new Intent(this, LocationService.class)); service code public class LocationService extends Service implements GoogleApiClient

Logout for GoogleApiClient in Android application

六眼飞鱼酱① 提交于 2019-12-18 08:48:23
问题 Using such code it is possible to link my app and use account. if (mGoogleApiClient == null) { mGoogleApiClient = new GoogleApiClient.Builder(this) .addApi(Plus.API) .addApi(Drive.API) .addScope(Drive.SCOPE_FILE) .addScope(Drive.SCOPE_APPFOLDER) .addConnectionCallbacks(this) .addOnConnectionFailedListener(this) .build(); } mGoogleApiClient.connect(); But is where any way to 'logout' from this account once activated or switch to a new one? 回答1: clearDefaultAccount() doesn't work. For sign out

SecurityException: Not allowed to start service Intent act=com.google.android.c2dm.intent.REGISTER

一个人想着一个人 提交于 2019-12-17 19:57:47
问题 I get the error SecurityException: Not allowed to start service Intent but looks like it do not have good solution after searching many topics. Please help me, Thanks, p/s : I'm make sure I used correct SENDER_ID as project number was defined at Google API Console and correct package name . Error : Caused by: java.lang.SecurityException: Not allowed to start service Intent { act=com.google.android.c2dm.intent.REGISTER pkg=com.google.android.gms (has extras) } without permission com.google

Youtube API v3 Search own videos by tag

只愿长相守 提交于 2019-12-17 19:52:43
问题 Is it possible to search videos by tags using Youtube API v3 ? I would like to search among my own videos. 回答1: Use search method with ##tagname search string for q parameter and set type:video parameter. You can find other search operators here. Old one - tag:tangle doesn't work with new api for me. ## works fine. 回答2: Recently tried the solution given by user 350D, but q=##{YOUR_TAG} does not appear to work with the latest YouTube API. It appears that the tag can only be retrieved when the

Failed to crunch file - Android studio (app:mergeDebugResources)

浪子不回头ぞ 提交于 2019-12-17 18:03:12
问题 i am currentyl trying to implement Google ActivityRecognitionApi. However i get following errors: Error:Failed to crunch file C:\Users\marschall\Desktop\googlesamples-android-play-location-2ed2964\ActivityProject\app\build\intermediates\exploded-aar\com.google.android.gms\play-services-cast-framework\10.0.1\res\drawable-xxhdpi-v4\quantum_ic_forward_30_grey600_36.png into C:\Users\marschall\Desktop\googlesamples-android-play-location-2ed2964\ActivityProject\app\build\intermediates\res\merged

Failed to crunch file - Android studio (app:mergeDebugResources)

落爺英雄遲暮 提交于 2019-12-17 18:02:05
问题 i am currentyl trying to implement Google ActivityRecognitionApi. However i get following errors: Error:Failed to crunch file C:\Users\marschall\Desktop\googlesamples-android-play-location-2ed2964\ActivityProject\app\build\intermediates\exploded-aar\com.google.android.gms\play-services-cast-framework\10.0.1\res\drawable-xxhdpi-v4\quantum_ic_forward_30_grey600_36.png into C:\Users\marschall\Desktop\googlesamples-android-play-location-2ed2964\ActivityProject\app\build\intermediates\res\merged

Separating the Concerns of Activity and GoogleApiClient

送分小仙女□ 提交于 2019-12-17 16:22:47
问题 As usual there is a lot of code in my LoginActivity and I really would prefer to separate the Activity responsibilities from the Google Play sign in concerns. After rewriting this LoginActivity code several times, in many different apps, the easy (and not so elegant) solution was create the Google API client as a Application class object. But, since the connection state affect the UX flow, I never was happy about with this approach. Is there an elegant way of place the GoogleApiClient outside

Google Login Hitting Twice?

拜拜、爱过 提交于 2019-12-17 15:56:13
问题 I'm using Google Login via JS and it appears my code is getting data twice. I'm not sure why this is occurring. When I click my "Log In with Google" button, it spits out (console.log(result)) data for the user. THEN a prompt occurs asking me to choose an account of mine (I'm logged into several google accounts). When I click the account I'd like, the code then spits out that user data again. Why is this occurring? It's a problem because where I spit out the data, I'd like to make a ajax call

Using Postman to access OAuth 2.0 Google APIs

落爺英雄遲暮 提交于 2019-12-17 05:36:45
问题 I am trying to access Proximity Google API using Postman chrome app. I have followed tutorials on postman and google dev website but I'm still getting 401 error message. What am I doing? Step 1 - Enable Proximity API: In order to use Proximity API, it has to be first enabled in Google Dev console. Using this tutorial I have enabled support for Proximity API for my project Step 2 - Get the credentials: According to this tutorial, I need to get client ID and secret. This is where I am confused.

Did ClientLogin API shut down?

旧时模样 提交于 2019-12-14 00:42:04
问题 We have managed SNS service for Samsung mobile(feature phone, camera). We are facging issues regarding ClientLogin API . When we request ClientLogin and then we receive response: 404 Error . This API was only a few hours before the operation. We can't upgrade to OAuth2, because of the device firmware update is not possible. Is there remains to be still available? The formats of request and response are as follows ####################### REQUEST ####################### POST /accounts