系统apk监听安装返回值说明

  1 /**
  2      * Installation return code: this is passed to the {@link IPackageInstallObserver} by
  3      * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)} on success.
  4      * @hide
  5      */
  6     public static final int INSTALL_SUCCEEDED = 1;
  7
  8     /**
  9      * Installation return code: this is passed to the {@link IPackageInstallObserver} by
 10      * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)} if the package is
 11      * already installed.
 12      * @hide
 13      */
 14     public static final int INSTALL_FAILED_ALREADY_EXISTS = -1;
 15
 16     /**
 17      * Installation return code: this is passed to the {@link IPackageInstallObserver} by
 18      * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)} if the package archive
 19      * file is invalid.
 20      * @hide
 21      */
 22     public static final int INSTALL_FAILED_INVALID_APK = -2;
 23
 24     /**
 25      * Installation return code: this is passed to the {@link IPackageInstallObserver} by
 26      * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)} if the URI passed in
 27      * is invalid.
 28      * @hide
 29      */
 30     public static final int INSTALL_FAILED_INVALID_URI = -3;
 31
 32     /**
 33      * Installation return code: this is passed to the {@link IPackageInstallObserver} by
 34      * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)} if the package manager
 35      * service found that the device didn‘t have enough storage space to install the app.
 36      * @hide
 37      */
 38     public static final int INSTALL_FAILED_INSUFFICIENT_STORAGE = -4;
 39
 40     /**
 41      * Installation return code: this is passed to the {@link IPackageInstallObserver} by
 42      * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)} if a
 43      * package is already installed with the same name.
 44      * @hide
 45      */
 46     public static final int INSTALL_FAILED_DUPLICATE_PACKAGE = -5;
 47
 48     /**
 49      * Installation return code: this is passed to the {@link IPackageInstallObserver} by
 50      * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)} if
 51      * the requested shared user does not exist.
 52      * @hide
 53      */
 54     public static final int INSTALL_FAILED_NO_SHARED_USER = -6;
 55
 56     /**
 57      * Installation return code: this is passed to the {@link IPackageInstallObserver} by
 58      * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)} if
 59      * a previously installed package of the same name has a different signature
 60      * than the new package (and the old package‘s data was not removed).
 61      * @hide
 62      */
 63     public static final int INSTALL_FAILED_UPDATE_INCOMPATIBLE = -7;
 64
 65     /**
 66      * Installation return code: this is passed to the {@link IPackageInstallObserver} by
 67      * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)} if
 68      * the new package is requested a shared user which is already installed on the
 69      * device and does not have matching signature.
 70      * @hide
 71      */
 72     public static final int INSTALL_FAILED_SHARED_USER_INCOMPATIBLE = -8;
 73
 74     /**
 75      * Installation return code: this is passed to the {@link IPackageInstallObserver} by
 76      * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)} if
 77      * the new package uses a shared library that is not available.
 78      * @hide
 79      */
 80     public static final int INSTALL_FAILED_MISSING_SHARED_LIBRARY = -9;
 81
 82     /**
 83      * Installation return code: this is passed to the {@link IPackageInstallObserver} by
 84      * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)} if
 85      * the new package uses a shared library that is not available.
 86      * @hide
 87      */
 88     public static final int INSTALL_FAILED_REPLACE_COULDNT_DELETE = -10;
 89
 90     /**
 91      * Installation return code: this is passed to the {@link IPackageInstallObserver} by
 92      * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)} if
 93      * the new package failed while optimizing and validating its dex files,
 94      * either because there was not enough storage or the validation failed.
 95      * @hide
 96      */
 97     public static final int INSTALL_FAILED_DEXOPT = -11;
 98
 99     /**
100      * Installation return code: this is passed to the {@link IPackageInstallObserver} by
101      * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)} if
102      * the new package failed because the current SDK version is older than
103      * that required by the package.
104      * @hide
105      */
106     public static final int INSTALL_FAILED_OLDER_SDK = -12;
107
108     /**
109      * Installation return code: this is passed to the {@link IPackageInstallObserver} by
110      * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)} if
111      * the new package failed because it contains a content provider with the
112      * same authority as a provider already installed in the system.
113      * @hide
114      */
115     public static final int INSTALL_FAILED_CONFLICTING_PROVIDER = -13;
116
117     /**
118      * Installation return code: this is passed to the {@link IPackageInstallObserver} by
119      * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)} if
120      * the new package failed because the current SDK version is newer than
121      * that required by the package.
122      * @hide
123      */
124     public static final int INSTALL_FAILED_NEWER_SDK = -14;
125
126     /**
127      * Installation return code: this is passed to the {@link IPackageInstallObserver} by
128      * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)} if
129      * the new package failed because it has specified that it is a test-only
130      * package and the caller has not supplied the {@link #INSTALL_ALLOW_TEST}
131      * flag.
132      * @hide
133      */
134     public static final int INSTALL_FAILED_TEST_ONLY = -15;
135
136     /**
137      * Installation return code: this is passed to the {@link IPackageInstallObserver} by
138      * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)} if
139      * the package being installed contains native code, but none that is
140      * compatible with the the device‘s CPU_ABI.
141      * @hide
142      */
143     public static final int INSTALL_FAILED_CPU_ABI_INCOMPATIBLE = -16;
144
145     /**
146      * Installation return code: this is passed to the {@link IPackageInstallObserver} by
147      * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)} if
148      * the new package uses a feature that is not available.
149      * @hide
150      */
151     public static final int INSTALL_FAILED_MISSING_FEATURE = -17;
152
153     // ------ Errors related to sdcard
154     /**
155      * Installation return code: this is passed to the {@link IPackageInstallObserver} by
156      * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)} if
157      * a secure container mount point couldn‘t be accessed on external media.
158      * @hide
159      */
160     public static final int INSTALL_FAILED_CONTAINER_ERROR = -18;
161
162     /**
163      * Installation return code: this is passed to the {@link IPackageInstallObserver} by
164      * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)} if
165      * the new package couldn‘t be installed in the specified install
166      * location.
167      * @hide
168      */
169     public static final int INSTALL_FAILED_INVALID_INSTALL_LOCATION = -19;
170
171     /**
172      * Installation return code: this is passed to the {@link IPackageInstallObserver} by
173      * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)} if
174      * the new package couldn‘t be installed in the specified install
175      * location because the media is not available.
176      * @hide
177      */
178     public static final int INSTALL_FAILED_MEDIA_UNAVAILABLE = -20;
179
180     /**
181      * Installation return code: this is passed to the {@link IPackageInstallObserver} by
182      * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)} if
183      * the new package couldn‘t be installed because the verification timed out.
184      * @hide
185      */
186     public static final int INSTALL_FAILED_VERIFICATION_TIMEOUT = -21;
187
188     /**
189      * Installation return code: this is passed to the {@link IPackageInstallObserver} by
190      * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)} if
191      * the new package couldn‘t be installed because the verification did not succeed.
192      * @hide
193      */
194     public static final int INSTALL_FAILED_VERIFICATION_FAILURE = -22;
195
196     /**
197      * Installation return code: this is passed to the {@link IPackageInstallObserver} by
198      * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)} if
199      * the package changed from what the calling program expected.
200      * @hide
201      */
202     public static final int INSTALL_FAILED_PACKAGE_CHANGED = -23;
203
204     /**
205      * Installation return code: this is passed to the {@link IPackageInstallObserver} by
206      * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)} if
207      * the new package is assigned a different UID than it previously held.
208      * @hide
209      */
210     public static final int INSTALL_FAILED_UID_CHANGED = -24;
211
212     /**
213      * Installation return code: this is passed to the {@link IPackageInstallObserver} by
214      * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)} if
215      * the new package has an older version code than the currently installed package.
216      * @hide
217      */
218     public static final int INSTALL_FAILED_VERSION_DOWNGRADE = -25;
219
220     /**
221      * Installation parse return code: this is passed to the {@link IPackageInstallObserver} by
222      * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)}
223      * if the parser was given a path that is not a file, or does not end with the expected
224      * ‘.apk‘ extension.
225      * @hide
226      */
227     public static final int INSTALL_PARSE_FAILED_NOT_APK = -100;
228
229     /**
230      * Installation parse return code: this is passed to the {@link IPackageInstallObserver} by
231      * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)}
232      * if the parser was unable to retrieve the AndroidManifest.xml file.
233      * @hide
234      */
235     public static final int INSTALL_PARSE_FAILED_BAD_MANIFEST = -101;
236
237     /**
238      * Installation parse return code: this is passed to the {@link IPackageInstallObserver} by
239      * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)}
240      * if the parser encountered an unexpected exception.
241      * @hide
242      */
243     public static final int INSTALL_PARSE_FAILED_UNEXPECTED_EXCEPTION = -102;
244
245     /**
246      * Installation parse return code: this is passed to the {@link IPackageInstallObserver} by
247      * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)}
248      * if the parser did not find any certificates in the .apk.
249      * @hide
250      */
251     public static final int INSTALL_PARSE_FAILED_NO_CERTIFICATES = -103;
252
253     /**
254      * Installation parse return code: this is passed to the {@link IPackageInstallObserver} by
255      * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)}
256      * if the parser found inconsistent certificates on the files in the .apk.
257      * @hide
258      */
259     public static final int INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES = -104;
260
261     /**
262      * Installation parse return code: this is passed to the {@link IPackageInstallObserver} by
263      * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)}
264      * if the parser encountered a CertificateEncodingException in one of the
265      * files in the .apk.
266      * @hide
267      */
268     public static final int INSTALL_PARSE_FAILED_CERTIFICATE_ENCODING = -105;
269
270     /**
271      * Installation parse return code: this is passed to the {@link IPackageInstallObserver} by
272      * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)}
273      * if the parser encountered a bad or missing package name in the manifest.
274      * @hide
275      */
276     public static final int INSTALL_PARSE_FAILED_BAD_PACKAGE_NAME = -106;
277
278     /**
279      * Installation parse return code: this is passed to the {@link IPackageInstallObserver} by
280      * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)}
281      * if the parser encountered a bad shared user id name in the manifest.
282      * @hide
283      */
284     public static final int INSTALL_PARSE_FAILED_BAD_SHARED_USER_ID = -107;
285
286     /**
287      * Installation parse return code: this is passed to the {@link IPackageInstallObserver} by
288      * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)}
289      * if the parser encountered some structural problem in the manifest.
290      * @hide
291      */
292     public static final int INSTALL_PARSE_FAILED_MANIFEST_MALFORMED = -108;
293
294     /**
295      * Installation parse return code: this is passed to the {@link IPackageInstallObserver} by
296      * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)}
297      * if the parser did not find any actionable tags (instrumentation or application)
298      * in the manifest.
299      * @hide
300      */
301     public static final int INSTALL_PARSE_FAILED_MANIFEST_EMPTY = -109;
302
303     /**
304      * Installation failed return code: this is passed to the {@link IPackageInstallObserver} by
305      * {@link #installPackage(android.net.Uri, IPackageInstallObserver, int)}
306      * if the system failed to install the package because of system issues.
307      * @hide
308      */
309     public static final int INSTALL_FAILED_INTERNAL_ERROR = -110;
时间: 2024-08-07 10:37:50

