Instead of bothering with all of that, just install
Notifications Logger — as its name would suggest, the app keeps a detailed running log of all past notifications, and you can even export your notifications to be viewed on a different device or custom ROM.