I am trying to save an instance of StatusBarNotification
, so that i could show the notification later to the user. I noticed that StatusBarNotifcation
is not Serializable
but Parcelable
. Is there any way to store the exact instance state in the database so that even if user turns of his phone, the instance object is stored.
I know its not the best practice to store the Parcelable
object in database. But I need to do it.
If there is any way i could get the byte array of the instance, I am open for suggetions.
EDIT
I found out today that, if I turn off my android phone with some un-attended notification, when I restart my phone I am still able to see the same notifications. That being said, android is somehow saving the same instance of notification.
Now my question is, how?? And if android does why can't us.