android - Google Keep 在您的应用程序中列出备注

标签 android android-intent google-keep

在我的应用中,我正在编写一个功能来将购物 list 分享到 Google Keep。为此,我使用 Intent.ACTION_SEND 操作并将包设置为 Google Keep 之一。

一切正常,但我想知道是否可以向 Intent 添加一个 EXTRA 参数,告诉 Google Keep 它必须显示为带有复选框的列表,就像在创建日历事件。现在,它显示为纯文本。

这是我的代码:

try {
        Intent keepIntent = new Intent(Intent.ACTION_SEND);
        keepIntent.setType("text/plain");
        keepIntent.setPackage("com.google.android.keep");

        keepIntent.putExtra(Intent.EXTRA_SUBJECT, "Shopping List " + recipe.getName());
        keepIntent.putExtra(Intent.EXTRA_TEXT, "Flower\nyeast\nbutter\nalmonds");

        startActivity(keepIntent);
    } catch (Exception e) {
        Dialogs.toastShort(this, "Google Keep is not installed on your device");
    }

现在,我得到了这个结果:

enter image description here

我想得到的是这个结果——否则用户必须在操作栏中选择“显示复选框”:

enter image description here

感谢您的帮助。

最佳答案

很遗憾,这是不可能的。 Google 尚未发布供公众或第 3 方使用的 API。如果您检查 http 流量,您可以看到底层 API,但没有真正的方法来复制它。抱歉

关于android - Google Keep 在您的应用程序中列出备注,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31168947/

相关文章:

google-api - 有 Google Keep API 吗?

python - 在 Google Keep 中对笔记进行排序 - gkeepapi

Android TableView 作为 ListView 中的 itemview 不可点击

java - 当 JSONArray 给出空值时显示文本 - android

android - 为什么启动紧急拨号器的 Intent 没有常量?

java - 当我想在 Activity 中获取字符串时,我得到 NULL

java - 在 Java 类 Android 应用程序之间传递字符串数组

android - Cordova Android 7 调用未知插件

android - 将第 3 方 Android JAR 集成到 Titanium Mobile 应用程序中?

javascript - Google Keep 文本输入如何工作?