Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Application crashes when trying to authenticates on Google Play

Discussion in 'Android' started by LoopixSA, Sep 4, 2018.

  1. LoopixSA

    LoopixSA

    Joined:
    Aug 21, 2018
    Posts:
    3
    Hey,
    I’m authenticating the user with Google Play Services (0.9.50), but whenever i try to authenticate it crashes the app.

    We use the following code:
    Code (CSharp):
    1. GooglePlayGames.BasicApi.PlayGamesClientConfiguration config = new GooglePlayGames.BasicApi.PlayGamesClientConfiguration.Builder().Build();
    2. PlayGamesPlatform.InitializeInstance(config);
    3. PlayGamesPlatform.Activate();
    4. PlayGamesPlatform.Instance.Authenticate((success) =>{});
    Altering the meta-data
    PlayGamesPlatform.Instance.Authenticate((success) =>{});
    to
    Social.localUser.Authenticate((success) =>{});
    the app doesn’t crash, but it authenticates as test user “Lerpz”.




    Already tried modifying the meta-data about the APP_ID over AndroidManifest from
    "\ 792977673283" /> 
    to
    "\u003792977673283" />
    , it didn’t fix my problem. I’ve applied the same “fix” on the GPGS version meta-data that we’re using and on the “template-AndroidManifest”, also it didn’t work.




    Tried to rollback AAR archive version to 10.0.1, no success.




    At the moment these are the two AndroindManisfet’s and template-AndroidManifest on the project:

    <!-- AndroidManifest 1 -->
    <?xml version="1.0" encoding="utf-8"?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.unity3d.player" xmlns:tools="http://schemas.android.com/tools" android:installLocation="preferExternal">
    <supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:xlargeScreens="true" android:anyDensity="true" />
    <application android:theme="@StyLe/UnityThemeSelector" android:icon="@drawable/app_icon" android:label="@String/app_name">
    <activity android:name="com.unity3d.player.UnityPlayerActivity" android:label="@String/app_name">
    <intent-filter>
    <action android:name="android.intent.action.MAIN" />
    <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>
    <meta-data android:name="unityplayer.UnityActivity" android:value="true" />
    </activity>
    <activity
    android:name="com.google.service.game.UnityProxyActivity"
    android:label="@String/app_name" >
    <intent-filter>
    <action android:name="android.intent.action.MAIN" />

    <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>
    </activity>
    <meta-data android:name="com.google.android.gms.version" android:value="@Integer/google_play_services_version" />
    <activity android:name="com.facebook.unity.FBUnityLoginActivity" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
    <activity android:name="com.facebook.unity.FBUnityDialogsActivity" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
    <activity android:name="com.facebook.unity.FBUnityAppLinkActivity" android:exported="true" />
    <activity android:name="com.facebook.unity.FBUnityDeepLinkingActivity" android:exported="true" />
    <activity android:name="com.facebook.unity.FBUnityGameRequestActivity" />
    <activity android:name="com.facebook.unity.FBUnityCreateGameGroupActivity" />
    <activity android:name="com.facebook.unity.FBUnityJoinGameGroupActivity" />
    <activity android:name="com.facebook.unity.AppInviteDialogActivity" />
    <meta-data android:name="com.facebook.sdk.ApplicationId" android:value="fb1733804206928080" />
    <provider android:name="com.facebook.FacebookContentProvider" android:authorities="com.facebook.app.FacebookContentProvider1733804206928080" android:exported="true" />
    </application>
    </manifest>






    <!-- AndroidManifest 2 -->
    <?xml version="1.0" encoding="utf-8"?>
    <!-- This file was automatically generated by the Google Play Games plugin for Unity
    Do not edit. -->
    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.Loopix.Horsee"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="16" />

    <!-- Google Mobile Ads Permissions -->
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_UPDATES" />
    <uses-permission android:name="com.android.vending.BILLING"/>

    <application>

    <!-- The space in these forces it to be interpreted as a string vs. int -->
    <meta-data android:name="com.google.android.gms.games.APP_ID"
    android:value="\u003792977673283" />

    <!-- Keep track of which plugin is being used -->
    <meta-data android:name="com.google.android.gms.games.unityVersion"
    android:value=" 0.9.50" />

    <activity android:name="com.google.games.bridge.NativeBridgeActivity"
    android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
    </application>
    </manifest>





    <!-- template-AndroidManifest -->
    <?xml version="1.0" encoding="utf-8"?>
    <!-- This file was automatically generated by the Google Play Games plugin for Unity
    Do not edit. -->
    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.Loopix.Horsee
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="16" />

    __NEARBY_PERMISSIONS__

    <application>

    __NEARBY_SERVICE_ELEMENT__

    <!-- The space in these forces it to be interpreted as a string vs. int -->
    <meta-data android:name="com.google.android.gms.games.APP_ID"
    android:value="u003\__APP_ID__" />

    <!-- Keep track of which plugin is being used -->
    <meta-data android:name="com.google.android.gms.games.unityVersion"
    android:value="\ __PLUGIN_VERSION__" />

    <activity android:name="com.google.games.bridge.NativeBridgeActivity"
    android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
    </application>
    </manifest>





    I’ve been working on this for 2 days, making several minor alterations, both code and over the AndroidManifest, but still no luck. Anyone with a better solution? Am i doing something wrong or forgetting something?
    Thanks for the support!
     
  2. OnlyTrueM

    OnlyTrueM

    Joined:
    Sep 4, 2013
    Posts:
    19
  3. GKiernozek

    GKiernozek

    Joined:
    Nov 16, 2013
    Posts:
    40
    Similar problem here :/
     
  4. duditonstudio

    duditonstudio

    Joined:
    May 28, 2018
    Posts:
    1
    Same problem here
     
  5. novalain1

    novalain1

    Joined:
    Feb 24, 2018
    Posts:
    2
    Did you get the log output from the crash? I'm experiencing the same problem and haven't figured it out yet