- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在使用device_apps列出设备上的可用应用程序。我想通过点击“图标”按钮来卸载应用程序,有什么办法可以做同样的事情? enter image description here
最佳答案
受this question和@Vicky Salunkhe启发的答案
要卸载应用,请向其传递软件包名称。 $packageName
是变量ex,some.app.id
android_intent.Intent()
..setAction(android_action.Action.ACTION_DELETE)
..setData(Uri.parse("package:$packageName"))
..startActivityForResult().then((data) {
print(data);
}, onError: (e) {
print(e);
});
在
pubspec.yaml
文件中添加一个包
intent: ^1.3.4
manifest
中的权限
<uses-permission android:name="android.permission.REQUEST_DELETE_PACKAGES" />
阅读更多答案
here,也可以引用
here
关于android - 有什么方法可以使用Flutter从设备上卸载应用程序吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62146049/
我正在尝试将 tslib 嵌入到 ARM 系统中,以便使用触摸屏设备;我已经成功安装了它,但不幸的是我无法检索所有笔记来再次安装它。 x) 我交叉编译了库文件,并将它们放入 /usr/lib ;我已经
我正在尝试开发 Linux 设备驱动程序,作为我的第一次尝试,我正在尝试开发具有以下文件选项的字符设备驱动程序, struct file_operations fops{ .open=open_fu
我们在 IoT Agent Ultralight 中发现了一个错误。 如果我们尝试向不存在的设备发送测量值,我们将收到 404 - DEVICE_NOT_FOUND 错误,但同时将在 IoTA 和 O
我有一个 d3dDevice: ComPtrd3dDevice; 我在这里将它用于 dxgiDevice: ComPtr dxgiDevice2; HRESULT hr; hr
我正在尝试开发 Linux 设备驱动程序,作为我的第一次尝试,我正在尝试开发具有以下文件选项的字符设备驱动程序, struct file_operations fops{ .open=open_fu
我在安装了 Xcode 4.5.1 的 Mt Lion 上运行。 默认情况下,当我构建并部署到 iOS 5.1 设备时,显示会在我旋转设备时旋转,但当我部署到 iOS 6 模拟器或运行 iOS 的 i
我在 Vagrantfile 中使用以下行创建了一个 hostonly 网络 config.vm.network :hostonly, "10.1.1.15" 我可以看到它设置了/etc/networ
我在 Vagrantfile 中使用以下行创建了一个 hostonly 网络 config.vm.network :hostonly, "10.1.1.15" 我可以看到它设置了/etc/networ
当我在应用程序中添加设备时,我想在 IoT 中心创建一个设备。 我正在寻找可用于执行操作的 REST 端点。或任何可用于执行此操作的 SDK。 最佳答案 查看以下文档: Service - Creat
我一生都无法使用 xcode 组织者“自动设备配置”中的“团队配置配置文件”在 xcode 4.0.1 中将我的应用程序构建到我的 iPad 上。 该应用程序完美地构建到模拟器,但当我构建到 iPad
我是一名优秀的程序员,十分优秀!