系统apk监听安装返回值说明的相关文章

老男孩教育每日一题-2017年5月11-基础知识点: linux系统中监听端口概念是什么?

1.题目 老男孩教育每日一题-2017年5月11-基础知识点:linux系统中监听端口概念是什么? 2.参考答案 监听端口的概念涉及到网络概念与TCP状态集转化概念,可能比较复杂不便理解,可以按照下图简单进行理解? 将整个服务器操作系统比喻作为一个别墅 服务器上的每一个网卡比作是别墅中每间房间 服务器网卡上配置的IP地址比喻作为房间中每个人 而房间里面人的耳朵就好比是监听的端口 当默认采用监听0.0.0.0地址时,表示房间中的每个人都竖起耳朵等待别墅外面的人呼唤当别墅外面的用户向房间1的人呼喊时

windows系统端口监听

通常情况下,如果想发现所有已经使用的和正在监听的端口,我们可以使用netstat命令. netstat并非一个端口扫描工具,如果你想扫描计算机开放了哪些端口的话,建议使用本文介绍的方法. Netstat命令基础 Netstat命令主要用于显示协议统计信息和当前 TCP/IP 网络连接. 其格式如下: NETSTAT [-a] [-b] [-e] [-n] [-o] [-p proto] [-r] [-s] [-v] [interval] 下面简单说明各个参数的含义: -a 显示所有连接和监听端口

