File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed
Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change 1+ ## 複数のブロードキャストレシーバへのサポート
2+
3+ 複数のSDKでアプリの` INSTALL_REFERRER ` インテントにブロードキャストレシーバを登録する必要がある場合、
4+ サポートしたい他のすべてのレシーバをコールする` BroadcastReceiver ` を独自に実装する必要があります。
5+ それはこのような形になります。[ 1]
6+
7+ ``` java
8+ public class InstallReceiver extends BroadcastReceiver {
9+ @Override
10+ public void onReceive (Context context , Intent intent ) {
11+ // Adjust
12+ new AdjustReferrerReceiver (). onReceive(context, intent);
13+
14+ // Google Analytics
15+ new CampaignTrackingReceiver (). onReceive(context, intent);
16+ }
17+ }
18+ ```
19+
20+ 対象レシーバのリストの調整とインポートの記述を必ず確認してください。
21+ 独自` InstallReceiver ` を使うには、` AndroidManifest.xml ` の更新も必要です。
22+
23+ ``` xml
24+ <receiver
25+ android : name =" com.your.app.InstallReceiver"
26+ android : exported =" true" >
27+ <intent-filter >
28+ <action android : name =" com.android.vending.INSTALL_REFERRER" />
29+ </intent-filter >
30+ </receiver >
31+ ```
32+
33+ パッケージ名を必ず確認してください。
34+
35+ ---
36+
37+ 参考および関連リンク
38+
39+ - [ 1] http://stackoverflow.com/questions/14158841/android-google-analytics-v2-broadcast-receiver-for-all-sdks
40+ - [ 2] http://stackoverflow.com/questions/4093150/get-referrer-after-installing-app-from-android-market
41+ - [ 3] http://docs.mdotm.com/index.php/Universal_Application_Tracking
You can’t perform that action at this time.
0 commit comments