Giter Club home page Giter Club logo

google-services's Introduction

Google APIs for Mobile: Quickstarts

A collection of quickstart samples demonstrating the Google APIs for Android and iOS.

How to make contributions?

Please read and follow the steps in the CONTRIBUTING.md

Build Status

google-services's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

google-services's Issues

Issue with device registration.

Hi,

I am having an issue while registering a device on GCM. I follow the steps from GCM but the device keep displaying a busy icon with a message (Generating InstanceID toke ) and never register it.

screen shot 2015-07-23 at 18 16 12

AppInvites example permission error

Hi there, I am having a problem with the latest version of Google AppInvites for IOS. I was using the previous version last month and it worked before. But somehow the new version did not work anymore or Google had changed something recently on the AppInvites backend.

I have installed Google's default AppInvitesExample.xcodeproj from: pod try Google
I have configured the bundle ID and reverse client id and got the correct GoogleService-Info.plist file.
Then I executed the xcworkspace and run the xcode project in iphone simulator.
Google Signin is working as I can see my name "Signed in as xxx".
But when I click the button "INVITE FRIENDS" the appinvite dialog appeared for a while but it automatically closes. After that, I will get the error "The operation couldn't be completed. (The caller does not have permission)

Can anybody help ? Thanks !

appinviteerror

https://github.com/googlesamples/google-services/tree/master/android/analytics does not compile.

This sample app doesn't compile. The R.xml.global_tracker file does not exist.
The getting started guide here: https://developers.google.com/analytics/devguides/collection/android/v4/start
actually won't accept my app name because the title contains an '&', so I can't even generate a configuration file for an app that is live in the Play Store.
There's so much conflicting information that I have no idea how to even get started with Analytics. I've been using Tag Manager which I had similar problems with, but managed to get working somehow. Now I want to enable campaign tracking and maybe demographic info and am stuck once again.

Emulator problem

Hi,

I extended a bit the nice app for GCM and I tested the app on 2 mobile devices and it works well. Moreover, I want to do some analysis on emulator and I installed the app on emulator (Intel x86) and added google play services and a google account to the emulator. The app can connect to GCM server and get registration token but when I send a message to the devices, the real mobile devices receive the message but the emulator doesn't receive the message. I tried to send a message just to the emulator but it doesn't work. I tested on both Android API 21 and 23 and it doesn't receive messages. Emulator with Android API 22 has problem with google play services (It may has a bug). The real mobile phone that I tested is Nexus 5 (Android 4.4.2) and Galaxy S6 (Android 5.1.1).

It is about 3 days that I am dying to know what is the problem.

It would be great if you can help me.

Thanks a lot.

Could not find any version that matches com.google.android.gms:play-services-gcm:7.5.+.

When I import GCM Project to Android Studio on OSX

Android Studio AI-141.2024585
Build #AI-141.2024585, built on June 18, 2015
JRE: 1.6.0_65-b14-466.1-11M4716 x86_64
JVM: Java HotSpot(TM) 64-Bit Server VM by Apple Inc.

I get following gradle errors:

