扩展broadcastReceiver并跟踪Google Analytics INSTALL_REFERRER

Sig*_*ers 5 android google-analytics broadcastreceiver

我在引用android的INSTALL_REFERRER时覆盖了android BroadcastReceiver类的问题.

我没有直接从我的android manifest.xml调用谷歌分析接收器,而是调用自定义广播接收器,然后将其传递给Google Analytics.我需要知道我的推介在Google Analytics中的来源,并将广播接收器发送给第三方,从而为我的应用带来流量.

下面是我的广播接收器和android清单文件中的一些示例代码.

package com.sigmyers.broadcastExample;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import com.google.android.apps.analytics.AnalyticsReceiver;
import com.mdotm.MdotmReceiver;

public class TestReceiver extends BroadcastReceiver
{

    @Override
    public void onReceive(Context context, Intent intent)
    {
        AnalyticsReceiver googleAnalyticsReceiver = new AnalyticsReceiver();
        googleAnalyticsReceiver.onReceive(context, intent);

        MdotmReceiver mdotmReceiver = new MdotmReceiver();
        mdotmReceiver.onReceive(context, intent);
    }
}
Run Code Online (Sandbox Code Playgroud)

我的Android Manifest xml文件如下:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.sigmyers.broadcastExample"
      android:versionCode="10"
      android:versionName="1.9">
    <uses-sdk android:minSdkVersion="4"/>
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
    <application android:label="@string/app_name" android:icon="@drawable/icon">
        <activity android:name="MyActivity"
                  android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <receiver android:name="com.sigmyers.broadcastExample.TestReceiver" android:exported="true">
          <intent-filter>
            <action android:name="com.android.vending.INSTALL_REFERRER" />
          </intent-filter>
        </receiver>
    </application>
</manifest> 
Run Code Online (Sandbox Code Playgroud)

奇怪的是,是的MdotM报告请示就好了时产生的URL与形式通过以下网址的底部:http://code.google.com/mobile/analytics/docs/android/#referrals

但是,GoogleAnalytics中没有任何内容(除了跟踪应用程序中其他位置的数据,但不会跟踪install_referrer).有什么我想念或忘记做的事吗?

当从Android应用程序商店下载后调试我的应用程序,我总是看到谷歌Analytics(分析)抛出某种类型的错误,使其不火,但我觉得调用的onReceive方法,通过谷歌/广告暴民所描述的,是所有这是正确传递Install referrer所必需的.

Stack Overflow上有任何线索吗?