getModuleHandles()给了我所有模块句柄的数组,但是我想要device..So上新安装的应用程序的句柄,有没有任何方法可以获得OS4.5中新安装的句柄的信息
谢谢你。
发布于 2011-08-16 14:53:57
int moduleHandle = CodeModuleManager.getModuleHandle("YOUR_MODULE_NAME");
if(moduleHandle == 0){
    Dialog.alert("Module not found.");
else{
    ApplicationDescriptor ad = CodeModuleManager.getApplicationDescriptors(moduleHandle)[0];
}现在您就有了所安装应用程序的ApplicationDescriptor对象,这正是您所需要的。
发布于 2011-08-18 04:04:28
创建一个后台应用程序,它将在设备启动时运行,之后它将始终在后台运行。现在将CodeModuleListener添加到您的后台应用程序。侦听使用modulesAdded()添加的任何新模块,并跟踪处理程序。这些模块就是您想要的。
https://stackoverflow.com/questions/7074455
复制相似问题