Error:A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugCompile'.
   > Could not find any version that matches com.google.android.gms:play-services-gcm:7.5.+.
     Searched in the following locations:
         https://jcenter.bintray.com/com/google/android/gms/play-services-gcm/maven-metadata.xml
         https://jcenter.bintray.com/com/google/android/gms/play-services-gcm/
         file:/Users/artur/sdk/extras/android/m2repository/com/google/android/gms/play-services-gcm/maven-metadata.xml
         file:/Users/artur/sdk/extras/android/m2repository/com/google/android/gms/play-services-gcm/
         file:/Users/artur/sdk/extras/google/m2repository/com/google/android/gms/play-services-gcm/maven-metadata.xml
         file:/Users/artur/sdk/extras/google/m2repository/com/google/android/gms/play-services-gcm/
     Required by:
         gcm:app:unspecified
   > Could not find com.android.support:appcompat-v7:22.1.1.
     Searched in the following locations:
         https://jcenter.bintray.com/com/android/support/appcompat-v7/22.1.1/appcompat-v7-22.1.1.pom
         https://jcenter.bintray.com/com/android/support/appcompat-v7/22.1.1/appcompat-v7-22.1.1.jar
         file:/Users/artur/sdk/extras/android/m2repository/com/android/support/appcompat-v7/22.1.1/appcompat-v7-22.1.1.pom
         file:/Users/artur/sdk/extras/android/m2repository/com/android/support/appcompat-v7/22.1.1/appcompat-v7-22.1.1.jar
         file:/Users/artur/sdk/extras/google/m2repository/com/android/support/appcompat-v7/22.1.1/appcompat-v7-22.1.1.pom
         file:/Users/artur/sdk/extras/google/m2repository/com/android/support/appcompat-v7/22.1.1/appcompat-v7-22.1.1.jar
     Required by:
         gcm:app:unspecified

Enable debugging mode for app invites failures

Within the demo app, with multiple GMail account and the configuration JSON here below, I keep on receiving the red snackbar with saying "Message failed to send". Would it be possible to add a debug flag and understand where is the issue?

{
    "project_info": {
        "project_id": "default-demo-app-799df",
        "project_number": "994265307421",
        "name": "Default Demo App"
    },
    "client": [
        {
            "client_info": {
                "client_id": "android:com.google.android.gms.samples.appinvite",
                "client_type": 1,
                "android_client_info": {
                    "package_name": "com.google.android.gms.samples.appinvite"
                }
            },
            "oauth_client": [
                {
                    "client_id": "994265307421-brmrp11tgmdqo8v6igsj3uuiajtrqa34.apps.googleusercontent.com",
                    "client_type": 1,
                    "android_info": {
                        "package_name": "com.google.android.gms.samples.appinvite",
                        "certificate_hash": "4d9dee66683594516edeec92efb0cd13d658172b"
                    }
                }
            ],
            "services": {
                "analytics_service": {
                    "status": 1
                },
                "cloud_messaging_service": {
                    "status": 1,
                    "apns_config": []
                },
                "appinvite_service": {
                    "status": 2,
                    "other_platform_oauth_client": []
                },
                "google_signin_service": {
                    "status": 1
                },
                "ads_service": {
                    "status": 1
                }
            }
        }
    ]
}

java.io.IOException: INVALID_PARAMETERS Error

Hii,
I am new in Android app development. I am working on GCM notification. I have followed all the steps mentioned in https://developers.google.com/cloud-messaging/android/start. But getting error java.io.IOException: INVALID_PARAMETERS Error in RegistrationIntentService.java file at line 57.
String token = instanceID.getToken(getString(R.string.gcm_defaultSenderId), GoogleCloudMessaging.INSTANCE_ID_SCOPE, null);
Can you support me to solve this error?????

BuildType/Flavour Support

I have had a look, I can't see another issue.

How do we enabled different configs per flavour/buildType? Most Common use case is where we have different analytics tracking and GCM senders per debug/release builds.

Favours would be an added bonus.

Thanks.

SignIn fails when serverClientID specified

Hi, guys! I've got a server that interacts with Google Calendar on behalf of user. To do this it should obtain one-time access token from iOS application. I've referred to documentation, but have some issues with sign in.

I started from "SignIn" example app (pod test Google > Sign In), provided it with my credentials (GoogleServices-Info.plist, bundleId). Then I signed it with my provision and started on iPhone 6, everything works like a charm.

Then I added

[GIDSignIn sharedInstance].serverClientID = @"<my-server-client-id>";

in ViewController:viewDidLoad. And then after opening auth screen (youtube.app, 10.31.11670), and selecting the same account, it launched my app (permissions screen is not presented), -signIn:didSignInForUser:withError: method was called, but GIDGoogleUser was nil. Error stated

