将应用程序安装到 SD
我想将应用程序安装到sd,我知道在sdk2.2中,我们可以使用xml安装,但我想将应用程序安装到sdk 2.1中的sd。目前我只知道检查版本使用代码:
public static int getSDKVersionNumber() {
int sdkVersion;
try {
sdkVersion = Integer.valueOf(android.os.Build.VERSION.SDK);
} catch (NumberFormatException e) {
sdkVersion = 0;
}
return sdkVersion;
}
我的问题:如何将应用程序安装到SD,在sdk2.1和sdk 2.2。 谢谢。
i want to app to sd,i know in sdk2.2 ,we can install by using xml,but i want to install app to sd in sdk 2.1. at present i only know check version use the code:
public static int getSDKVersionNumber() {
int sdkVersion;
try {
sdkVersion = Integer.valueOf(android.os.Build.VERSION.SDK);
} catch (NumberFormatException e) {
sdkVersion = 0;
}
return sdkVersion;
}
my question:how to install app to sd ,at sdk2.1 and sdk 2.2.
thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我相信这个资源可能对您有最大帮助。安装位置应通过 AndroidManifest.xml 文件完成,我相信它是随 Android 2.2 (froyo) 引入的,这意味着旧手机(2.1 及更低版本)无法将应用程序安装到 SD 卡。
资源说:
Bitt Failure 的应用 SDWatch 能够向用户显示应用设置页面。我不确定我的阅读是否完全正确,但您可以使用 NotificationClicked.java
不过,我在弄清楚
String pkg
到底是什么时遇到了一些麻烦。I believe this resource may help you the most. Install locations should be done through the AndroidManifest.xml file and I believe it was introduced with Android 2.2 (froyo) meaning older phone (2.1 and below) cannot install apps to the SD card.
Resource says:
Bitt Fault, with his app SDWatch is able to show the user the app setting page. I'm not sure if I'm reading it completely right, but you may able to do it with this code snippet from NotificationClicked.java
I'm having a little trouble figuring out what the
String pkg
is exactly though.