android - 单击按钮时的电子表格特定文件
问题描述
我想在我自己的应用程序上点击按钮打开谷歌电子表格,文件已经在谷歌工作表上创建好了。这是我从我的应用程序打开工作表应用程序的代码,但我想在我自己的应用程序中单击按钮时打开该特定文件。
showBtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent launchIntent = getPackageManager().getLaunchIntentForPackage("com.google.android.apps.docs.editors.sheets");
if (launchIntent != null) {
startActivity(launchIntent);
} else {
Toast.makeText(ClassActivity.this, "There is no package available in android", Toast.LENGTH_LONG).show();
}
}
});
解决方案
推荐阅读
- c++ - 使用 Winsock C++ 的蓝牙连接
- operating-system - 使用 Semaphore 确定三个进程的执行顺序并打印“AABC”
- bash - 如何递归地grep多个文件夹中的文件?我无法管道递归猫输出
- word-embedding - 从 BERT 模型中提取单词特征
- android - 对于 Android Gradle 插件 4.1.0 中的库项目,版本属性不起作用
- jquery - 如何获取 JQuery 插件验证以检查数据库中的重复值
- post - 无法使用 Kafka Rest Proxy 创建 Kafka 主题 - HTTP 415 Unsupported Media Type javax.ws.rs.NotSupportedException
- office-addins - AADSTS50020:租户中不存在用户帐户
- python - 使用 Python 和 SQLAlchemy 连接到 Heroku Postgres
- python - Python Selenium:如何在 Network > XHR 中访问响应对象