android-tv

Use Youtube API in Android TV

微笑、不失礼 提交于 2019-11-27 03:36:20
问题 I want to play youtube videos in my Android TV APP. I am also working on a Android phone/tablet APP and I was able to use Youtube Android API to play videos. But when I try to use the same API on Android TV it gives me an error ("This app won't work unless you update the YouTube"), but my youtube is updated. I found this issue in the YouTube Android Player API issue tracker, it is the same problem that I am facing here, so I want to know if someone have a solution, or know another version of

Which resource qualifier should I use to support 1080p, 720p android TV? - Android

我只是一个虾纸丫 提交于 2019-11-27 03:27:02
问题 In order to define different dimension values for 1080p and 720p android TV, I need to decide which qualifier I should use. When I'm trying to use something like values-sw1080p,values-sw720p, it doesn't work. The values in dimes.xml doesn't affect anything. But it works if I'm using qualifier like -sw540dp,-sw360dp. I don't really understand why like that. Any idea? Thanks. 回答1: First of all, you are substantially correct. You can use sw360dp/ : 720p screens sw540dp/ : 1080p screens The

getLaunchIntentForPackage is null for some apps

僤鯓⒐⒋嵵緔 提交于 2019-11-27 03:11:31
问题 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 to launch and the service launches it. This is the code that creates the list public List<InstalledApp> GetInstalledApps(boolean isAndroid) { PackageManager pm = getPackageManager(); List<ApplicationInfo> allPackages = pm.getInstalledApplications(PackageManager.GET_META_DATA); List<InstalledApp> userPackages = new

How do I use tools:overrideLibrary in a build.gradle file?

别等时光非礼了梦想. 提交于 2019-11-27 02:27:41
I'm using the leanback libraries, which require Android 17 or later. However my app supports a minSDK of 16, so I get a build error from gradle saying Error:Execution failed for task ':Tasks:processPhoneDebugManifest'. > Manifest merger failed : uses-sdk:minSdkVersion 16 cannot be smaller than version 17 declared in library /Users/mike/Projects/android-for-dummies-v3/Tasks/build/intermediates/exploded-aar/com.android.support/leanback-v17/21.0.2/AndroidManifest.xml Suggestion: use tools:overrideLibrary="android.support.v17.leanback" to force usage When I look at the build tools documentation ,

Android : Get “device name” on android tv

心已入冬 提交于 2019-11-26 22:26:47
问题 I know this question is something that is often asked but no matter what I tried I couldn't find the answer. I use an AVD android TV (API 24) and want to access this : How can I access this name in my app ? Even with adb I never found it... 回答1: this is worked for my AVD (API level 24). String deviceName = Settings.Global.getString(getContentResolver(), "device_name"); Instead of the string "device_name", you can also use the constant Settings.Global.DEVICE_NAME. This property was moved into

UnsatisfiedLinkError: dalvik.system.PathClassLoader

隐身守侯 提交于 2019-11-26 21:50:08
问题 I'm making an application for AndroidTV and get the error java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/mytv.mytv-2/base.apk" on a NexusPlayer with Android 6.0.1. Curious that it works on a smart TV with Android 5.1.1. The whole text error is: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/mytv.mytv-2/base.apk"],nativeLibraryDirectories=[/data/app/mytv.mytv-2/lib/x86, /data/app/mytv.mytv-2/base

How do I use tools:overrideLibrary in a build.gradle file?

此生再无相见时 提交于 2019-11-26 10:06:32
问题 I\'m using the leanback libraries, which require Android 17 or later. However my app supports a minSDK of 16, so I get a build error from gradle saying Error:Execution failed for task \':Tasks:processPhoneDebugManifest\'. > Manifest merger failed : uses-sdk:minSdkVersion 16 cannot be smaller than version 17 declared in library /Users/mike/Projects/android-for-dummies-v3/Tasks/build/intermediates/exploded-aar/com.android.support/leanback-v17/21.0.2/AndroidManifest.xml Suggestion: use tools