getLaunchIntentForPackage is null for some apps

后端 未结 3 1650
无人及你
无人及你 2020-12-01 14:08

I\'m building a service that sends a list of installed apps from an Android TV or a Fire TV to a mobile phone. The phone then sends back the package name of the app it wants

3条回答
  •  情话喂你
    2020-12-01 15:01

    I got the same error when calling getLaunchIntentForPackage(packageName). It was fixed by adding this in the launcher activity's intent-filter tag in the manifest file.

    
    

    When creating a new TV application in Android Studio, it didn't have the above as the default, instead it has this as the default in the launcher activity's intent-filter tag in the manifest file.

    
    

提交回复
热议问题