# Huawei Push

Require at least React-Native Batch Plugin v6.0.

*This guide assumes that you have already* [*integrated the Batch SDK into your app*](/developer/sdk/react-native/sdk-integration.md) *as Batch's HMS plug-in isn't standalone.*

{% hint style="info" %}
Expo isn't supported. Please use standard React Native, or eject to the bare workflow.
{% endhint %}

As Batch's HMS plug-in works automatically without having to call any native code yourself, there is no Batch react-native plugin to install. Installing the dependencies is beginner-friendly, but some knowledge of Android's toolchain (especially Gradle) is helpful.

However, you will need to:

* Setup the react-native HMS push plugin
* Add Batch's HMS native dependency

### Integration

#### Setup React Native Huawei Plugin

First, setup the HMS's react-native push plugin by following [Integrating React Native Push Plugin](https://developer.huawei.com/consumer/en/doc/HMS-Plugin-Guides-V1/integraternmodule-0000001050157791-V1).

{% hint style="warning" %}
If you have already set it up, please check you have at least the version `5.0.1.300` and that you are not using `@hmscore/react-native-hwpush`. Otherwise, please migrate to `@hmscore/react-native-hms-push`.
{% endhint %}

Then, to be fully working with the Batch's plugin, you need to remove the `HmsPushMessageService` from your android manifest :

```xml
<!-- Add this line to add the tools namespace -->
<manifest [...]
          xmlns:tools="http://schemas.android.com/tools">
    [...]
    <application>
        [...]
        <!-- Add this line to remove the default HmsPushMessageService -->
        <service
            android:name="com.huawei.hms.rn.push.remote.HmsPushMessageService"
            tools:node="remove" />
    </application>
</manifest>

```

#### Setup Batch's HMS Plugin

* Now, you can add the Batch's HMS plugin native dependency in `android/app/build.gradle`.

```groovy
implementation 'com.batch.android:hms-plugin:1.1.0'
```

*And that's it, congratulations on finishing the bulk of the integration!*

If you have any difficulties or need more information, please visit the [native documentation](/developer/sdk/android/huawei.md).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.batch.com/developer/sdk/react-native/sdk-integration/huawei.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
