2017-09-05 97 views
1

我有一個智能手機應用程序。在我AndroidManifest.xml文件放置的特殊intent-filter針對不同設備類型的不同活動

<activity 
     android:name=".feature.splashscreen.SplashScreenVm" 
     android:screenOrientation="portrait"> 
     <intent-filter> 
      <action android:name="android.intent.action.MAIN" /> 
      <category android:name="android.intent.category.LAUNCHER" /> 
     </intent-filter> 
    </activity> 

現在的活動,我需要推出穿戴式設備上我的應用程序。顯然,可穿戴設備的默認活動應該是WearableActivity.class。如何配置我的AndroidManifest.xml以根據設備的類型啓動不同的活動?或者,也許它不應該通過清單處理?

回答

0

確實是不同的。我建議您是否爲可穿戴設備製作第二款應用,但功能有限,或者僅限於智能手機應用中的重要功能。請注意,可穿戴設備的屏幕空間有限,因此您可能只想將其用於諸如通知之類的內容。