不,您无法自定义卸载消息。
正如你可以在消息从应用程序的资源采取的PackageInstaller的UninstallerActivity看到,它不是定制:
UserManager userManager = UserManager.get(getActivity());
if (dialogInfo.allUsers && userManager.getUserCount() >= 2) {
messageBuilder.append(getString(R.string.uninstall_application_text_all_users));
} else if (!dialogInfo.user.equals(android.os.Process.myUserHandle())) {
UserInfo userInfo = userManager.getUserInfo(dialogInfo.user.getIdentifier());
messageBuilder.append(
getString(R.string.uninstall_application_text_user, userInfo.name));
} else {
messageBuilder.append(getString(R.string.uninstall_application_text));
}
这些都是在string.xml
提供的字符串:
<string name="uninstall_application_text">Do you want to uninstall this app?</string>
<string name="uninstall_application_text_all_users">Do you want to uninstall this app for <b>all</b> users? The application and its data will be removed from <b>all</b> users on the device.</string>
<string name="uninstall_application_text_user">Do you want to uninstall this app for the user <xliff:g id="username">%1$s</xliff:g>?</string>
按照你所说的,如果应用程序是我自己的应用程序,它应该是可编辑的,我可以设置字符串的值? – user1429322
是的,如果你创建你的Package Installer版本,你可以自定义字符串 –