React Native Estimote Proximity

Hi,

I am creating a React Native app, using the @estimote/react-native-proximity plugin, however the RNEP.ProximityZone actions for OnEnterAction, OnExitAction and OnChangeAction are never fired.

I bought a starter kit and have registered all 3 UWB Proximity Beacons in Estimote Cloud. I have assigned different tags to all 3 beacons. I am only trying to setup one beacon below, to get it working first before adding the other zones.

Im requesting the relevant permissions on app load, have started Observing Zones but none of the actions are fired. I’ve set the distance to 1 metre so ease but no actions are being fired.

Here is my code:

const startProximityObserver = () => {

const ESTIMOTE_APP_ID = xxx;
const ESTIMOTE_APP_TOKEN = xxx;

const beaconList = [
{
bec_id: 1001,
bec_uuid:xxx,
str_id: 4005,
bec_name: ‘lemon’,
loc_id: xxx,
id: 1,
tag: ‘bedroom’,
}
];
if (beaconList.length) {
RNEP.locationPermission.request().then(
permission => {
if (permission !== RNEP.locationPermission.DENIED) {
const credentials = new RNEP.CloudCredentials(ESTIMOTE_APP_ID, ESTIMOTE_APP_TOKEN);
const config = {
notification: {
title: ‘Exploration mode is on’,
text: “We’ll notify you when you’re next to something interesting.”,
channel: {
id: ‘exploration-mode’,
name: ‘Exploration Mode’
}
}
};
var zones = ;
for (var i = 0; i < beaconList.length; i++) {
var zone = new RNEP.ProximityZone(1, beaconList[i].tag);
zone.onEnterAction = onZoneEntered;
zone.onExitAction = onZoneExit;
zone.onChangeAction = onZoneChanged;
zones.push(zone);
}
RNEP.proximityObserver.initialize(credentials, config);
if (zones.length) {
RNEP.proximityObserver.startObservingZones(zones);
}
}
},
error => {
console.error(‘Error when trying to obtain location permission’, error);
}
);
}

const onZoneEntered = context => {
console.log(‘zone onEnter’, context);
};

const onZoneExit = context => {
console.log(‘zone onExit’, context);
};

const onZoneChanged = contexts => {
console.log(‘zone onChange’, contexts);
};
};

I’ve spent 3 days on this now, the code is really straight forward and should work out the box.

Have I got the correct beacons?? UWB Proximity Beacons - GG_2.2fc

If you could get back to me ASAP that would be great!

I think the UWB beacons are ONLY UWB, not Proximity.

they have not converged their solutions to one toolkit yet.

Thanks @sdetweil for the quick reply. Do you know if there is a React Native package that I can use with these UWB beacons? I have also tried the ‘react-native-beacons-manager’ package but this didn’t work either? I presume as this package can only be used with the LTE Beacons. The beacons do say they are proximity…

All I want to do is exactly what the Estimote UWB app does, detect the beacons and send out notifications to my react app.

I do think it’s confusing that you buy the trial pack, log into the dashboard, try create a mobile app and it says no templates are compatible with the beacons!

If anyone has created a react-native app with these UWB Beacons, please let me know.

@estimote are you able to help at all?

Thanks

my UWB only beacons are labeled the same.

so none of the proximity code works on these currently.

you have to use the SDK they provide, as the actual interface is wrapped.

one SDK for iOS and one for Android

I haven’t done any react native development so I can’t help there.

That’s frustrating. Have you done anything outside of Swift? Does the Proximity code work in the SDK with the UWB Beacons?

Are there other beacons I can buy that will work with the Proximity code and React-Native?

I built our apps in ionic/Vue, and wrote plugins to provide access to native features and the SDKs.

The plugins provide IOS and Android implementations with a consistent upper interface.

none of the proximity code works w the UWB beacons

I do not know how to get the proximity beacons, as they require more infrastructure than we intend to have

Ok, that’s good to know. I have done plenty Ionic apps in the past with Angular and React. I’ve also looked at Vue and isn’t too dissimilar.

I only need integration with IOS for the time being.

It would be great to hear more about your apps, in particular the plugins and how they integrate with the beacons and what you use your UWB beacons for?

@Estimotedevlopper @estimote @estimotedev can you please confirm, is there any Proximity code that works with the UWB Beacons?

@Trevor For the time being, sdetweil is correct. We are releasing our new SDK very soon, however, that will merge a lot of these features. For now, sit tight and play with our UWB SDK’s that we have out and you’ll have much more to tinker with soon!

Jessica