JS监听手机返回键

JS监听手机返回键,需要用些前端的"奇技淫巧". 核心代码如下: if (window.history && window.history.pushState) { $(window).on('popstate', function() { var hashLocation = location.hash; var hashSplit = hashLocation.split("#!/"); var hashName = hashSplit[1];

js 实时监听input中值变化

js 实时监听input中值变化 分类: Javascript2014-05-11 11:13 849人阅读 评论(0) 收藏 举报 [html] view plaincopyprint? <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>RunJS

关于实时监听输入框的值变化

实时监听文本框值变化是非常常见的功能,通常最简单的办法就是用keyup,keydown来实现,但是这种方法有两个问题,一个是当直接复制粘贴的时候没法监听到事件,另外一个问题是在移动端,使用删除键删除输入时候也无法监听到! 解决办法: 1.使用onchange事件 onchange事件是文本框内容改变并失去焦点的时候才触发. 2.比较完美的解决办法:oninput和onproper oninput 是 HTML5 的标准事件,对于检测 textarea, input:text, input:pas

使用ionic开发时用遇到监听手机返回按钮的问题~

当时用的是ionic开发一个app,需求是,当按下手机的返回按钮,在指定的页面双击退出,而在其他页面点击一次返回到上个页面: 其实用ionic自带的服务就可以解决:  //双击退出   $ionicPlatform.registerBackButtonAction(function (e) {   //判断处于哪个页面时双击退出    if($location.path() =='/message' || $location.path() =='/work' || $location.path(

vue+hbuilder监听安卓返回键问题

1.监听安卓返回键问题 效果:在一级页面按一下返回键提示退出应用,按两下退出应用;在其它页面中,按一下返回上个历史页面 1 2 import mui from './assets/js/mui.min.js' Vue.prototype.$mui = mui; 在一级页面mounted时 1 this.$mui.plusReady( () =>{ 2 var backcount = 0; 3 this.$mui.back = ()=> { 4 if (this.$mui.os.ios) ret

vue中父组件如何监听子组件值的变化

vue中我们会遇到很多父子组件通信的需求, 下面简单列一下,父子组件通信的几种情况 1:父组件向子组件传值:使用prop向子组件传值: 2:子组件实时监听父组件传来的值的变化:使用watch去监听父组件传来的值: 3:父组件可以通过this.$refs.name.去访问子组件的值或方法: 4:子组件可以通过this.$parent.去访问父组件的值或方法: 总结了一下,感觉好像挺全面的,好像不缺啥了.... 但是仔细一想,父组件如何去监听子组件的值呢?如何根据子组件中的某个值的变化,父组件作出响

Android NDK开发(九)——应用监听自身卸载升级版,使用Inotify监听安装目录

转载请注明出处:http://blog.csdn.net/allen315410/article/details/42555415 在上一篇博客中,我们讲了一个小小的案例,用NDK监听应用程序自身卸载,并且打开内置浏览器加载用户调用页面.关于监听应用程序自身卸载的原理和实现方案可以在上篇博客中找到,地址是:http://blog.csdn.net/allen315410/article/details/42521251,这里就不再复述了. 值得注意的是,在上篇博客中我也已经引述了一个案例中存在的