Error Domain=com.google.GIDSignIn Code=-1 "A potentially recoverable error occured. You may try again." UserInfo=0x17026af80 {NSLocalizedDescription=A potentially recoverable error occured. You may try again.}

I tried several times, but each time I received the same result. But if I comment ...serverClientID... it begins to work again.

Then I launched this app in simulator and it authorised successfully using WebView and I received user.serverAuthCode.
I decided that problem was in YouTube.app, I uninstalled it from device, but the same problem happened with other Google applications.

Could you point me what is wrong with my singIn implementation?

PS
Finally I decided to use workaround and rewrote -canOpenUrl: in UIApplication subclass this way:

- (BOOL)canOpenURL:(NSURL *)url
{
    if ([[url scheme] hasPrefix:@"com-google-gidconsent"] || [[url scheme] hasPrefix:@"com.google.gppconsent"]) {
        return NO;
    }
    return [super canOpenURL:url];
}

And now it uses WebView authorisation and I can receive my one-time token. But it's a bit crappy of course.

Execution failed for task ':app:prepareDebugAndroidTestDependencies'.

I update google play services ,and did all steps in tutorial but still get this errors.

Error:(56, 62) error: cannot find symbol variable gcm_defaultSenderId
(RegistrationIntentService.java)
and also another error

Error:Execution failed for task ':app:compileDebugJavaWithJavac'.

Compilation failed; see the compiler error output for details.

Typo in app indexing

final Uri APP_URI = Uri.parse("android-app://com.google.developers.app-indexing.quickstart/http/example.com/articles/" + articleId);

should be

final Uri APP_URI = Uri.parse("android-app://com.google.developers.app_indexing.quickstart/http/example.com/articles/" + articleId);

'-' should be changed to '_'

l always get AUTHENTICATION_FAILED? can you please help me



<permission
    android:name="com.cik.gcmpush.permission.C2D_MESSAGE"
    android:protectionLevel="signature"/>

<uses-permission android:name="com.cik.gcmpush.permission.C2D_MESSAGE"/>

<!-- This app has permission to register and receive data message. -->
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE"/>

<!-- Permission to vibrate -->
<uses-permission android:name="android.permission.VIBRATE"/>
<!-- All of the following are required by GCM Receiver or Sender, End -->


<!-- Optional permission for Google Analytics -->
<uses-permission android:name="android.permission.WAKE_LOCK"/>

<!-- GCM -->
    <receiver
        android:name="com.google.android.gms.gcm.GcmReceiver"
        android:exported="true"
        android:permission="com.google.android.c2dm.permission.SEND">
        <intent-filter>
            <action android:name="com.google.android.c2dm.intent.RECEIVE"/>
            <category android:name="com.cik.gcmpush"/>
        </intent-filter>
    </receiver>
    <!-- [END gcm_receiver] -->
    <!-- [START gcm_listener] -->
    <service
        android:name="com.cik.gcmpush.MyGcmListenerService"
        android:exported="false">
        <intent-filter>
            <action android:name="com.google.android.c2dm.intent.RECEIVE"/>
        </intent-filter>
    </service>
    <!-- [END gcm_listener] -->
    <!-- [START instanceId_listener] -->
    <service
        android:name="com.cik.gcmpush.MyInstanceIDListenerService"
        android:exported="false">
        <intent-filter>
            <action android:name="com.google.android.gms.iid.InstanceID"/>
        </intent-filter>
    </service>
    <!-- [END instanceId_listener] -->
    <service
        android:name="com.cik.gcmpush.RegistrationIntentService"
        android:exported="false">
    </service>

---And l have regestered my app

Server API Key
AIzaSyDM9Irfo0Iv6PtWxfHN**************
Sender ID:*************

I can't get APNs

