Permission Error Opening Gmail Compose with Lampaa com.lampaa.startapp Plugin


I am trying to get the startApp plugin to work properly, but am having trouble. I can get it to open up gmail from inside my app with:

let sApp = startApp.set({
      "action": "ACTION_VIEW",

However, what I’m really trying to do is get it to open up the compose view in gmail and also pass gmail the address I’m hoping to send to. This is my first time working with android intents and I’m not quite sure of a couple things:

The com.lampaa.startapp README says I can use this format to open a specific activity within the target package:

var sApp = startApp.set({ /* params */
	"component": ["",""]
}, { /* extras */

I found a few other sites that lay out how I might do this if I were developing natively with java:

Intent sendIntent = new Intent(Intent.ACTION_VIEW);
sendIntent.setClassName("", "");
sendIntent.putExtra(Intent.EXTRA_EMAIL, new String[] { "" });
sendIntent.putExtra(Intent.EXTRA_SUBJECT, "test");
sendIntent.putExtra(Intent.EXTRA_TEXT, "hello. this is a message sent from my demo app :-)");

However, when I translate what I’m seeing up in that codeblock to what the startapp documentation asks for, I get an error.

let sApp = startApp.set({
      "action": "ACTION_VIEW",
      "component": ['', ''],
      "package": '',
      "type": "plain/text",
    }, {
      EXTRA_EMAIL: [''],
      EXTRA_SUBJECT: 'Your tea is ready',
      EXTRA_TEXT: "earl grey, hot."
I/startApp: android.intent.extra.EMAIL
E/startApp: android.intent.extra.EMAIL
I/startApp: android.intent.extra.SUBJECT
E/startApp: android.intent.extra.SUBJECT
I/startApp: android.intent.extra.TEXT
E/startApp: android.intent.extra.TEXT
E/PluginManager: Uncaught exception from plugin
                 java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] typ=plain/text flg=0x10000000 (has extras) } from ProcessRecord{e9404d6 30081:org.gds.hop/u0a180} (pid=30081, uid=10180) not exported from uid 10091
                     at android.os.Parcel.readException(
                     at android.os.Parcel.readException(
                     at org.apache.cordova.CordovaActivity.startActivityForResult(
                     at com.lampa.startapp.startApp.start(
                     at com.lampa.startapp.startApp.execute(
                     at org.apache.cordova.CordovaPlugin.execute(
                     at org.apache.cordova.PluginManager.exec(
                     at org.apache.cordova.CordovaBridge.jsExec(
                     at org.apache.cordova.engine.SystemExposedJsApi.exec(
                     at org.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(Native Method)
                     at org.chromium.base.SystemMessageHandler.handleMessage(
                     at android.os.Handler.dispatchMessage(
                     at android.os.Looper.loop(
  1. Does the permission mean I have to whitelist something in config.xml? If so – what do I need to whitelist?
  2. What am I doing wrong?