I have a URL for a video file which I need to play using the native Video-player of the handset.
I figured using Intent.ACTION_VIEW
and setting the URI as Intent data, I am able to achieve the aforementioned on G1 except HTC hero. In case of Hero, I have to explicitly set the class Name in the Intent to start the default Video Player: intent.setClassName("com.htc.album","com.htc.album.ViewVideo");
However, I am not comfortable with this approach as it might break on other Android devices. Please advice on :
1. What would be the best way to play this video url via Intent, irrespective of the handset?
2. How to conditionally setClassName in Intent, specific to a Handset?
Note: Writing a standalone Video Player for our app is NOT an option we can afford at the moment.
Thanks!