package com.growthbeat.link.handler;

import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;

import android.content.Context;
import android.content.Intent;

import com.growthbeat.link.GrowthLink;

public class DefaultInstallReferrerReceiveHandler implements InstallReferrerReceiveHandler {

	@Override
	public void onReceive(Context context, Intent intent) {

		String referrer = intent.getStringExtra("referrer");
		if (referrer != null) {
			String decoded = "";
			try {
				decoded = URLDecoder.decode(referrer, "utf-8");
			} catch (UnsupportedEncodingException e) {
				e.printStackTrace();
			}
			if (decoded.length() > 0) {
				GrowthLink.getInstance().setInstallReferrer(decoded);
			}
		}

	}

}

package com.growthbeat.link.handler;

import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;

import android.content.Context;
import android.content.Intent;

import com.growthbeat.link.GrowthLink;

public class DefaultInstallReferrerReceiveHandler implements InstallReferrerReceiveHandler {

	@Override
	public void onReceive(Context context, Intent intent) {

		String encodedInstallReferrer = intent.getStringExtra("referrer");
		String installReferrer = null;

		if (encodedInstallReferrer != null) {
			try {
				installReferrer = URLDecoder.decode(encodedInstallReferrer, "utf-8");
			} catch (UnsupportedEncodingException e) {
				GrowthLink.getInstance().getLogger().error("Failed to decode install referrer: " + e.getMessage());
			}
		}

		GrowthLink.getInstance().setInstallReferrer(installReferrer);

	}

}

Set null instead of empty string when install referrer is blank
Set null instead of empty string when install referrer is blank
