1

I have estimote beacon and i'm trying to add or change the eddystone url's url info but i'm unable to do it.

I tried some codes that i found but none of them is resolved my problem. Here is one of the code that I used.

try {
            byte[] urlBytes = UrlBeaconUrlCompressor.compress("http://www.google.com");
            Identifier encodedUrlIdentifier = Identifier.fromBytes(urlBytes, 0, urlBytes.length, false);
            ArrayList<Identifier> identifiers = new ArrayList<>();
            identifiers.add(encodedUrlIdentifier);
            beacon = new Beacon.Builder()
                    .setIdentifiers(identifiers)
                    .setManufacturer(0x0118)
                    .setTxPower(-59)
                    .build();
            BeaconParser beaconParser = new BeaconParser(
                    .setBeaconLayout(BeaconParser.EDDYSTONE_URL_LAYOUT);
            BeaconTransmitter beaconTransmitter = new BeaconTransmitter(context, beaconParser);
            beaconTransmitter.startAdvertising(beacon);
        } catch (MalformedURLException e) {
            Log.d("", "That URL cannot be parsed");
        }

I don't know that i'm using it wrong or this is not the code for my problem.

How can i change the transmitting url or add a new one?

EnesKY
  • 21
  • 1
  • 5

0 Answers0