v17 Dynamic drop down list on settings page
#1
I want to write an add on for tethering a RPI to a smartphone using Bluetooth. The Bluetooth part is ok for me, as there is a hands free library on SourceForge which looks like it does what I need.

I want to do the pairing through the Kodi Front end, and the most sensible place for this is on the settings page for my add on. So I need a dynamic list of Bluetooth devices for the user to chose which device to pair with. Drop down list, or list I'm not too fussed, but from what I read all settings lists are defined in the settings xml file.

Is there a way to have a dynamic list on the settings page?
Reply
#2
The OpenElec and LibreElec settings add-ons both have that kind of list in them (I would expect the OSMC one probably has too, but it's been a while since I had an OSMC build running), so maybe that's something to look at and see if you can make use of the code from them as an example?
|Banned add-ons (wiki)|Forum rules (wiki)|VPN policy (wiki)|First time user (wiki)|FAQs (wiki) Troubleshooting (wiki)|Add-ons (wiki)|Free content (wiki)|Debug Log (wiki)|

Kodi Blog Posts
Reply
#3
This one?

https://github.com/OpenELEC/service.openelec.settings

I had a look but I couldn't find anything? Did I get the wrong code, or addon?
Reply
#4
That's the add-on yes (at least I think it is).

One of its tabs is for setting up and listing existing Bluetooth pairings, so I presumed either it must be in there, or in a module that is imported into it.
|Banned add-ons (wiki)|Forum rules (wiki)|VPN policy (wiki)|First time user (wiki)|FAQs (wiki) Troubleshooting (wiki)|Add-ons (wiki)|Free content (wiki)|Debug Log (wiki)|

Kodi Blog Posts
Reply
#5
Ooooooh that's good. Ok thanks I will get it up in my dev box and take a look.

Thanks Smile
Reply

Logout Mark Read Team Forum Stats Members Help
Dynamic drop down list on settings page0