please see this file and two member functions - getRssi and getTxPower , and calculateAccuracy member function in IBeacon class. Again , try to add a service (background) to get the signal and monitor it , about android background service programming is https://developer.android.com/training/run-background-service/create-service.html and run it - http://developer.android.com/training/run-background-service/index.html
2015/5/1 下午 09:08:16
your requirements are : without clicking any button , it searchs iBeacon's signal automatically. design flows should be 1. design a service in background when ur program was activated---> this is a elementary step 2. if step 1 is successful , you should add some codes to the service . those codes should be searching iBeacon's signal https://github.com/Vinayrraj/Android-iBeacon-Demo/blob/master/android-ibeacon-service/src/com/radiusnetworks/ibeacon/service/IBeaconService.java the above is Ibeacon background service for searching signals . you may study it and try to integrate them into your service.