Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/sunnygoy/public_html/ on line 3

NFC state does not change automatically on changing NFC

This is a known issue. The android system currently does not provide any event corresponding to NFC enable/disable state like in case of GPS.

So the app only checks for the changes when the widget is updated (like pressing a toggle or some other state change).