I have a url for a video file that I need to play using my phone’s own video player.
I decided to use Intent.ACTION_VIEWand set the URI as Intent data, I can achieve the above on G1, except for HTC Hero. In the case of the Hero, I must explicitly set the class name in the intent in order to start the default video player:intent.setClassName("com.htc.album","com.htc.album.ViewVideo");
However, I do not like this approach, as it can break on other Android devices. Please advice:
1. What would be the best way to play this video through Intent, regardless of phone?
2. How conditionally setClassName in tube-specific Intent?
Note. Writing a standalone video player for our application is NOT an option that we can currently afford.
Thank!
source
share