react-native-kontaktio icon indicating copy to clipboard operation
react-native-kontaktio copied to clipboard

simulate a beacon detected

Open pashute opened this issue 6 years ago • 3 comments

Could you add a feature to simulate a detected beacon (or a few), and also give a mock of the data received in answer to detected beacons? I need this for my ios app which is crashing when a beacon is detected, and I'm sure there are many developers who could use this.

Or perhaps there's a way to do this that you can tell me?

A regular beacon simulator emitting a simulated beacon is not enough because the Kontakt-io outputs an extra internal field with the kontakt id.

pashute avatar Nov 18 '18 10:11 pashute

Such a virtual beacon would be a great thing. It would also be very useful for unit tests so that the beacon response could be mocked. However I didn't think about how to realize it yet. If you have an idea I'd be very happy about a PR!

andrekovac avatar Nov 26 '18 10:11 andrekovac

You have the code to read a real beacon when ondeviceconnected or something like that. You have the data received and you emit an event or callback in response. No? All that's left is to debug and catch the event.

בתאריך יום ב׳, 26 בנוב׳ 2018, 12:50, מאת André Kovac < [email protected]>:

Such a virtual beacon would be a great thing. It would also be very useful for unit tests so that the beacon response could be mocked. However I didn't think about how to realize it yet. If you have an idea I'd be very happy about a PR!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Artirigo/react-native-kontaktio/issues/44#issuecomment-441597208, or mute the thread https://github.com/notifications/unsubscribe-auth/ABsSM9okv2IpwP5SxiDGc5cQy3yrOzIJks5uy8dogaJpZM4Yn3-v .

pashute avatar Nov 26 '18 14:11 pashute

And fill it with fake data.

בתאריך יום ב׳, 26 בנוב׳ 2018, 16:30, מאת Moshe Flam [email protected]:

You have the code to read a real beacon when ondeviceconnected or something like that. You have the data received and you emit an event or callback in response. No? All that's left is to debug and catch the event.

בתאריך יום ב׳, 26 בנוב׳ 2018, 12:50, מאת André Kovac < [email protected]>:

Such a virtual beacon would be a great thing. It would also be very useful for unit tests so that the beacon response could be mocked. However I didn't think about how to realize it yet. If you have an idea I'd be very happy about a PR!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Artirigo/react-native-kontaktio/issues/44#issuecomment-441597208, or mute the thread https://github.com/notifications/unsubscribe-auth/ABsSM9okv2IpwP5SxiDGc5cQy3yrOzIJks5uy8dogaJpZM4Yn3-v .

pashute avatar Nov 26 '18 14:11 pashute