我在覆盖Appboy deeplink中的On Click Behavior时遇到了问题
请查找以下数据
1-在BaseActivity中注册Appboy,这是所有应用程序活动的父活动
@Override
protected void onResume() {
AppboyInAppMessageManager.getInstance().registerInAppMessageManager(this);
Appboy.getInstance(this).requestInAppMessageRefresh();
}
@Override
protected void onPause() {
AppboyInAppMessageManager.getInstance().unregisterInAppMessageManager(this);
}
Run Code Online (Sandbox Code Playgroud)
2-如下所示,在Manifest File中添加接收器
<receiver android:name="com.forsale.forsale.appboy.AppboyGcmReceiver"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="com.forsale.forsale" />
</intent-filter>
</receiver>
<receiver
android:name="com.forsale.forsale.appboy.AppBoyOpenReceiver"
android:exported="false" >
<intent-filter>
<action android:name="com.forsale.forsale.intent.APPBOY_PUSH_RECEIVED" />
<action android:name="com.forsale.forsale.intent.APPBOY_NOTIFICATION_OPENED" />
</intent-filter>
</receiver>
Run Code Online (Sandbox Code Playgroud)
知道我可以使用应用程序男孩仪表板发送应用程序消息,并收到消息,但当我点击消息时它打开appboy web活动与链接
我需要覆盖此行为,以便能够获取我在In app消息中发送的链接并从中解析一些参数并将其用于我的app中的活动
我尝试了以下内容
请注意,应用程序在尝试注册appboy并打印日志时会调用onReceive方法(action = REGISTRATION,RegId ="..."),但它从不执行任何其他操作,如RECEIVE或OPEN
public void onReceive(Context context, Intent intent) {
AppboyLogger.i("AMIRA", String.format("Amira %s", intent.toString()));
String action = …Run Code Online (Sandbox Code Playgroud)