A package that will help people to use HelpScout in React Native projects
npm install rn-help-scout
or
yarn add rn-help-scout
In your project folder, go to android/gradle.properties
, and add:
...
# gradle.properties
org.gradle.daemon=true
org.gradle.jvmargs=-Xmx2560m
After, go to android/app/src/main/AndroidManifest.xml
, and add in <application>
tag:
...
android:theme="@style/AppTheme"
tools:replace="android:supportsRtl"
android:supportsRtl="false">
import React from "react";
import { View, TouchableOpacity, Text } from "react-native";
import Beacon from "rn-help-scout";
export function Faq(){
function handleOpenBeacon(){
Beacon.init("BeaconID");
Beacon.open();
}
return(
<View>
<TouchableOpacity onPress={handleOpenBeacon}>
<Text>Open Beacon</Text>
</TouchableOpacity>
</View>
);
}
init(beaconID)
: Initialize Beacon with your beacon id;
identify({ name: "John Doe", email: "[email protected]" })
:Identify user to Help Scout chat (optional);
open()
: Open beacon in your app;
contactForm()
: Open beacon in Help Scout chat form;
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT