Due to operational concerns, Xiaomi Corporation has recently notified users about the discontinuation of the Mi Push service beyond Mainland China. You might have already received correspondence regarding this matter. For more details, refer to Discontinuation of Mi Push Service.
In this regard, we suggest that our customers remove Mi Push SDK from their apps. The steps to do so are enumerated in this article.
Step 1: Remove Mi aar
- Navigate to app --> libs
- Delete MiPush_SDK_Client*.aar
Step 2: Remove the Mi receiver from the manifest file
Remove the following code from the manifest file.
<receiver
android:name="com.moengage.push.amp.plus.MiPushReceiver"
android:exported="true">
<intent-filter>
<action android:name="com.xiaomi.mipush.RECEIVE_MESSAGE" />
</intent-filter>
<intent-filter>
<action android:name="com.xiaomi.mipush.MESSAGE_ARRIVED" />
</intent-filter>
<intent-filter>
<action android:name="com.xiaomi.mipush.ERROR" />
</intent-filter>
</receiver>
Step 3: Remove initialization code
Remove the following initialization code from the application.
MiPushHelper.initialiseMiPush([context], [appKey], [appId], [region])
Step 4: Delete the helper files
Delete the following helper files:
- MiPushHelper.kt
- MiPushReceiver.kt
Step 5: Remove MoEngage dependency
Remove the MoEngage dependency from the dependencies block of the build.gradle as described:
- MoEngage Catalog - If you are using the MoEngage catalog remove the following dependency:
implementation(moengage.pushAmpPlus)
- Artifact ID - If you have added the artifact id remove the following dependency:
implementation("com.moengage:push-amp:")