Skip to content

Commit

Permalink
fix(BranchSDK.java): Remove the hard coded strings
Browse files Browse the repository at this point in the history
Change the hard coded strings to an object of strings

showShareSheet is no more accepting a string as third argument it requires now a JSON object
  • Loading branch information
odaumas committed Sep 6, 2016
1 parent b97cf1f commit aa2dfcc
Show file tree
Hide file tree
Showing 5 changed files with 144 additions and 155 deletions.
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,10 @@ testbed/plugins
testbed/hooks
node_modules
testbed/ul_web_hooks/
.installed
.installed
.gradle/
.idea/
cordova-ionic-phonegap-branch-deep-linking.iml
local.properties
out/
src/cordova-ionic-phonegap-branch-deep-linking.iml
19 changes: 17 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,15 @@ The Branch iOS SDK includes a wrapper on the UIActivityViewController that will
| $blackberry_url | `string` | Change the redirect endpoint for Blackberry OS
| $windows_phone_url | `string` | Change the redirect endpoint for Windows OS

**shareText**: `string` - Custom share text
**localization**: `object` - Custom text to share
| KEY | TYPE | MEANING
| ------------------ | -------- | --------------------
| shareText | `string` | Content of the message by default: 'This stuff is awesome:'
| shareTitle | `string` | Title of the message by default: 'Check this out!'
| copyToClipboard | `string` | Copy to clipboard action button label by default: 'Copy'
| clipboardSuccess | `string` | Success message on copy to clipboard by default: 'Added to clipboard'
| more | `string` | More button by default: 'Show More'
| shareWith | `string` | Title of the sharing popup by default: 'Share With'

##### Usage
```js
Expand All @@ -464,7 +472,14 @@ branchUniversalObj.showShareSheet({
}, {
// put your control parameters here
"$desktop_url" : "http://desktop-url.com",
}, 'Custom share text: ');
}, {
"shareText": "This stuff is awesome: ",
"shareTitle": "Check this out!",
"copyToClipboard": "Copy",
"clipboardSuccess": "Added to clipboard",
"more": "Show More",
"shareWith": "Share With"
});
```

##### Share Sheet Callbacks
Expand Down
12 changes: 5 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "branch-cordova-sdk",
"description": "Branch Metrics Cordova SDK",
"main": "www/branch.js",
"version": "0.0.0-semantic-release",
"version": "2.1.16-cmt",
"homepage": "https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking",
"repository": {
"type": "git",
Expand All @@ -11,6 +11,9 @@
"bugs": {
"url": "https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/issues"
},
"publishConfig": {
"registry": "http://man-macmini.nce.amadeus.net:4873/"
},
"keywords": [
"ecosystem:cordova",
"ecosystem:phonegap",
Expand All @@ -32,8 +35,7 @@
"license": "MIT",
"scripts": {
"prerelease": "gulp prerelease",
"commit": "git-cz",
"semantic-release": "semantic-release pre && npm publish && semantic-release post"
"commit": "git-cz"
},
"dependencies": {
"mkpath": "^1.0.0",
Expand All @@ -53,10 +55,6 @@
"gulp-eslint": "^3.0.1",
"gulp-jscs": "^4.0.0",
"gulp-sourcemaps": "^1.6.0",
"mkpath": "^1.0.0",
"node-version-compare": "^1.0.1",
"plist": "^1.2.0",
"semantic-release": "^4.3.5",
"wd": "^0.4.0"
},
"config": {
Expand Down
2 changes: 1 addition & 1 deletion plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ SOFTWARE.
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
id="io.branch.sdk"
version="2.1.16">
version="2.1.16-cmt">

<name>branch-cordova-sdk</name>
<description>Branch SDK Plugin</description>
Expand Down
Loading

0 comments on commit aa2dfcc

Please sign in to comment.