开发者

install 2 apk files while installing one [duplicate]

This question already has answers here: Closed 11 years ago.

Possible Duplicate:

Download And Install apk from a link.

hi.. Wen my application is being installed i also want to install Adobe reader apk.

Is i开发者_Python百科t possible to add the Adobe Reader apk somewhere in my application so that it gets installed with my application?


I wouldn't want to force the install of adobe- what if they want to use some other pdf reader? and everytime adobe updates their reader you want to update your code?

You could test to see if it is installed:

boolean readerInstalled= false;
try {
  PackageManager pm = getPackageManager();
  ApplicationInfo ai = pm.getApplicationInfo("com.adobe.reader", 0);
  if (ai != null)
    readerInstalled= true;
} catch (NameNotFoundException e) {
  readerInstalled= false;
}

then provide a link to the market if they want to install it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