added check for lower android versions than 4.3.

added some events stuff.

fixed some bugs with ble scanning in the background.