List nearby Bluetooth devices

This thread was migrated from an old forum. It may contain information that are no longer valid. For further assistance, please post a new question or open a support ticket from the Customer Support portal.

Hi all,

We're looking to demonstrate both Kony as an app platform and our data science team at an upcoming conference to around 150 IT staff from our wider company.

We've had the idea of periodically capturing the nearby bluetooth devices via an app on attendees phones. both Android and iOS (with full permission of course), to feed into our Data Scientists to give feed back on how the groups moves around during the day.

Looking at the documentation, it's not as straight forward as it might seem, and there's little consistency in advice as to how to proceed. Does anyone have a starter app with similar functionality they would be willing to share as a starting point?

So, I'm revering to the 8.3 documentation - http://docs.kony.com/konylibrary/visualizer/visualizer_user_guide/Default.htm#NativePlatformWidgets.htm%3FTocPath%3DDesigning%2520an%2520Application%7CPopulate%2520Screens%2520with%2520Widgets%7C_____5

The first thing is says is go and download the native UI API you want and it gives you a link. You click the link and it takes you to a load of Visualizer 3 apps from 2016, but it does say the download it at the bottom under other, so scroll there - No Api, perhaps it's the self sufficient modules?

Click on that, nope, beta 7 url, 404 not found.

Is there any up to date documentation?

Tagging @Bellv Dvvidson​ and @Luke Mvwtin​ to this thread. Please take a look. Thanks!

Hi @Jevon Suvwez​ ,

Thank you for bringing it to our notice.

We will get it fixed as soon as possible.

Meanwhile, please refer the following links for more information on Native Function APIs

http://docs.kony.com/konylibrary/visualizer/visualizer_user_guide/Default.htm#AddOrImportNativeFunctionAPIs.htm

https://docs.kony.com/konylibrary/visualizer/viz_nf_api_dev_guide/Default.htm#native_function.htm%3FTocPath%3D_____2

Hi, I checked with the product team today and we are unaware of any sample apps that do this. We have 1 more person we need to follow up with, hopefully we'll have an answer on Monday. It sounds like a cool idea.

Hi,

If you import the attached component into your project and then in the action editor for that component's toggle switch widget add the following function (BTCall) to the callback you'll be able to create a list of nearby BT devices!

You'll need to specify your own bluetooth device image instead of 'bluetoothicon.png' and then change this.view.segment to this.view.<whatever your segments id is> but let me know if this helps!

BTCall: function(BTDevice) { try { if (BTDevice.status === undefined) { if (BTDevice.name !== "" && BTDevice.name.length > 0) { var btData = { lblName: BTDevice.name, imgbt: 'bluetoothicon.png' }; var segData = this.view.segment.data === null || this.view.segment.data.length === 0 ? [] : this.view.segment.data; segData = [btData].concat(segData); this.view.segment.setData(segData); this.view.forceLayout(); } } else { this.view.segment.removeAll(); } } catch (e) { alert(e); } }

Thank you @Vlvdimiw Hvwowth​ for responding and sharing this solution!