如何处理应用程序依赖于3D方 [英] How to handle app dependencies to 3d party

查看:328
本文介绍了如何处理应用程序依赖于3D方的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

该应用程序我目前正在开发依赖于第三方应用程序(OIFileManager)。

The app I'm currently developing depends on a third party application (OIFileManager).

我的问题是什么是处理这些类型的依赖关系的一般方法是什么?

My question is what is the general way to handle these kind of dependancies?

告诉用户如何解决?

嵌入3D党APK(如果它的许可证允许的话)

Embed the 3d-party apk (if its license allows it)

自动解决这个问题(也许Android市场上都是有系统)。

Automatically resolve it (maybe Android market has a system for it).

推荐答案

有没有自动方式。用户必须手动安装从Android Market(或其他来源)的依赖。

There's no automatic way. The user will have to install the dependency from Android Market (or some other source) manually.

Intent scanIntent = new Intent("com.google.zxing.client.android.SCAN");
Intent marketIntent = new Intent(ACTION_VIEW, Uri.parse("market://details?id=com.google.zxing.client.android"));

try {
    startActivityForResult(scanIntent);
} catch (ActivityNotFoundException e) {
    try {
        // show a prompt here
        startActivity(marketIntent);
    } catch (ActivityNotFoundException e) {
        Toast.makeText(this, "Market not installed.", LENGTH_SHORT).show();
    }

}

所以你:

  • 尝试启动扫描仪;
  • 如果失败,提示用户从Android Market安装;
  • 如果失败,则未安装市场。

这篇关于如何处理应用程序依赖于3D方的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