程序包 net_62v.external
类 MetaApplicationInstaller
java.lang.Object
net_62v.external.MetaApplicationInstaller
A class for package management, you can clone a specific app by calling the
You can install an app that not being installed on the host system by calling the
cloneApp(String)
method.You can install an app that not being installed on the host system by calling the
installAppByPath(String)
method.- 版本:
- 1.0
- 作者:
- king@62v.net
-
构造器概要
-
方法概要
修饰符和类型方法说明static int
Install an existing app which already been installed.
Must be installed before, so this method also known as clone application.
Usage:static String
convertResultToString
(int installResult) Convert the install result to a readable string, mostly greater than 0 is success, otherwise you can
use this api for debug purpose, and can be shown to users for comprehensive.static int
installAppByPath
(String path) Install apk from explorer etc.static int
installAppsByPath
(String path) Install apks (split apk) from explorer etc.
-
构造器详细资料
-
MetaApplicationInstaller
public MetaApplicationInstaller()
-
-
方法详细资料
-
cloneApp
Install an existing app which already been installed.
Must be installed before, so this method also known as clone application.
Usage:
MetaApplicationInstaller.cloneApp("com.whatsapp")
- 参数:
packageName
- package name like"com.whatsapp"
- 返回:
- install result, greater than 0 then success, otherwise you should convert it to see.
- 抛出:
RemoteException
-
installAppByPath
Install apk from explorer etc. And you must give a direct path to install inside.
Only support the standard apk file, please verify the file before you use this method.
MetaApplicationInstaller.installAppByPath("/sdcard/sample.apk")
- 参数:
path
- a direct apk path- 返回:
- install result
- 抛出:
RemoteException
-
installAppsByPath
Install apks (split apk) from explorer etc. And you must give a direct path to install inside.
Support dir or apks / apkm / xapk format file
MetaApplicationInstaller.installAppsByPath("/sdcard/pure.xapk")
- 参数:
path
- a direct apk path- 返回:
- install result
- 抛出:
RemoteException
-
convertResultToString
Convert the install result to a readable string, mostly greater than 0 is success, otherwise you can
use this api for debug purpose, and can be shown to users for comprehensive.- 参数:
installResult
- install result integer- 返回:
- readable string
-