2016-02-19 150 views
5

我正在將Facebook登錄鏈接到我的Android應用程序的過程。在一些教程中,我被要求註冊我的應用程序與Facebook開發者網站,我做的一切,但我無法找到「默認的活動類名稱」在我的Android工作室我已經提供了這個以下清單文件無法找到默認活動類名

<?xml version="1.0" encoding="utf-8"?> 
    <manifest xmlns:android="http://schemas.android.com/apk/res/android" 
    package="in.evago.evago"> 

    <uses-permission android:name="android.permission.INTERNET" /> 

    <application 
     android:allowBackup="true" 
     android:icon="@mipmap/ic_launcher" 
     android:label="@string/app_name" 
     android:supportsRtl="true" 
     android:theme="@style/AppTheme"> 
     <meta-data 
      android:name="com.facebook.sdk.ApplicationId" 
      android:value="@string/facebook_app_id" /> 

     <!-- Front Page --> 
     <activity 
      android:name=".Frontpage" 
      android:label="@string/app_name" 
      android:theme="@style/AppTheme.NoActionBar"> 
      <intent-filter> 
       <action android:name="android.intent.action.MAIN" /> 
       <category android:name="android.intent.category.LAUNCHER" /> 
      </intent-filter> 

      <meta-data 
       android:name="android.app.searchable" 
       android:resource="@xml/searchable" /> 
     </activity> 
     <!-- Search results activity --> 


<activity 
     android:name=".SearchResultsActivity" 
     android:label="@string/title_activity_searchable" 
     android:launchMode="singleTop" 
     android:theme="@style/AppTheme.NoActionBar"> 
     <intent-filter> 
      <action android:name="android.intent.action.SEARCH" /> 
     </intent-filter> 
    </activity> 
    <!-- Search results activity Ends --> 

</application> 

請幫我在定位「默認的活動類名」

回答

6

應該包含類:

<intent-filter> 
<action android:name="android.intent.action.MAIN" /> 
<category android:name="android.intent.category.LAUNCHER" /> 
</intent-filter> 

所以其。前頁

+1

嘿,謝謝你的回覆,所以我應該提供它作爲「.Frontpage」或「in.evago.evago.Frontpage」,其中要求默認活動名稱 –

+1

試試看路徑,只是爲了確保:) – Picci

+0

如果我有''>的活動會怎麼樣?迎合深度鏈接的就有這樣的類別。 Facebook在他們的文檔中提到了「Default Activity Class Name」:https://developers.facebook.com/products/analytics/quickstarts/android/ 我認爲你應該使用當你點擊時應該打開的那個Facebook廣告中的應用徽標。但不知道。 – Przemo

1

頭版 - 這是默認的活動名稱,因爲它的發射活動

+0

不一定。您可以在沒有LAUNCHER類別的情況下爲其他Activity創建應用,但使用DEFAULT類別。用於深入連接的連接。 適用於Android的Facebook分析快速入門指南: '默認活動類名稱 這是處理深度鏈接的活動的完全限定類名稱。當我們從Facebook應用程序深入鏈接到您的應用程序時,我們會使用它。你也可以在你的Android Manifest中找到這個.' – Przemo

相關問題