如果他的Android设备上没有安装flash播放器,请通知用户

时间:2011-05-17 06:02:07

标签: android flash

我需要让用户安装flash播放器,当他在他的Android手机中安装我的应用程序并且还没有安装flash播放器时,我怎么能用编码来做呢???

请帮帮我

1 个答案:

答案 0 :(得分:1)

尝试使用Java代码:

Intent intent = new Intent();

    intent.setComponent(new ComponentName("com.adobe.flashplayer", "com.adobe.flashplayer.FlashExpandableFileChooser"));
    PackageManager pm = getPackageManager();
    List<ResolveInfo> activities = pm.queryIntentActivities(intent, 0);
    if (activities != null && activities.size() > 0) {
        Toast.makeText(this, "Flash is installed!", Toast.LENGTH_LONG).show();
    }
    else {
        Toast.makeText(this, "Flash not installed!", Toast.LENGTH_LONG).show();
    }

参考:How to check if the Flash players is installed on Android