@@ -104,7 +104,7 @@ public void onCancel(DialogInterface dialog) {
104
104
@ Override
105
105
public void onClick (DialogInterface dialog , int which ) {
106
106
//record server side that the message was received
107
- CountlyMessaging .recordMessageAction (msg .getId (), 0 );
107
+ CountlyMessaging .recordMessageAction (ProxyActivity . this , msg .getId (), 0 );
108
108
finish ();
109
109
Intent activityIntent = msg .getIntent (ProxyActivity .this , CountlyMessaging .getActivityClass (ProxyActivity .this ));
110
110
addExtrasToIntent (activityIntent , addMetadata , 1 , msg .getLink (), msg .getTitle (), msg .getMessage ());
@@ -124,7 +124,7 @@ public void onClick(DialogInterface dialog, int which) {
124
124
addButtons (builder , msg , addMetadata );
125
125
} else {
126
126
//record server side that the message was received
127
- CountlyMessaging .recordMessageAction (msg .getId ());
127
+ CountlyMessaging .recordMessageAction (ProxyActivity . this , msg .getId ());
128
128
}
129
129
builder .setMessage (msg .getNotificationMessage ());
130
130
builder .setCancelable (true );
@@ -154,7 +154,7 @@ public void onCancel(DialogInterface dialog) {
154
154
155
155
//first one did not work, try another
156
156
if (extras .containsKey (CountlyMessaging .EXTRA_ACTION_INDEX )) {
157
- CountlyMessaging .recordMessageAction (msg .getId (), extras .getInt (CountlyMessaging .EXTRA_ACTION_INDEX ));
157
+ CountlyMessaging .recordMessageAction (ProxyActivity . this , msg .getId (), extras .getInt (CountlyMessaging .EXTRA_ACTION_INDEX ));
158
158
for (Message .Button button : msg .getButtons ()) {
159
159
if (button .index == extras .getInt (CountlyMessaging .EXTRA_ACTION_INDEX )) {
160
160
Intent targetIntent = new Intent (Intent .ACTION_VIEW , Uri .parse (button .link ));
@@ -166,7 +166,7 @@ public void onCancel(DialogInterface dialog) {
166
166
}
167
167
}
168
168
} else {
169
- CountlyMessaging .recordMessageAction (msg .getId (), 0 );
169
+ CountlyMessaging .recordMessageAction (ProxyActivity . this , msg .getId (), 0 );
170
170
if (msg .hasLink ()) {
171
171
Intent targetIntent = new Intent (Intent .ACTION_VIEW , Uri .parse (msg .getLink ()));
172
172
addExtrasToIntent (targetIntent , addMetadata , 0 , msg .getLink (), msg .getTitle (), msg .getMessage ());
@@ -188,7 +188,7 @@ private void addButtons(final AlertDialog.Builder builder, final Message msg, fi
188
188
DialogInterface .OnClickListener listener = new DialogInterface .OnClickListener () {
189
189
@ Override
190
190
public void onClick (DialogInterface dialog , int which ) {
191
- CountlyMessaging .recordMessageAction (msg .getId (), which == DialogInterface .BUTTON_POSITIVE ? 1 : 2 );
191
+ CountlyMessaging .recordMessageAction (ProxyActivity . this , msg .getId (), which == DialogInterface .BUTTON_POSITIVE ? 1 : 2 );
192
192
//todo add extra's here
193
193
//
194
194
String buttonLink = msg .getButtons ().get (which == DialogInterface .BUTTON_POSITIVE ? 0 : 1 ).link ;
0 commit comments