Skip to content

Commit

Permalink
Merge pull request #76 from BranchMetrics/fix/pr-74-outstanding-issues
Browse files Browse the repository at this point in the history
Fix/pr 74 outstanding issues
  • Loading branch information
aaustin committed Mar 27, 2016
2 parents 7ea01ee + 7e8e352 commit 6fe171a
Show file tree
Hide file tree
Showing 4 changed files with 301 additions and 141 deletions.
56 changes: 36 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,11 @@ There's a full demo app embedded in this repository. It should serve as an examp
## Installation

**The compiled iOS SDK footprint is 180kb**

**The compiled Android SDK footprint is 187kb**

**Latest libraries for [Android](http://developer.android.com/sdk/index.html) and/or iOS SDKs must be installed.**

### Command line install

**Install parameters:**
Expand Down Expand Up @@ -137,6 +140,8 @@ Branch.getFirstReferringParams().then(function (res) {
+ [loadRewards](#loadRewards)
+ [redeemRewards](#redeemRewards)
+ [creditHistory](#creditHistory)
4. FAQ
+ [Android Build FAQ](#android-build-faq)


### <a id="setDebug"></a>setDebug(isEnable)
Expand Down Expand Up @@ -419,6 +424,8 @@ branchUniversalObj.showShareSheet({

##### Share Sheet Callbacks (Android ONLY)

**NOTE: Share sheet callbacks must be declared first before executing `showShareSheet` or else it won't be able to catch the `event's first trigger`.**

To implement the callback, you must add listeners to the following events:

###### onShareSheetLaunched
Expand All @@ -431,35 +438,34 @@ branchUniversalObj.onShareSheetLaunched(function () {
});
```

###### onShareSheetDismissed
###### onShareSheetDismissed

The event fires when the share sheet is dismissed.
The event fires when the share sheet is dismissed.

```js
branchUniversalObj.onShareSheetDismissed(function () {
console.log('Share sheet dimissed');
});
```
```js
branchUniversalObj.onShareSheetDismissed(function () {
console.log('Share sheet dimissed');
});
```

###### onLinkShareResponse
###### onLinkShareResponse

The event returns a dictionary of the response data.
The event returns a dictionary of the response data.

```js
branchUniversalObj.onLinkShareResponse(function (res) {
console.log('Share link response: ' + JSON.stringify(res));
});
```
```js
branchUniversalObj.onLinkShareResponse(function (res) {
console.log('Share link response: ' + JSON.stringify(res));
});
```

###### onChannelSelected
###### onChannelSelected

The event fires when a channel is selected.
The event fires when a channel is selected.

```js
branchUniversalObj.onChannelSelected(function (res) {
console.log('Channel selected: ' + JSON.stringify(res));
```js
branchUniversalObj.onChannelSelected(function (res) {
console.log('Channel selected: ' + JSON.stringify(res));
});
```

**Note:** Callbacks in iOS are ignored. There is no need to implement them as the events are handled by `UIActivityViewController`.

Expand Down Expand Up @@ -540,6 +546,16 @@ The response will return an array that has been parsed from the following JSON:
```js
## <a id="android-build-faq"></a>Android Build FAQ
1. Gradle build cannot find `io.branch.sdk.android:library:1.+` dependency:
Go to your `build.gradle` file and find **dependencies** and add the following inside:
```
compile "io.branch.sdk.android:library:1.+"
```
## Bugs / Help / Support
Feel free to report any bugs you might encounter in the repo's issues. Any support inquiries outside of bugs
Expand Down
Loading

0 comments on commit 6fe171a

Please sign in to comment.