{"action":"closed","issue":{"url":"https://api.github.com/repos/ionic-team/ionic-native/issues/1959","repository_url":"https://api.github.com/repos/ionic-team/ionic-native","labels_url":"https://api.github.com/repos/ionic-team/ionic-native/issues/1959/labels{/name}","comments_url":"https://api.github.com/repos/ionic-team/ionic-native/issues/1959/comments","events_url":"https://api.github.com/repos/ionic-team/ionic-native/issues/1959/events","html_url":"https://github.com/ionic-team/ionic-native/issues/1959","id":256959537,"number":1959,"title":"Web intent: passing extras","user":{"login":"danilopolani","id":6277291,"avatar_url":"https://avatars0.githubusercontent.com/u/6277291?v=4","gravatar_id":"","url":"https://api.github.com/users/danilopolani","html_url":"https://github.com/danilopolani","followers_url":"https://api.github.com/users/danilopolani/followers","following_url":"https://api.github.com/users/danilopolani/following{/other_user}","gists_url":"https://api.github.com/users/danilopolani/gists{/gist_id}","starred_url":"https://api.github.com/users/danilopolani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danilopolani/subscriptions","organizations_url":"https://api.github.com/users/danilopolani/orgs","repos_url":"https://api.github.com/users/danilopolani/repos","events_url":"https://api.github.com/users/danilopolani/events{/privacy}","received_events_url":"https://api.github.com/users/danilopolani/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-09-12T08:28:29Z","updated_at":"2018-03-17T10:08:26Z","closed_at":"2018-03-17T10:08:26Z","author_association":"NONE","body":"**I'm submitting a ...**\r\n[x] bug report\r\n[ ] feature request\r\n\r\n**Current behavior:**\r\nThe `Web Intent` package doesn't allow extras.\r\n\r\n**Expected behavior:**\r\nPassing extra parameters to `startActivity` method.\r\n\r\n**Other information:**\r\n\r\nMy goal is to create a \"native share\", like the example from the [Android documentation](https://developer.android.com/training/sharing/send.html):\r\n\r\n```java\r\nIntent sendIntent = new Intent();\r\nsendIntent.setAction(Intent.ACTION_SEND);\r\nsendIntent.putExtra(Intent.EXTRA_TEXT, \"This is my text to send.\");\r\nsendIntent.setType(\"text/plain\");\r\nstartActivity(sendIntent);\r\n```\r\n\r\nAs we can see, there's an action, an extra (_EXTRA_TEXT_) and a _type_. This can be achieved from the [cordova plugin](https://github.com/darryncampbell/darryncampbell-cordova-plugin-intent) with something like this (from the README of the repo): \r\n\r\n```js\r\nwindow.plugins.intentShim.startActivity({\r\n    action: 'android.intent.action.SEND',\r\n    extras: {\r\n        'android.intent.extra.TEXT': 'My text here'\r\n    }\r\n});\r\n```\r\n\r\nNow, looking at the declaration of the `startActivity` method from **ionic native** package we can see that the url is __required__ (why?) and there's no way to define extras.\r\n\r\n```js\r\nstartActivity(options: {\r\n        action: any;\r\n        url: string;\r\n        type?: string;\r\n    })\r\n```\r\n\r\nThe only method which has an `extras` field is `sendBroadcast`, but I think it's a little weird:\r\n\r\n```js\r\nsendBroadcast(options: {\r\n    action: string;\r\n    extras?: {\r\n       option: boolean;\r\n    };\r\n})\r\n```\r\n\r\n`option: boolean`? What? And all the \"convenience constants\" like `ACTION_SEND`  and  `EXTRA_TEXT` are declareted but not filled (but maybe they are somewhere else).\r\n\r\nI know it's marked as \"Beta\", but I think it hasn't the basic functionalities. Should I use the cordova plugin \"without\" the ionic native part?"}}
{"actor":{"display_login":"danielsogl"}}