Skip to content

Android integration - #7

Merged
browniefed merged 9 commits into
tinycreative:masterfrom
atticoos:android-integration
Apr 14, 2016
Merged

Android integration#7
browniefed merged 9 commits into
tinycreative:masterfrom
atticoos:android-integration

Conversation

@atticoos

Copy link
Copy Markdown
Contributor

This is the initial work for the Android support mentioned in #4

It supports:

  • registerIdentifiedUser
  • registerUnidentifiedUser
  • reset
  • updateUser
  • logEvent

@atticoos atticoos mentioned this pull request Feb 21, 2016
@ncnlinh

ncnlinh commented Mar 10, 2016

Copy link
Copy Markdown

@asamiller Hope this can be merged in soon. 💃

@zibs

zibs commented Mar 22, 2016

Copy link
Copy Markdown
Contributor

@ajwhite any tips on how to integrate this without the PR being merged yet? appreciate the work!

@atticoos

Copy link
Copy Markdown
Contributor Author

Sure, you can just npm install my branch in the meantime

npm install git://github.com/ajwhite/react-native-intercom.git#android-integration --save

@zibs

zibs commented Mar 22, 2016

Copy link
Copy Markdown
Contributor

Thanks! Any tips on how to proceed after that heh? I've tried the rnpm linking techniques etc, and following some of the actual intercom steps, but it's not quite panning out. Admittedly I'm not very familiar with Android. Do you have a recommended way for setting this up?

@atticoos

Copy link
Copy Markdown
Contributor Author

npm link has some known issues if that's what you are referring to.

A few steps you'll want to take for the Android configuraiton:

settings.gradle

Add

include ':react-native-intercom';
project(':react-native-intercom').projectDir = new File(settingsDir, '../node_modules/react-native-intercom/android')
app/build.gradle

Add

compile project(':react-native-intercom')
MainActivity.java

Add

// add import
import com.robinpowered.react.Intercom.IntercomPackage;
import io.intercom.android.sdk.Intercom

// add initialization to onCreate
Intercom.initialize(getApplication(), 'INTERCOM KEY', 'INTERCOM PROJECT');

// add to the `ReactInstacneManager.builder()`
.addPackage(new IntercomPackage())

@zibs

zibs commented Mar 23, 2016

Copy link
Copy Markdown
Contributor

heroic! thank you very, very much ⚡ -- displayMessageComposer is currently not working, correct?

@atticoos

Copy link
Copy Markdown
Contributor Author

I don't believe so - if it's not part of this PR, then nope! I haven't had a need for it, so this onky really includes the reporting pieces.

@zibs

zibs commented Apr 5, 2016

Copy link
Copy Markdown
Contributor

Turns out that it already works! One more request, how about configuring the setSecureMode for android? I'll try to get at it, if I can figure it out.
:D
https://docs.intercom.io/configuring-for-your-product-or-site/enabling-secure-mode-on-intercom-for-android

@browniefed

Copy link
Copy Markdown
Contributor

Oh wow this is awesome, thank you.

@browniefed
browniefed merged commit e1435dd into tinycreative:master Apr 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants