Checking users installed flash version
Here is a little tutorial on checking users flash version. It comes in handy, if you want to use flash content in your app. Flash lite can cause some problems, so this snippet is also about that...
We have several android phones in the office, and all phones with HTC Sense UI had problems with webviews and flash content. Some crashed, some did not show flash content. It seems, that the webview does not use the proper flash player, if it has both flash lite and flash player installed. It simply chooses "none", or crashes.
- public static boolean checkFlash() {
- PackageManager pm = ContextProvider.getContext().getPackageManager();
- try {
- //check flash
- ApplicationInfo ai = pm.getApplicationInfo("com.adobe.flashplayer&qu
ot;, 0); - Log.d("Flash version Installed: " + pm.getPackageInfo("com.adobe.flashplayer&qu
ot;, 0).versionName); - if (ai != null) {
- Log.d("flash present...OK");
- }
- return false;
- }
- try {
- //check flash lite
- ApplicationInfo ai2 = pm.getApplicationInfo("com.htc.flashliteplugin&
quot;, 0); - if (ai2 != null) {
- Log.d("flash lite present..disabling flash");
- return false;
- }
- return true;
- return true;
- }
- }
- //you also need to enable/disable webview plugins to use or disable flash:
- webview.getSettings().setPluginsEnabled(true)
So for now, we just disable flash altogether if flash lite is present. If anyone knows a workaround or a solution, please leave a comment.
New tutorials from Helloandroid
Recent Apps
Android on Twitter
-
@Idevicegazette (iDevice Gazette)
GSM-to-Skype bridge lets you lose those roaming fees http://bit.ly/lbRJeh #android
9 years 41 weeks ago -
@tommy_banane (tom b.)
RT @AndroidFavorite: #Android New Desktop Android Market Is Live, Adds Several New Features http://zorr0.nl/lFwXNz
9 years 41 weeks ago -
@dwilliams5 (Dennis Williams)
just completed a runtastic run of 3.02 km in 40 min 11 s with #runtastic #Android App: http://tinyurl.com/5tvrpe3
9 years 41 weeks ago -
@S_Pinz (Spinz!)
RT @Androidheadline: Out of box #LG Optimus 3D got Quadrant 2420 score. Thanks @blink_c #io2011 #android http://twitpic.com/4whkdz
9 years 41 weeks ago -
@tayaitapps (Taya IT)
Next Google TV Looks A Lot Like Android http://t.co/dvlTim3 via @alleyinsider #google #apple #android #tv #honeycomb
9 years 41 weeks ago
Poll
Useful resources
Android Development Projects
- Alter LineageOS 18.1 Raspberry Pi Build to Boot from USB
- Build me a website
- hi, i want a soccer app
- create a app -- 2
- Need upload MY apps to YOUR Google Play Developer account -- 4
- App para Taxis
- build ios and android app
- ONLY Native UAE / Emirati Arabic Speaking Freelancer Required! (UAE / Emirati Arabic Dialect/Accent)
- Unlock Huawei P9 Lite bootloader -- 2
- Botón Antipánico para Dispositivo Movil