Skip to content

Commit

Permalink
Merge pull request #835 from SergChr/fixes-#1
Browse files Browse the repository at this point in the history
Android actions fixes #1
  • Loading branch information
Libin Lu authored Mar 6, 2018
2 parents 234faf4 + daed2e6 commit aaf3c5e
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,12 @@ protected Void doInBackground(Void... params) {
notification.setContentIntent(pendingIntent);

if (bundle.containsKey("android_actions")) {
String[] actions = bundle.getString("android_actions").split(",");
for (int a = 0; a < actions.length; a++) {
String actionValue = actions[a].trim();
Intent actionIntent = new Intent(mContext, intentClass);
List<String> actions = bundle.getStringArrayList("android_actions");
bundle.remove("android_actions");
for (int a = 0; a < actions.size(); a++) {
String actionValue = actions.get(a).trim();
Intent actionIntent = new Intent();
actionIntent.setClassName(mContext, intentClassName);
actionIntent.setAction("com.evollu.react.fcm." + actionValue + "_ACTION");
actionIntent.putExtras(bundle);
actionIntent.putExtra("_actionIdentifier", actionValue);
Expand Down

0 comments on commit aaf3c5e

Please sign in to comment.