Google 在您的应用中保留列表注释
Google Keep list note from inside your app
在我的应用程序中,我正在编写一个功能来将购物清单分享到 Google Keep。为此,我使用 Intent.ACTION_SEND 操作并将包设置为 Google Keep.
之一
一切正常,但我想知道是否可以向 Intent 添加一个 EXTRA 参数来告诉 Google 必须将其显示为带有复选框的列表,就像可以添加额外事件一样-创建日历事件时的特定额外内容。现在,它显示为纯文本。
这是我的代码:
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");
}
现在,我得到了这个结果:
什么,我想得到的是这个结果——否则用户必须在操作栏中 select "show checkboxes":
感谢您的帮助。
很遗憾,这是不可能的。 Google 尚未发布供 public 或第 3 方使用的 API。如果您检查 http 流量,您可以看到底层的 API 但没有真正的方法来复制它。抱歉
在我的应用程序中,我正在编写一个功能来将购物清单分享到 Google Keep。为此,我使用 Intent.ACTION_SEND 操作并将包设置为 Google Keep.
之一一切正常,但我想知道是否可以向 Intent 添加一个 EXTRA 参数来告诉 Google 必须将其显示为带有复选框的列表,就像可以添加额外事件一样-创建日历事件时的特定额外内容。现在,它显示为纯文本。
这是我的代码:
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");
}
现在,我得到了这个结果:
什么,我想得到的是这个结果——否则用户必须在操作栏中 select "show checkboxes":
感谢您的帮助。
很遗憾,这是不可能的。 Google 尚未发布供 public 或第 3 方使用的 API。如果您检查 http 流量,您可以看到底层的 API 但没有真正的方法来复制它。抱歉