I'm trying to get push notifications, but its imposible to get one. If i send:
{
"to": "_AFr8B9....nCBL",
"data": {
"message": "Message through GCM",
}
}
I can see it on the simulator, but if i try to send like this to get an APN:
{
"to": "_AFr8B9....nCBL",
"notification" : {
"body" : "great match!",
"title" : "Portugal vs. Denmark",
"icon" : "myicon"
}
}
I dont receive anything. And plus when i add content_available:true i get unregistered from GCM like this guy. Any ideas? http://stackoverflow.com/questions/32134815/google-cloud-messaging-dont-receive-alerts-when-ios-app-is-in-background

GIDSignIn.sharedInstance().currentUser is nil after signing in successfully

I noticed that after I log in GIDSignIn.sharedInstance().currentUser is populated with a GIDGoogleUser but then when I want to check if the user is signed In as they could reach that path without signing in the GIDSignIn.sharedInstance().currentUser is nil again ...

Is there a better way to check if the user is signed in ? or any reason why the singleton GIDSignIn.sharedInstance() would lose its current user value ?

cant install GCM

Hi,
i am getting error when installing gcm from pod file.
I tried without use_framework, and still same error.

Any solution?

screen shot 2015-06-28 at 17 13 30

gcm not send to apn when iOS app was killed.

gcm send to apn when foreground and background. <- send ok
but, Force Quit Application, gcm not send to apn. <- send not ok

when Force Quit Application, apn is possible send notification because, "APN Tester" is send notification Available.

< test condition >
iPhone 4
7.1.2
object c code(GcmExample.app)
use curl
< curl --header "Authorization: key=$server_api_key"
--header Content-Type:"application/json"
https://android.googleapis.com/gcm/send
-d "{"data":{"title":"title"},"notification":{"body":"noti test","content_available":true},"to":"$token"}" >
"GcmServerDemo" tool
"APN Tester" tool

ios gcm example, not receiving notification on app quit.

So , we set up everything as mentioned in the getting started document.

1# we get notification (when sent to a topic) when app is running.
2# we get notification when app is in background.
3# we never get notification when app is quit.

Yes we have set background remote notification true also. We have literally tried many things.
4# When iPhone/iPad is restarted , unless we open the app, we do not receive any notification from GCM.

Testing on iOS 7.1.2 iPhone 5s , and iPad iOS 8.0

App Invites restrict number

I can't find a way in the samples or api to restrict the number of invites one user can send via the intent, one only can have the number of invitations sents after the intent is done, there isn't a method to tell the intent that only allow the user to send x number of invitations?

compilation issue for GCM code

When I import this source code, I get the following error. Please help me how to solve this error

`A problem occurred configuring project ':app'.

Could not resolve all dependencies for configuration ':app:_debugCompile'.
Could not find any version that matches com.google.android.gms:play-services-gcm:7.5.+.
Searched in the following locations:
https://jcenter.bintray.com/com/google/android/gms/play-services-gcm/maven-metadata.xml
https://jcenter.bintray.com/com/google/android/gms/play-services-gcm/
Required by:
gcm:app:unspecified
Could not find com.android.support:appcompat-v7:22.1.1.
Searched in the following locations:
https://jcenter.bintray.com/com/android/support/appcompat-v7/22.1.1/appcompat-v7-22.1.1.pom
https://jcenter.bintray.com/com/android/support/appcompat-v7/22.1.1/appcompat-v7-22.1.1.jar
Required by:
gcm:app:unspecified

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.`

iOS no authorization with GoogleSignIn on App Invites for iOS

my app have some problem with autoricate. I build project from here https://developers.google.com/app-invites/ios/guides/start?configured and it's work fine when I use Bundle ID com.google.samples.quickstart. AppInvitesExample. When I trying to use my own Bundle ID, authorization is not finish always. I haven't any complilation errors, GoogleService-Info.plist is new for new Bundle, I remember also about changes on URL types - all looks prepared fine.

http://postimg.org/gallery/fyp9itq6/2a4c6447/

I have "step1" screen (choose user)

but I haven't "step2" screen (confirm app)

Anybody know reason? Maybe app must be on AppStore?

Cloud Messaging for Android Sample is failing.

