Commit 16b595b0 authored by Libin Lu's avatar Libin Lu Committed by GitHub

set action for notification intent

parent 4709a258
...@@ -154,6 +154,7 @@ public class FIRLocalMessagingHelper { ...@@ -154,6 +154,7 @@ public class FIRLocalMessagingHelper {
intent.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP); intent.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
intent.putExtra("notification", bundle); intent.putExtra("notification", bundle);
intent.putExtra("localNotification", true); intent.putExtra("localNotification", true);
intent.setAction(bundle.getString("click_action"));
int notificationID = bundle.containsKey("id") ? bundle.getString("id", "").hashCode() : (int) System.currentTimeMillis(); int notificationID = bundle.containsKey("id") ? bundle.getString("id", "").hashCode() : (int) System.currentTimeMillis();
PendingIntent pendingIntent = PendingIntent.getActivity(mContext, notificationID, intent, PendingIntent pendingIntent = PendingIntent.getActivity(mContext, notificationID, intent,
...@@ -290,4 +291,4 @@ public class FIRLocalMessagingHelper { ...@@ -290,4 +291,4 @@ public class FIRLocalMessagingHelper {
} }
return array; return array;
} }
} }
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment