I’d like to create a view for users to key in ID, password and 2 more information. Once the driver has these informations, I’d like to call the system Device List view to display the list of devices retrieved from API.
In my app.json:
“pair”: [
{
“id”: “connect”
},
{
“id”: “list_devices”,
“template”: “list_devices”,
“navigation”: {
“next”: “add_devices”
}
},
{
“id”: “add_devices”,
“template”: “add_devices”
}
]
The connect view has 4 fields and an apply button (which emit(‘connect’))
In my driver, I suppose do I do
onPair(socket){
socket.on(‘connect’, function( data, callback ) {
//calls API and retrieve and format JSON into devices array
callback(null, 'devices');
}
}
I tried both socket.showView(‘list_devices’) and socket.emit(‘list_devices’) but I’m still stuck on the connect view. How do I go to the list device view and pass the devices along?