Android apps
Step-by-step instructions to migrate your Android app to WonderPush
Already have a push provider? Migrating to WonderPush is easy: all you have to do is remove your existing provider, add WonderPush to your app and publish a new version to Google Play.
Users that install this new version can be reached via WonderPush and the others via OneSignal without risking to send duplicate messages.
We've put together specific instructions for OneSignal users, Batch users and Accengage users.
This guide will help you remove your existing push provider from your app and add WonderPush.
Different push providers expect different push notification formats, so importing your Android push tokens into WonderPush is not very useful. Instead, just let users install the new version of your app and automatically migrate to WonderPush.
Shipping WonderPush in a new version of your app
Step 1. Removing your existing provider's gradle entries
Open your app/build.gradle
and remove any line related to your existing provider from the dependencies
section. For example:
dependencies {
implementation 'com.onesignal:OneSignal:[3.9.1, 3.99.99]'
}
Step 2. Remove your existing provider's code from your app
Remove all the code that uses your existing provider's SDK. Your Application
class is usually a good place to start, but you should go over your entire source code and ensure you remove all calls to your existing provider's SDK. Please note that most of the time you can replace such calls with their WonderPush equivalent. See our Android SDK reference.
Also remove any other code that calls the OneSignal
library within your entire app's codebase.
Step 3. Add WonderPush
Follow our Android Quickstart guide to add WonderPush to your app.
That's it!
Once you publish this new version of your app, users will start to show up automatically in your WonderPush dashboard.
Updated over 3 years ago