Hi i wish to implement `push notification` in my own android application. how can i do? please give me some ideas....

This kind of broadcast receivers should receive messages even if my app is closed(like Gmail.here i receive one new message in my inbox means that time the notification message is displayed on top of my android device,clicked that notification message means directly go to inbox and view that message).

here i wish to insert one data on my database means the notification message is display on my android app even my app is closed.