The Android Quick sample doesn't build in Android Studio:
https://developers.google.com/cloud-messaging/android/start

It was working fine on the 7th July 2015.

I noticed that Gradle 2.5 was released on the 8th July 2015.

Now I get the following error in Android Studio when I try to sync the Project with the Gradle:

                Plugin is too old, please update to a more recent version,
                or set ANDROID_DAILY_OVERRIDE environment variable to
                "57aab342f59bfc5424ffe646db1eba9f211c73d0"

App invites shows two overlapping snackbars

In the sample app after sending the invitations, shows two overlapping snackbars. In the background, the one created in onActivityResult method with the Snackbar widget from the new support design library and in front, the overlapping one which I don't know from where it comes.

screenshot_2015-05-30-12-53-26 2 1

Unable to receive notification

I did all the steps on the guide but the notification did not appear on the device (i am not using emulator). There is also nothing on the logcat that shows that the GCM message was received.
Here's the message from the terminal:
:gcmsender:run
{"message_id":4808486419477175595}
Check your device/emulator for notification or logcat for confirmation of the receipt of the GCM message.

getDisplayName() on a null object reference

06-16 11:56:57.979 1337-1337/? I/SBar.MotoNetworkCtrlr﹕ refreshSignalCluster[1]: wifi: mWifiConnected=true Wifi=0x7f02012e=com.android.systemui:drawable/stat_sys_wifi_signal_2_fully Activity=0x00000000=( none ) Accessibility="Wifi two bars."
06-16 11:56:57.979 1337-1337/? I/SBar.MotoNetworkCtrlr﹕ onReceive: WifiManager.RSSI_CHANGED_ACTION Received
06-16 11:56:57.979 22461-22461/? W/linker﹕ libavcodec.so has text relocations. This is wasting memory and prevents security hardening. Please fix.
06-16 11:56:57.980 1337-1337/? I/SBar.MotoNetworkCtrlr﹕ updateDataIcon[0]: mCurrentDataSubId=-1000 maps to: dataPhoneId:0 ( SubscriptionManager.getPhoneId returned -1000=0xfffffc18 )
06-16 11:56:57.980 1337-1337/? I/SBar.MotoNetworkCtrlr﹕ updateDataNetType[1]: phoneId1 is not DDS( =phoneId0 ) ! -- Set all data icons to off ( SubscriptionManager.getPhoneId returned -1000=0xfffffc18 )
06-16 11:56:57.980 1337-1337/? I/SBar.MotoNetworkCtrlr﹕ updateDataIcon[1]: mCurrentDataSubId=-1000 maps to: dataPhoneId:0 ( SubscriptionManager.getPhoneId returned -1000=0xfffffc18 )
06-16 11:56:58.029 1337-1337/? I/SBar.MotoNetworkCtrlr﹕ updateDataIcon[0]: mCurrentDataSubId=-1000 maps to: dataPhoneId:0 ( SubscriptionManager.getPhoneId returned -1000=0xfffffc18 )
06-16 11:56:58.031 1337-1337/? I/SBar.MotoNetworkCtrlr﹕ updateDataNetType[1]: phoneId1 is not DDS( =phoneId0 ) ! -- Set all data icons to off ( SubscriptionManager.getPhoneId returned -1000=0xfffffc18 )
06-16 11:56:58.031 1337-1337/? I/SBar.MotoNetworkCtrlr﹕ updateDataIcon[1]: mCurrentDataSubId=-1000 maps to: dataPhoneId:0 ( SubscriptionManager.getPhoneId returned -1000=0xfffffc18 )
06-16 11:56:58.407 21991-22006/? I/art﹕ Background sticky concurrent mark sweep GC freed 24171(1770KB) AllocSpace objects, 11(227KB) LOS objects, 15% free, 10MB/12MB, paused 6.055ms total 131.023ms
06-16 11:56:58.502 21991-22400/? W/ActivityThread﹕ ClassLoader.loadClass: The class loader returned by Thread.getContextClassLoader() may fail for processes that host multiple applications. You should explicitly specify a context class loader. For example: Thread.setContextClassLoader(getClass().getClassLoader());
06-16 11:56:58.946 21991-22400/? E/Volley﹕ [80556] BasicNetwork.performRequest: Unexpected response code 403 for https://www.googleapis.com/plus/v1/people/me
06-16 11:56:59.107 21991-22412/? W/BaseAppContext﹕ Using Auth Proxy for data requests.
06-16 11:56:59.166 22292-22302/com.google.samples.quickstart.signin W/art﹕ Suspending all threads took: 22.829ms
06-16 11:56:59.212 22292-22292/com.google.samples.quickstart.signin D/MainActivity﹕ onConnected:null
06-16 11:56:59.229 22292-22292/com.google.samples.quickstart.signin D/AndroidRuntime﹕ Shutting down VM
06-16 11:56:59.259 22292-22292/com.google.samples.quickstart.signin E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.google.samples.quickstart.signin, PID: 22292
java.lang.NullPointerException: Attempt to invoke interface method 'java.lang.String com.google.android.gms.plus.model.people.Person.getDisplayName()' on a null object reference
at com.google.samples.quickstart.signin.MainActivity.updateUI(MainActivity.java:107)
at com.google.samples.quickstart.signin.MainActivity.onConnected(MainActivity.java:173)
at com.google.android.gms.internal.jm.f(Unknown Source)
at com.google.android.gms.common.api.c.gJ(Unknown Source)
at com.google.android.gms.common.api.c.d(Unknown Source)
at com.google.android.gms.common.api.c$2.onConnected(Unknown Source)
at com.google.android.gms.internal.jm.f(Unknown Source)
at com.google.android.gms.internal.jm.dU(Unknown Source)
at com.google.android.gms.internal.jl$h.b(Unknown Source)
at com.google.android.gms.internal.jl$h.g(Unknown Source)
at com.google.android.gms.internal.jl$b.hy(Unknown Source)
at com.google.android.gms.internal.jl$a.handleMessage(Unknown Source)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5312)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:901)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:696)

