How to make the application compatible with Smart TV?

Hi, I have an application that is compatible with my phone / tablet and my Android Android camera. However, this application is not compatible with my Android Smart TV, for example, when I switch to the Google game (this is Alpha), I get a text saying that the application is not compatible with the device.

I checked a few checks and found that the application manifest should mention that it is LEANBACK_LAUNCHER, which I liked the following code:

[Activity(Label = "Afaq.IPTV", Icon = "@drawable/icon", MainLauncher = true,
        ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
    [IntentFilter(new[] {"android.intent.action.MAIN"}, AutoVerify = true,
        Categories = new[] {"android.intent.category.LEANBACK_LAUNCHER"})]
    public class MainActivity : FormsApplicationActivity
    {...

Am I missing something? Has anyone succeeded in this before?

+4
source share
1 answer

I found a solution

In mainActivity, you start the class like I did in Quesiton

[Activity (Label = "Afaq.IPTV", Icon = "@drawable/icon", MainLauncher = true,   ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]

[IntentFilter (new [] {Intent.ActionMain}, Categories = new [] {Intent.CategoryLauncher, Intent.CategoryLeanbackLauncher})]

public class MainActivity: FormsApplicationActivity {...

<uses-feature android:name="android.hardware.touchscreen" android:required="false" />

, Google Play . , , (, ). Google , - , . , , .

0

All Articles