Skip to content

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

  1. Remove the nlpushlibrary.aar file from the lib folder.
  2. In the project level build.gradle file, remove the following lines :
        flatDir {
           dirs 'libs'
       }
    
  3. In the app level build.gradle file, remove the nlpushlibrary dependency
    compile(name:'nlpushlibrary', ext:'aar')
    
  4. Remove your custom FirebaseMessagingService implementation by removing the service tag in your AndroidManifest.xml and your custom class associated that extends FirebaseMessagingService.

    <service
        android:name=".MyFirebaseMessagingService"
        android:stopWithTask="false">
        <intent-filter>
            <action android:name="com.google.firebase.MESSAGING_EVENT" />
        </intent-filter>
    </service>
    

  5. 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);
        [...]
    }
}