Android AlertDialog with CheckBox

For my old project YahrtzeitZmanim I needed to add start-up alert box, which will announce new version of Yahrtzeit2 app.

For these purposes, I added the following code to onCreate function:

and before onCreate function some pre-requisites:

Additionally, I needed to create layout for checkbox.xml

As a result, I got the following alert box: