Thanks.
I also wrote some code and got Flash working in a WebView:
WebView wv = (WebView) findViewById(R.id.webView1);
wv.getSettings().setPluginState(PluginState.ON);
wv.setWebViewClient(new WebViewClient() {
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
view.loadUrl(url);
return true;
}
});
String url = "file://mnt/sdcard/test.swf";
wv.loadUrl(url);
The trick to getting it to work on some devices is this:
<application android:hardwareAccelerated="true"
On Thursday, March 22, 2012 10:00:23 AM UTC-7, MagouyaWare wrote:
>
> Great... Just realize that not all devices are going to have something
> that can play SWF files so you will need to safeguard against that.
>
> The easiest way that I know of is to use
> PackageManager.queryIntentActivities() and pass it your intent... This
> will return a list of ResolveInfo objects... If that list is empty then the
> device doesn't have anything that will play SWF files. You can then
> display a dialog telling them to go to the Android Mar... er, Google Play
> thingie, and download one...
>
>
> http://developer.android.com/reference/android/content/pm/PackageManager.html#queryIntentActivities%28android.content.Intent,%20int%29<http://developer.android.com/reference/android/content/pm/PackageManager.html#queryIntentActivities%28android.content.Intent,%20int%29>
>
> Thanks,
> Justin Anderson
> MagouyaWare Developer
> http://sites.google.com/site/magouyaware<http://sites.google.com/site/magouyaware>
>
>
> On Thu, Mar 22, 2012 at 8:13 AM, bob <[email protected]> wrote:
>
>> Well, I got this to work if I have something called SWF Player installed:
>>
>> Intent intent = new Intent();
>> intent.setAction(android.content.Intent.ACTION_VIEW);
>> File file = new File("/mnt/sdcard/test.swf");
>>
>> intent.setDataAndType(Uri.fromFile(file) ,
>> "application/x-shockwave-flash");
>>
>> startActivity(intent);
>>
>>
>>
>>
>> On Wednesday, March 21, 2012 8:18:51 PM UTC-7, MagouyaWare wrote:
>>>
>>> Have you googled this? When I did, I came up with this stackoverflow
>>> post which should help answer your question. In the future, maybe do a
>>> little homework first... :-)
>>>
>>> http://stackoverflow.com/**questions/1887758/playing-a-**
>>> flash-file-in-android<http://stackoverflow.com/questions/1887758/playing-a-flash-file-in-android>
>>>
>>> Thanks,
>>> Justin Anderson
>>> MagouyaWare Developer
>>> http://sites.google.com/site/**magouyaware<http://sites.google.com/site/magouyaware>
>>>
>>>
>>> On Wed, Mar 21, 2012 at 2:43 PM, bob <[email protected]> wrote:
>>>
>>>> Does anyone know the easiest way to play back an SWF file on an Android
>>>> device?
>>>>
>>>> Thank you.
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Android Developers" group.
>>>> To post to this group, send email to android-developers@**
>>>> googlegroups.com <[email protected]>
>>>> To unsubscribe from this group, send email to
>>>> android-developers+**unsubscribe@googlegroups.com<android-developers%[email protected]>
>>>> For more options, visit this group at
>>>> http://groups.google.com/**group/android-developers?hl=en<http://groups.google.com/group/android-developers?hl=en>
>>>
>>>
>>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to
>> android-developers@googlegroups.com<[email protected]>
>> To unsubscribe from this group, send email to
>> android-developers+[email protected]<android-developers%[email protected]>
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en<http://groups.google.com/group/android-developers?hl=en>
>>
>
>
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en