Search code examples
androidandroid-intentgoogle-keep

Google Keep list note from inside your app


In my app, I am writing a functionality to share a shopping list to Google Keep. For this, I use the Intent.ACTION_SEND action and set the package to the one of Google Keep.

Everything works great, but I am wondering if it is possible to add an EXTRA parameter to the Intent telling Google Keep it must be displayed as a list with checkboxes, like it is possible to add extra event-specific extra's when creating a Calendar Event. Now, it is displayed as plain text.

Here is my code:

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");
    }

Now, I get this as result:

enter image description here

What, I want to get is this as result - without that the user has to select "show checkboxes" in the actionbar:

enter image description here

Thanks for your help.


Solution

  • Unfortunately, it's not possible. Google has not published an API for public nor 3rd party use. If you check out the http traffic you can see the underlying API but there's no real way to replicate it. Sorry