Check receiver's email address

Is there a way to check if invitation receiver's email address isn't fake? I also have task to grand sender when invitation is successful, and when I test this for fake email, I still get response as it is regular receiver, so users can use this situation in inappropriate way.

Also, is there any way to get sender information on receiver's side, so after deep linking and opening app we can show receiver message with sender's profile picture and so on...?

Thanks to answers in advance!

[iOS] Problem with receiving toping notification in the background

I was trying to implement GCM in iOS app. I encountered problem when I wanted to send topic specific messages. It's working without problem when app is in foreground but I'm not able to receive any messages while app is in the background. Is there any specific setting or GCM message content that need to be used to make it possible? Is the possibility to send push notification to all app users that will receive notification even if application will be in the background?

iOS9 new app switching UIAlertView isn't handled well.

Not sure where to report issues with sign in Library itself but I'll share a issue I've spotted today.

In iOS9 on the iPad; Apple added new UX that prompts the user the first time an app request to switch to another app via custom URL protocols and

[[UIApplication sharedApplication] openURL:]

That method returns a BOOL if the openURL call was successful or not. If the user taps OK, then app switch occurs and they can sign in as expected. If they tap Cancel. I'd expect to get invoked on one of the GIDSignInDelegate methods with a NSError object that's not-nil. However no notification is given to the client of the SDK.

This comes up if you're showing any kind of progress indicator UI.

copy/paste error in CONTRIBUTING.md

The tail end of the contributor guidelines mentions requesting a fork in the 'googlecast' organization. For these samples, should read 'googlesamples'

Remove synchronized(TAG) in gcm sample

In the Android GCM sample there is an IntentService which synchronizes on public static final String TAG. This synchronize() {...} block should be removed for a few reasons:

