It is quite hard to guess what is going wrong with your code.
You can receive some information by investigating logcat.
Make sure the Provision app is signed with correct platform keys, and the values in Const.java correspond to your Headwind MDM instance.