2017-08-15 55 views
1

我開發了一款安卓應用,並在我的手機和模擬器中測試了該應用。我正在使用Android Studio。安卓:使用谷歌登錄並登錄Facebook未能正常工作

我已經使用「使用Google登錄」&「使用臉書登錄」功能,但這些功能都適用於我的設備,一旦我的應用程序在Play商店發佈,則這兩項功能都不起作用。

請幫幫我。

我分享manifest.xml的細節:基於

<manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" package="in.gdc4gpat"> 
<uses-permission android:name="android.permission.CALL_PHONE" /> 
<uses-permission android:name="android.permission.INTERNET" /> 
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> 
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> 
<uses-permission android:name="android.permission.READ_PHONE_STATE" /> 
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> 
<application android:allowBackup="true" android:hardwareAccelerated="true" android:icon="@drawable/app_icon" android:label="@string/app_name" android:supportsRtl="true" android:theme="@style/AppTheme" tools:replace="android:allowBackup,android:icon" android:largeHeap="true"> 
    <!-- Facebook --> 
    <meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id" /> 
    <activity android:name="com.facebook.FacebookActivity" android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation" android:theme="@android:style/Theme.Translucent.NoTitleBar" android:label="@string/app_name" tools:replace="android:theme" /> 
    <activity android:name=".onlineexam.Login" android:screenOrientation="portrait" android:theme="@style/AppTheme.NoActionBar" /> 
    <activity android:name=".Welcome" android:screenOrientation="portrait" android:theme="@style/Welcome"> 
     <intent-filter> 
      <action android:name="android.intent.action.MAIN" /> 
      <category android:name="android.intent.category.LAUNCHER" /> 
     </intent-filter> 
    </activity> 
    <activity android:name=".onlineexam.Home" android:screenOrientation="portrait" android:theme="@style/AppTheme.NoActionBar" /> 
    <activity android:name=".NoNetwork" android:screenOrientation="portrait" /> 
    <activity android:label="@string/app_name" android:name=".MainActivity" android:screenOrientation="portrait" /> 
    <activity android:label="@string/app_name" android:name=".Video" android:screenOrientation="portrait" /> 
    <activity android:label="@string/app_name" android:name=".NotificationView" android:excludeFromRecents="true" android:screenOrientation="portrait" /> 
    <activity android:label="@string/app_name" android:name=".GalleryCategory" android:screenOrientation="portrait" /> 
    <activity android:label="@string/app_name" android:name=".MCQCategory" android:parentActivityName=".MainActivity" android:screenOrientation="portrait"> 
     <meta-data android:name="android.support.PARENT_ACTIVITY" android:value=".MainActivity" /> 
    </activity> 
    <activity android:label="@string/app_name" android:name=".MCQSubjects" android:parentActivityName=".MCQCategory" android:screenOrientation="portrait"> 
     <meta-data android:name="android.support.PARENT_ACTIVITY" android:value=".MCQCategory" /> 
    </activity> 
    <activity android:name=".Gallery" android:parentActivityName=".MainActivity" android:screenOrientation="portrait"> 
     <meta-data android:name="android.support.PARENT_ACTIVITY" android:value=".MainActivity" /> 
    </activity> 
    <activity android:name=".DownloadCategory" android:parentActivityName=".MainActivity" android:screenOrientation="portrait"> 
     <meta-data android:name="android.support.PARENT_ACTIVITY" android:value=".MainActivity" /> 
    </activity> 
    <activity android:label="@string/app_name" android:name=".KYCForm" android:screenOrientation="portrait" /> 
    <activity android:name=".Mnemonics" android:parentActivityName=".MainActivity" android:screenOrientation="portrait"> 
     <meta-data android:name="android.support.PARENT_ACTIVITY" android:value=".MainActivity" /> 
    </activity> 
    <activity android:name=".Downloads" android:parentActivityName=".MainActivity" android:screenOrientation="portrait"> 
     <meta-data android:name="android.support.PARENT_ACTIVITY" android:value=".MainActivity" /> 
    </activity> 
    <activity android:name=".Alerts" android:parentActivityName=".MainActivity" android:screenOrientation="portrait"> 
     <meta-data android:name="android.support.PARENT_ACTIVITY" android:value=".MainActivity" /> 
    </activity> 
    <activity android:name=".AlertDetails" android:parentActivityName=".Alerts" android:screenOrientation="portrait"> 
     <meta-data android:name="android.support.PARENT_ACTIVITY" android:value=".Alerts" /> 
    </activity> 
    <activity android:name=".Jobs" android:parentActivityName=".MainActivity" android:screenOrientation="portrait"> 
     <meta-data android:name="android.support.PARENT_ACTIVITY" android:value=".MainActivity" /> 
    </activity> 
    <activity android:name=".JobDetails" android:parentActivityName=".Jobs" android:screenOrientation="portrait"> 
     <meta-data android:name="android.support.PARENT_ACTIVITY" android:value=".Jobs" /> 
    </activity> 
    <activity android:name=".Packages" android:parentActivityName=".MainActivity" android:screenOrientation="portrait"> 
     <meta-data android:name="android.support.PARENT_ACTIVITY" android:value=".MainActivity" /> 
    </activity> 
    <activity android:name=".PackageDetails" android:parentActivityName=".Packages" android:screenOrientation="portrait"> 
     <meta-data android:name="android.support.PARENT_ACTIVITY" android:value=".Packages" /> 
    </activity> 
    <activity android:name=".Contact" android:parentActivityName=".MainActivity" android:screenOrientation="portrait"> 
     <meta-data android:name="android.support.PARENT_ACTIVITY" android:value=".MainActivity" /> 
    </activity> 
    <activity android:name=".News" android:parentActivityName=".MainActivity" android:screenOrientation="portrait"> 
     <meta-data android:name="android.support.PARENT_ACTIVITY" android:value=".MainActivity" /> 
    </activity> 
    <activity android:name=".NewsDetails" android:parentActivityName=".News" android:screenOrientation="portrait"> 
     <meta-data android:name="android.support.PARENT_ACTIVITY" android:value=".News" /> 
    </activity> 
    <activity android:name=".Course" android:parentActivityName=".MainActivity" android:screenOrientation="portrait"> 
     <meta-data android:name="android.support.PARENT_ACTIVITY" android:value=".MainActivity" /> 
    </activity> 
    <activity android:name=".CourseDetails" android:parentActivityName=".Course" android:screenOrientation="portrait"> 
     <meta-data android:name="android.support.PARENT_ACTIVITY" android:value=".Course" /> 
    </activity> 
    <activity android:label="@string/app_name" android:name=".PharmaFactSubjects" android:parentActivityName=".MainActivity" android:screenOrientation="portrait"> 
     <meta-data android:name="android.support.PARENT_ACTIVITY" android:value=".MainActivity" /> 
    </activity> 
    <activity android:label="@string/app_name" android:name=".Pharmafacts" android:parentActivityName=".MainActivity" android:screenOrientation="portrait"> 
     <meta-data android:name="android.support.PARENT_ACTIVITY" android:value=".MainActivity" /> 
    </activity> 
    <activity android:name=".PharmafactsDetails" android:label="@string/app_name" android:parentActivityName=".Pharmafacts" android:screenOrientation="portrait"> 
     <meta-data android:name="android.support.PARENT_ACTIVITY" android:value=".Pharmafacts" /> 
    </activity> 
    <activity android:name=".Seminar" android:label="@string/app_name" android:parentActivityName=".MainActivity" android:screenOrientation="portrait"> 
     <meta-data android:name="android.support.PARENT_ACTIVITY" android:value=".MainActivity" /> 
    </activity> 
    <activity android:name=".SeminarDetails" android:label="@string/app_name" android:parentActivityName=".Seminar" android:screenOrientation="portrait"> 
     <meta-data android:name="android.support.PARENT_ACTIVITY" android:value=".Seminar" /> 
    </activity> 
    <activity android:name=".MCQ" android:label="@string/app_name" android:parentActivityName=".MainActivity" android:screenOrientation="portrait"> 
     <meta-data android:name="android.support.PARENT_ACTIVITY" android:value=".MainActivity" /> 
    </activity> 
    <activity android:name=".Questions" android:screenOrientation="portrait" /> 
    <!-- ############################ ONLINE EXAM MODULES ########################### --> 
    <activity android:name=".onlineexam.DailyQuiz" android:parentActivityName=".onlineexam.Home" android:screenOrientation="portrait"> 
     <meta-data android:name="android.support.PARENT_ACTIVITY" android:value=".onlineexam.Home" /> 
    </activity> 
    <activity android:name=".onlineexam.TestDetails" android:parentActivityName=".onlineexam.TestPackages" android:screenOrientation="portrait"> 
     <meta-data android:name="android.support.PARENT_ACTIVITY" android:value=".onlineexam.TestPackages" /> 
    </activity> 
    <activity android:name=".onlineexam.TopicWiseSubjects" android:parentActivityName=".onlineexam.Home" android:screenOrientation="portrait"> 
     <meta-data android:name="android.support.PARENT_ACTIVITY" android:value=".onlineexam.Home" /> 
    </activity> 
    <activity android:name=".onlineexam.TestPackages" android:parentActivityName=".onlineexam.Home" android:screenOrientation="portrait"> 
     <meta-data android:name="android.support.PARENT_ACTIVITY" android:value=".onlineexam.Home" /> 
    </activity> 
    <activity android:name=".onlineexam.TestPackageDetails" android:parentActivityName=".onlineexam.Home" android:screenOrientation="portrait"> 
     <meta-data android:name="android.support.PARENT_ACTIVITY" android:value=".onlineexam.Home" /> 
    </activity> 
    <activity android:name=".onlineexam.StudyMaterial" android:parentActivityName=".onlineexam.Home" android:screenOrientation="portrait"> 
     <meta-data android:name="android.support.PARENT_ACTIVITY" android:value=".onlineexam.Home" /> 
    </activity> 
    <activity android:name=".onlineexam.StudyMaterialDetails" android:parentActivityName=".onlineexam.StudyMaterial" android:screenOrientation="portrait"> 
     <meta-data android:name="android.support.PARENT_ACTIVITY" android:value=".onlineexam.StudyMaterial" /> 
    </activity> 
    <activity android:name=".onlineexam.Test" android:parentActivityName=".onlineexam.Home" android:screenOrientation="portrait"> 
     <meta-data android:name="android.support.PARENT_ACTIVITY" android:value=".onlineexam.Home" /> 
    </activity> 
    <activity android:name=".onlineexam.Register" android:parentActivityName=".onlineexam.Home" android:screenOrientation="portrait" android:theme="@style/FullScreen"> 
     <meta-data android:name="android.support.PARENT_ACTIVITY" android:value=".onlineexam.Home" /> 
    </activity> 
    <activity android:name=".onlineexam.ForgotPassword" android:parentActivityName=".onlineexam.Home" android:screenOrientation="portrait" android:theme="@style/FullScreen"> 
     <meta-data android:name="android.support.PARENT_ACTIVITY" android:value=".onlineexam.Home" /> 
    </activity> 
    <activity android:name=".onlineexam.OtpVerification" android:parentActivityName=".onlineexam.Home" android:screenOrientation="portrait" android:theme="@style/FullScreen"> 
     <meta-data android:name="android.support.PARENT_ACTIVITY" android:value=".onlineexam.Home" /> 
    </activity> 
    <activity android:name=".onlineexam.ResetPassword" android:parentActivityName=".onlineexam.Home" android:screenOrientation="portrait"> 
     <meta-data android:name="android.support.PARENT_ACTIVITY" android:value=".onlineexam.Home" /> 
    </activity> 
    <activity android:name=".onlineexam.StartTest" android:screenOrientation="portrait" android:theme="@style/FullScreen" /> 
    <activity android:name=".onlineexam.Profile" android:parentActivityName=".onlineexam.Home" android:screenOrientation="portrait"> 
     <meta-data android:name="android.support.PARENT_ACTIVITY" android:value=".onlineexam.Home" /> 
    </activity> 
    <activity android:name=".onlineexam.ProfileEdit" android:parentActivityName=".onlineexam.Profile" android:screenOrientation="portrait"> 
     <meta-data android:name="android.support.PARENT_ACTIVITY" android:value=".onlineexam.Profile" /> 
    </activity> 
    <activity android:name=".onlineexam.ChangePassword" android:parentActivityName=".onlineexam.Home" android:screenOrientation="portrait"> 
     <meta-data android:name="android.support.PARENT_ACTIVITY" android:value=".onlineexam.Home" /> 
    </activity> 
    <activity android:name=".onlineexam.Results" android:parentActivityName=".onlineexam.Home" android:screenOrientation="portrait"> 
     <meta-data android:name="android.support.PARENT_ACTIVITY" android:value=".onlineexam.Home" /> 
    </activity> 
    <activity android:name=".onlineexam.ScoreCard" android:parentActivityName=".onlineexam.Results" android:screenOrientation="portrait"> 
     <meta-data android:name="android.support.PARENT_ACTIVITY" android:value=".onlineexam.Results" /> 
    </activity> 
    <activity android:name=".onlineexam.Toppers" android:parentActivityName=".onlineexam.Results" android:screenOrientation="portrait"> 
     <meta-data android:name="android.support.PARENT_ACTIVITY" android:value=".onlineexam.Results" /> 
    </activity> 
    <activity android:name=".onlineexam.Answers" android:parentActivityName=".onlineexam.Results" android:screenOrientation="portrait"> 
     <meta-data android:name="android.support.PARENT_ACTIVITY" android:value=".onlineexam.Results" /> 
    </activity> 
    <activity android:name=".onlineexam.Wallet" android:parentActivityName=".onlineexam.Home" android:screenOrientation="portrait"> 
     <meta-data android:name="android.support.PARENT_ACTIVITY" android:value=".onlineexam.Home" /> 
    </activity> 
    <activity android:name=".onlineexam.WalletAdd" android:parentActivityName=".onlineexam.Wallet" android:screenOrientation="portrait"> 
     <meta-data android:name="android.support.PARENT_ACTIVITY" android:value=".onlineexam.Wallet" /> 
    </activity> 
    <activity android:name=".onlineexam.Orders" android:parentActivityName=".onlineexam.Home" android:screenOrientation="portrait"> 
     <meta-data android:name="android.support.PARENT_ACTIVITY" android:value=".onlineexam.Home" /> 
    </activity> 
    <activity android:name=".onlineexam.MyTest" android:parentActivityName=".onlineexam.Home" android:screenOrientation="portrait"> 
     <meta-data android:name="android.support.PARENT_ACTIVITY" android:value=".onlineexam.Home" /> 
    </activity> 
    <activity android:name=".onlineexam.Offers" android:parentActivityName=".onlineexam.Home" android:screenOrientation="portrait"> 
     <meta-data android:name="android.support.PARENT_ACTIVITY" android:value=".onlineexam.Home" /> 
    </activity> 
    <activity android:name=".onlineexam.CapsuleSubject" android:parentActivityName=".onlineexam.Home" android:screenOrientation="portrait"> 
     <meta-data android:name="android.support.PARENT_ACTIVITY" android:value=".onlineexam.Home" /> 
    </activity> 
    <activity android:name=".onlineexam.Capsules" android:parentActivityName=".onlineexam.CapsuleSubject" android:screenOrientation="portrait"> 
     <meta-data android:name="android.support.PARENT_ACTIVITY" android:value=".onlineexam.CapsuleSubject" /> 
    </activity> 
    <activity android:name=".onlineexam.CapsuleDetails" android:parentActivityName=".onlineexam.Capsules" android:screenOrientation="portrait"> 
     <meta-data android:name="android.support.PARENT_ACTIVITY" android:value=".onlineexam.Capsules" /> 
    </activity> 
    <activity android:name=".onlineexam.ShareAndEarn" android:parentActivityName=".onlineexam.Home" android:screenOrientation="portrait"> 
     <meta-data android:name="android.support.PARENT_ACTIVITY" android:value=".onlineexam.Home" /> 
    </activity> 
    <activity android:name=".onlineexam.Feedback" android:parentActivityName=".onlineexam.Home" android:screenOrientation="portrait"> 
     <meta-data android:name="android.support.PARENT_ACTIVITY" android:value=".onlineexam.Home" /> 
    </activity> 
    <activity android:name=".onlineexam.CheckOut" android:windowSoftInputMode="stateHidden" android:screenOrientation="portrait" /> 
    <!-- ******************* PG ************************* --> 
    <activity android:name=".onlineexam.PayNowWeb" android:screenOrientation="portrait" /> 
    <!-- Firebase Notifications --> 
    <service android:name=".fcm.MyFirebaseMessagingService"> 
     <intent-filter> 
      <action android:name="com.google.firebase.MESSAGING_EVENT" /> 
     </intent-filter> 
    </service> 
    <service android:name=".fcm.MyFirebaseInstanceIDService"> 
     <intent-filter> 
      <action android:name="com.google.firebase.INSTANCE_ID_EVENT" /> 
     </intent-filter> 
    </service> 
    <!-- ./Firebase Notifications --> 
</application> 

+1

「不工作」 - 以什麼方式? –

回答

0

從這個thread,也許是你生產的重點和調試關鍵的問題。確保你把這兩個鍵放在你的google-json文件和console.google中。另外,我認爲你正在使用調試密鑰庫sha1,這就是爲什麼它只能在調試模式下工作。

其他參考: