aemr3 / nativescript-intercom-bridge

NativeScript Plugin for Intercom
Other
3 stars 17 forks source link

Integration with Nativescript Angular #8

Open uttahb opened 5 years ago

uttahb commented 5 years ago

I was trying to integrate the plugin with nativescript 5.0 and angular. Is this possible now?

rafaelcmrj commented 5 years ago

Why not?

import { IntercomBridge } from "nativescript-intercom-bridge"; IntercomBridge.init(apiKey, appID);

bbroereES commented 5 years ago

Maybe a little late, but yes, this plugin works on Nativescript Angular. For android one needs to add the following to app.gradle in the dependencies:

implementation 'io.intercom.android:intercom-sdk-base:5.+'
compile 'com.android.support:multidex:1.0.0'
robertototti commented 5 years ago

Can you show example how to use IntercomBridge with NativeScript Angular?

bbroereES commented 5 years ago

You can use IntercomBridge for the nativescript part and ng-intercom for the angular part. The documentation on the angular part is very self-explanatory, for nativescript, set up a service.tns.ts file and use import { IntercomBridge } from 'nativescript-intercom-bridge';