Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade Helpshift #6

Open
wants to merge 19 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 25 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@


# helpshift-react-native

## Getting started
Expand All @@ -21,7 +22,7 @@
#### Android

1. Open up `android/app/src/main/java/[...]/MainActivity.java`
- Add `import com.reactlibrary.RNHelpshiftPackage;` to the imports at the top of the file
- Add `import com.helpshift.reactlibrary.RNHelpshiftPackage;` to the imports at the top of the file
- Add `new RNHelpshiftPackage()` to the list returned by the `getPackages()` method
2. Append the following lines to `android/settings.gradle`:
```
Expand Down Expand Up @@ -84,6 +85,29 @@ render() {
}
```

### IMPORTANT FOR USING COMPONENT ON ANDROID
You must inherit style from Helpshift Themes to use the `<Helpshift/>` component in your app like so:

```
<application>
<activity
android:theme="@style/HelpshiftTheme.Light.DarkActionBar">
</activity>
</application>
```

The options for default themes are:

- Helpshift.Theme.Light.DarkActionBar
- Helpshift.Theme.Light
- Helpshift.Theme.Dark
- Helpshift.Theme.HighContrast
- Helpshift.Theme.DayNight.DarkActionBar
- Helpshift.Theme.DayNight.Light
- Helpshift.Theme.DayNight.HighContrast

If you would like to customize these themes please refer to Helpshift style guide [here](https://developers.helpshift.com/android/design/#skinning)

## API Usage
#### Initialize
```javascript
Expand Down Expand Up @@ -157,4 +181,3 @@ async _getUnreadMessagesCount(){
this.setState({ unreadMessages: count });
}
```

4 changes: 2 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ buildscript {
apply plugin: 'com.android.library'

android {
compileSdkVersion 28
compileSdkVersion 30
buildToolsVersion "28.0.3"

defaultConfig {
Expand All @@ -36,6 +36,6 @@ dependencies {
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.helpshift:android-helpshift-aar:7.6.2'
implementation 'com.helpshift:android-helpshift-aar:7.9.0'
}

2 changes: 1 addition & 1 deletion android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.reactlibrary">
package="com.helpshift.reactlibrary">

</manifest>

Loading