Skip to content

Commit

Permalink
Fix NullException
Browse files Browse the repository at this point in the history
1, Check if 'actions' exists before 'getParcelableArrayList("actions")';
2, Fix miss Script in Test Scene
  • Loading branch information
aidoTank committed Jan 2, 2019
1 parent ba359bd commit d873f29
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 1 deletion.
Binary file modified PluginSrc/app/release/notification.jar
Binary file not shown.
Expand Up @@ -22,6 +22,7 @@
import android.provider.MediaStore;
import android.support.v4.app.NotificationCompat;
import android.support.v4.app.TaskStackBuilder;
import android.util.Log;

import com.unity3d.player.UnityPlayer;

Expand Down Expand Up @@ -151,7 +152,7 @@ public void onReceive(Context context, Intent intent)
String channel = intent.getStringExtra("channel");
Bundle b = intent.getBundleExtra("actionsBundle");
ArrayList<NotificationAction> actions = null;
if (b != null) {
if (b != null && b.containsKey("actions")) {
actions = b.getParcelableArrayList("actions");
}

Expand Down
Binary file modified UnityProject/Assets/NotificationTest.unity
Binary file not shown.
Binary file modified UnityProject/Assets/Plugins/Android/notification.jar
Binary file not shown.

0 comments on commit d873f29

Please sign in to comment.