Register Application class in Manifest?

Solution 1:

If it derives from Application, add the fully qualified (namespace + class name) as the android:name parameter of the application element in your manifest.

<application
        android:name="com.you.yourapp.ApplicationEx"

Or if the class' package can be described as relative to the package in the manifest tag, then just start with a .:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
          package="com.you.yourapp">

    <application
        android:name=".ApplicationEx"

Solution 2:

but in case you are already using some library like branch.io's library then most probably your manifest

<application name="">

property will already have some name like

`<application name="io.referral.BranchApp">

in that case you need to first extend your application class, like below:

public class Application extends BranchApp

and then register your application in manifest as:

android:name="absdevelopers.com.brankreferal.Application"

this works perfectly for me :) i hope it helps someone in trouble :)