How to access 3rd party TvProvider on rooted device?

你说的曾经没有我的故事 提交于 2021-01-07 01:29:15

问题


My question is a follow up to this question.

Let's assume I have an Android Tv stick, I also am the vendor. There are 3rd party apps like Netflix, Prime, etc. I want to access the channels provided via TvProvider or ContentResolver. As pointed out in one comment:

  1. apps vendors signs with the same key as an AOSP itself
  2. placed them in a special folder - only vendors of devices can do it
  3. or you, but only on rooted devices

How are my possibilities for the options above?


回答1:


Using one of the proposed options you will be able to get all channels from the TvProvider inside the apps with signature /signatureOrSystem protection level. I don't know the specifics but I assume they may be different for different ROMs you may use. You will be able to retrieve the data from TvProvider the same way you are able to do it in your own app - this answer has links to examples from Android system app.

You will be able to render Rows from the data via leanback library in your own app(I don't know whether it should be a launcher or just an app). After the user by clicking on a card will enter the app that provided the content and view it there. You will not be able to view the videos inside your own app even if it is a system one because you would have to have access to the backend of the app that provided the media and that information is not stored in the TvProvider. The media inside a TvProvider is rather a simple link to a content page inside the other app.

There is plenty of info online about modifying ROMs, creating signatureOrSystem apps I cannot dive a specific link because I cannot verify its validity, because I haven't tried to do such things with TvProvider in specifics and Android OS in general(except for the root and disassembling and modifying already existing apps from the device vendor - also plenty info online).



来源:https://stackoverflow.com/questions/65301651/how-to-access-3rd-party-tvprovider-on-rooted-device

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!