movePackage
公共抽象無效movePackage(字符串的packageName, android.content.pm.IPackageMoveObserver觀察者, INT標誌)
Attempts to move package resources from internal to external media or vice versa. Since this may take a little while, the result will be posted back to the given observer. This call may fail if the calling context lacks the Manifest.permission.MOVE_PACKAGE permission, if the named package cannot be found, or if the named package is a "system package".
Parameters:
packageName - The name of the package to delete
observer - An observer callback to get notified when the package move is complete. android.content.pm.IPackageMoveObserver#packageMoved(boolean) will be called when that happens. observer may be null to indicate that no callback is desired.
flags - To indicate install location MOVE_INTERNAL or MOVE_EXTERNAL_MEDIA
爲什麼你要訪問此方法?我沒有看到用例,我不認爲你應該能夠移動軟件包。這似乎是操作系統應該照顧的東西。 – 2011-03-14 09:29:54
想寫點東西來大量移動應用程序到SD卡。這是一個令我惱怒的問題,相當一段時間了。 – xandy 2011-03-14 15:59:37