android / tv-samples

Multiple samples showing best practices in app development on Android TV.
Apache License 2.0
1.02k stars 329 forks source link

Leanback AppLinks calling issue. #85

Open support-iintelligas opened 1 year ago

support-iintelligas commented 1 year ago

Hi Team, I am trying to open one OTT App from my own Leanback app in Android TV. It works for deep linking. Where we have schema other than http/https. for example below code is working to open youtube video. Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.parse("vnd.youtube://72K1VhjoL98")); startActivity(intent); But when I am trying same code with AppLinks (schema with http/https along proper assetlinks.json hosted) it does not work. I am trying it for Indian OTT app called Zee5. trying to open Zee5 from my Leanback App. assetlinks url : https://www.zee5.com/.well-known/assetlinks.json Note: Can't share the exact AppLinks due to data privacy. App was crashing when there was not web browser installed in the Android TV box. After installing Puffin TV Browser, now it opens the url in browser but NOT opening the proper app (zee5 app.) Intent intent = new Intent(Intent.ACTIONVIEW); intent.setData(Uri.parse("https://xxx.xxx.bac/RlQq/?af***")); //Masking due to data privacy. startActivity(intent); Same code is working fine in android Mobile app. Please advice me how to open a third party TV app from my Leanback app using AppLinks.