It is extremely simple. It keeps track of the first time the application has been used and a counter of the number of times the application has been launched.
You can configure when you want to ask the user to rate your application both in term of number of launches and days from the installation.
When the conditions are met, the library creates a dialog with a button to open the Play Store page of the application, a button to postpone the alert and a button to dismiss it and never get asked again.
You can get the library from GitHub.
Feedbacks and recommendation about how I could improve it are very welcome.