Page 582 - 완) I MDP 프로젝트 작품 보고서(전체과 1학년)1.6
P. 582

b.Beaconservicestart.sendData("0x33");

                       if(flag==1&&beacons.size()==1&&mRegion.getMinor()==20600)

                            b.Beaconservicestart.sendData("0x34");


                 }

                 @Override

                 public  void  rangingBeaconsDidFailForRegion(RECOBeaconRegion  recoBeaconRegion,
            RECOErrorCode  recoErrorCode)  {


                 }

                    private  void  startRangingWithRegion(RECOBeaconRegion  region)  {

                       Log.i("BackRangingService",  "startRangingWithRegion()");

                       /**

                        * There is  a  known  android  bug  that  some  android  devices  scan


            BLE  devices  only  once.  (link:  http://code.google.com/p/android/issues/detail?id=65863)

                        *  To  resolve  the  bug  in  our  SDK,  you  can  use  setDiscontinuousScan()
            method  of  the  RECOBeaconManager.

                        *  This  method  is  to  set  whether  the  device  scans  BLE  devices  continuously
            or  discontinuously.


                        * The default  is  set  as  FALSE.  Please  set TRUE only  for  specific  devices.

                        *

                        * mRecoManager.setDiscontinuousScan(true);

                        */

                       try  {


                            mRecoManager.startRangingBeaconsInRegion(region);

                       }  catch  (RemoteException  e)  {

                            Log.e("BackRangingService",  "RemoteException  has  occured  while  executing
            RECOManager.startRangingBeaconsInRegion()");

                            e.printStackTrace();





                                                         -  575  -
   577   578   579   580   581   582   583   584   585   586   587