Commit daed2e6f authored by SergChr's avatar SergChr

Fix IntentClassName; add ability to parse android_actions array

parent 0697e716
...@@ -213,10 +213,12 @@ public class SendNotificationTask extends AsyncTask<Void, Void, Void> { ...@@ -213,10 +213,12 @@ public class SendNotificationTask extends AsyncTask<Void, Void, Void> {
notification.setContentIntent(pendingIntent); notification.setContentIntent(pendingIntent);
if (bundle.containsKey("android_actions")) { if (bundle.containsKey("android_actions")) {
String[] actions = bundle.getString("android_actions").split(","); List<String> actions = bundle.getStringArrayList("android_actions");
for (int a = 0; a < actions.length; a++) { bundle.remove("android_actions");
String actionValue = actions[a].trim(); for (int a = 0; a < actions.size(); a++) {
Intent actionIntent = new Intent(mContext, intentClass); String actionValue = actions.get(a).trim();
Intent actionIntent = new Intent();
actionIntent.setClassName(mContext, intentClassName);
actionIntent.setAction("com.evollu.react.fcm." + actionValue + "_ACTION"); actionIntent.setAction("com.evollu.react.fcm." + actionValue + "_ACTION");
actionIntent.putExtras(bundle); actionIntent.putExtras(bundle);
actionIntent.putExtra("_actionIdentifier", actionValue); actionIntent.putExtra("_actionIdentifier", actionValue);
......
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