2016-02-19 99 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

相关问题