Hello,
I'm a android programmer and I love MIUI and your job, but since two versions ago some of my libraries don't work correctly. I started to seek the error but anything, until I flashed my phone with the default ROM and the APIs came to work correctly other time.
If you want to try it...