* `IntentService` processes `Intent`s one at a time, so there is no need to worry about concurrency.
* As described in #44, a public static final String will be interned, so this could cause craziness if this value is used elsewhere (unlikely, but still a risk).

R.xml.global_tracker : cannot resolve symbol 'xml'?

hi:
i clone this demo : google-services/android/analytics/ and when i build this demo , in AnalyticsApplication.java @ line 40 show: "R.xml.global_tracker : cannot resolve symbol 'xml'?"
how to fix it? thx

Does not work after reboot

This works well when you run it on any handset from Android studio.
However when you reboot the device, it does not work any more

I tried ALL the solutions on Stackexchange but none worked

Please help!!!

Big Crashe in android/Signing, MainActivity method updateUI

Hello,

Because the code is not checking for:
« if (Plus.PeopleApi.getCurrentPerson(mGoogleApiClient) != null) »
source: https://developers.google.com/identity/sign-in/android/people

The samples crashes with one of my account [email protected] when it tries to getDisplayname().

The file with a bug is https://github.com/googlesamples/google-services/blob/master/android/signin/app/src/main/java/com/google/samples/quickstart/signin/MainActivity.java

Regards and continue with the nice job,

The problem with the use of the authorization to Google for a subscription to Youtube channel

Good afternoon
I use your example SignIn for authorization to Google and getting a token for subscription to the channel Youtube.
To do this, use the following function:

-(void) subscription{

    NSString *channelId = @«MyChannelId»;
    NSString *api_Key = @«MY_IOS_API_KEY»;

    AFHTTPRequestSerializer *requestSerializer = [AFJSONRequestSerializer serializer];

    NSString *URLString = [NSString stringWithFormat:@"https://www.googleapis.com/youtube/v3/subscriptions?part=snippet&key=%@", api_Key];
    AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager];

    NSString *authValue = [NSString stringWithFormat:@"Bearer %@", [GIDSignIn sharedInstance].currentUser.authentication.accessToken];
    NSLog(@"Access Token: %@", [GIDSignIn sharedInstance].currentUser.authentication.accessToken);

    [requestSerializer setValue: authValue forHTTPHeaderField:@"Authorization"];

    [requestSerializer setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
manager.requestSerializer = requestSerializer;
    NSDictionary *parameters = @{@"snippet":@{
                                         @"resourceId":@{
                                                 @"channelId":channelId,
                                                 @"kind":@"youtube#channel"
                                             }
                                     }
                             };
    [manager POST:URLString parameters:parameters success:^(AFHTTPRequestOperation *operation, id responseObject) {
        NSLog(@«OK:»);
    } failure:^(AFHTTPRequestOperation *operation, NSError *error) {
        NSLog(@«Faild:»);
}];

And then transmits the values obtained in:

-(void) receiveToggleAuthUINotification:(NSNotification *) notification {

    if ([[notification name] isEqualToString:@"ToggleAuthUINotification"]) {
        [self subscriptionBtn];   
    }
}

I got the following error from the failure block:

error =     {
    code = 403;
    errors =         (
                    {
            domain = usageLimits;
            extendedHelp = "https://console.developers.google.com";
            message = "There is a per-IP or per-Referer restriction configured on your API key and the request does not match these restrictions. Please use the Google Developers Console to update your API key configuration if request from this IP or referer should be allowed.";
            reason = ipRefererBlocked;
        }
    );
    message = "There is a per-IP or per-Referer restriction configured on your API key and the request does not match these restrictions. Please use the Google Developers Console to update your API key configuration if request from this IP or referer should be allowed.";
};

Displaying Error: "Unfortunately Sign-in Quickstart has stopped"

Hi,

I have followed the steps of integrating the signin sample code to my testing android app and once it starts running i am getting the error: "Unfortunately Sign-in Quickstart has stopped". Screenshot attached for reference.

Please guide why this error is coming and how it could be fixed.

Thanks
Narasimha
screen shot 2015-06-12 at 11 55 35

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.