问题
Just a quick question for i can't find proper answer to.
I have developed android app for tablet and Mobile device, is it possible to install this app on Android Smart TV? If yes than What issues i can possibly run into?pixels? image distortion? or will it run properly or not at all.
Thanks.
回答1:
Perhaps the single most important thing in your manifest would be
<manifest>
<uses-feature android:name="android.hardware.touchscreen"
android:required="false" />
...
</manifest>
to allow the APK to be installed on TV.
Then you can deal with other subject mentioned in the comments as LEANBACK_LAUNCHER
.
回答2:
You cannot install any Android app on Android TV just like that. There are technical prerequisites that app should satisfy in order to make it possible to install it on TV. Check this link: https://developer.android.com/training/tv/start/start.html
Also, even if app is technically capable of being run on the TV, I think that app will not be shown in the Google Play as "app for TV" unless you upload TV screenshots in APK listing section. Not a big issue, but still worth of mentioning :)
EDIT:
Now I saw this comment of yours: "I don't want to make my application from scratch. Just need to know if my this mobile app will run on tv or not? What if i set the layouts for TV in my current app?"
Maybe it is late for this very app, but in future - try employing MVP or other app architecture where you have few layers loosely coupled with each other. That will make it easy swapping one UI layer with another. Maybe even extracting common stuff in a AAR library and actually having two different apps (one for handheld devices, another one for TV) which actually differ only in UI, but using the same lib with business logic, use cases, domain model and so.
来源:https://stackoverflow.com/questions/39934595/installing-android-mobile-apps-on-android-tv