简体   繁体   中英

How to play swf file on Google TV device?

I have tried this

Intent intent = new Intent();  
        intent.setAction(android.content.Intent.ACTION_VIEW);  
        String pathFlash = getExternalFilesDir(null).getAbsolutePath() + File.separator + "flash/1.swf";
        File file = new File(pathFlash);  
        intent.setDataAndType(Uri.fromFile(file), "flash/*");  
        startActivity(intent);

But it crashes the application because android cannot find the proper activity to play a flash file.

I there any other way to play flash files on the google tv device?

You can play flash video in a limited way using Chrome (Flash 10 and lower currently works). Try passing the local uri to the flash file to Chrome - it might work - I have not tried it. You could also try creating a local html file with the flash object embeded into it an load that in Chrome (local flash file reference in the html - pass the uri of the html using an intent)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM