problems to transmit beacon from android device -
has used samsung's bluetooth le apis make samsung android device advertise ibeacon? using samsung galaxy s4 ( gt- i9500)device transmitting advertisement using altbeacon library . code not working there problems please check.
beacon beacon = new beacon.builder() .setid1("2f234454-cf6d-4a0f-adf2-f4911ba9ffa6") // uuid beacon .setid2("1") // major beacon .setid3("5") // minor beacon .setmanufacturer(0x004c) // radius networks.0x0118 change other beacon layouts//0x004c iphone .settxpower(-56) // power in db .setdatafields(arrays.aslist(new long[] {0l})) // remove beacon layouts without d: fields .build(); beaconparser beaconparser = new beaconparser() .setbeaconlayout("m:2-3=0215,i:4-19,i:20-21,i:22-23,p:24-24"); beacontransmitter beacontransmitter = new beacontransmitter(getapplicationcontext(), beaconparser); beacontransmitter.startadvertising(beacon, new advertisecallback() { @override public void onstartfailure(int errorcode) { log.e("tag", "advertisement start failed code: " + errorcode); } @override public void onstartsuccess(advertisesettings settingsineffect) { log.i("tag", "advertisement start succeeded."); } });
Comments
Post a Comment