Migration guide from 0.1 to 1.1¶
This guide will help you migrate from the 0.1 version to the 1.1.
Requirements¶
Android minimum version¶
Numberly 1.1 requires minimum sdk version 16 or higher.
Gradle distribution version¶
Numberly 1.1 requires gradle distribution 6.5 or higher.
Setup Instructions¶
Starting from this 1.1, the Android SDK is distributed using jCenter.
1. Remove previous integration¶
- Remove the
nlpushlibrary.aar
file from the lib folder. - In the project level
build.gradle
file, remove the following lines :flatDir { dirs 'libs' }
- In the app level
build.gradle
file, remove thenlpushlibrary
dependencycompile(name:'nlpushlibrary', ext:'aar')
-
Remove your custom
FirebaseMessagingService
implementation by removing theservice
tag in yourAndroidManifest.xml
and your custom class associated that extendsFirebaseMessagingService
.<service android:name=".MyFirebaseMessagingService" android:stopWithTask="false"> <intent-filter> <action android:name="com.google.firebase.MESSAGING_EVENT" /> </intent-filter> </service>
-
Finally in your custom Application class, remove the small icon resource initialization
Numberly.setSmallIconResourceId(R.mipmap.ic_launcher)
Numberly.setSmallIconResourceId(R.mipmap.ic_launcher);
Great! Let's install the 1.1 version.
2. Install the new version¶
The 1.x version can be installed using gradle or manually. Please follow the installation guide before continuing the migration.
3. Add the configuration file¶
Add the numberly.properties
as explained here.
Important
You should set both automatic_integration
and automatic_notification_registration
properties to false
.
4. Start the SDK¶
As from the 1.x version, Numberly SDK must be started in the Application class's onCreate
method:
import android.app.Application
import com.numberly.Numberly
class MyApplication : Application() {
override fun onCreate() {
super.onCreate()
Numberly.init(this)
[...]
}
}
import android.app.Application
import com.numberly.Numberly
class MyApplication extends Application {
@override
void onCreate() {
super.onCreate();
Numberly.init(this);
[...]
}
}