java - 如何打开现有的 android 应用程序并使用颤振向其发送数据
问题描述
你好我想打开一个现有的应用程序(我也做了)我可以使用这个包flutter_appavailability从我的flutter应用程序启动应用程序:^0.0.21我想要的是从flutter应用程序发送数据然后到我的应用程序开张了
我想要的是将数据样本“测试数据”发送到我正在打开的应用程序中的一个文本框。
下面是我当前打开现有应用程序的代码。
home: Scaffold(
appBar: AppBar(
title: const Text('Plugin flutter_appavailability app'),
),
body: ListView.builder(
itemCount: installedApps == null ? 0 : installedApps.length,
itemBuilder: (context, index) {
return ListTile(
title: Text(installedApps[index]["app_name"]),
trailing: IconButton(
icon: const Icon(Icons.open_in_new),
onPressed: () {
Scaffold.of(context).hideCurrentSnackBar();
AppAvailability.launchApp(installedApps[index]["package_name"]).then((_) {
print("App ${installedApps[index]["app_name"]} launched!");
}).catchError((err) {
Scaffold.of(context).showSnackBar(SnackBar(
content: Text("App ${installedApps[index]["app_name"]} not found!")
));
print(err);
});
}
),
);
},
),
),
解决方案
推荐阅读
- c - 静态断言枚举是某种底层类型
- java - 如何使用注释插件更改圆圈颜色
- arrays - 从给定的起点和终点在 bash 中创建一个数组
- mysql - MySQL JOIN 语法,看不到错误原因
- excel - 如何在Excel中的一个单元格中查找多个值?
- python - 装饰函数有没有办法引用装饰器创建的对象?
- xpath - 如何使用 xquery 查看输入节点的结果或任何其他数据更新?
- azure-eventgrid - 当有多个订阅者时,Azure 事件网格如何处理故障?
- python - 在每列的 for 循环中删除 NaN (Longstaff Schwartz Monte Carlo)
- laravel - 如何处理 Summernote 所见即所得编辑器生成的无效 HTML