0

I have a Shiny app where there is an action button that is suppose to connect to Skype so people can directly chat with me. Below is the code I tried however when the action button is clicked nothing happens.

library(shiny)
library(shinydashboard)

rm(list=ls())

header <- dashboardHeader()
sidebar <- dashboardSidebar(
  sidebarMenu(id = "menuChoice",
          menuItem("Resources", tabName = "ResourcesMenu", icon = icon("leaf"),
                   menuSubItem("Filter Selection", tabName = 
"LayoutSubMenu", icon = icon("angle-double-right")),
                   menuSubItem("Test", tabName = "Test2", icon = icon("globe")),
                   menuSubItem("Test 3", tabName = "Test3", icon = icon("wrench"))
          ),
          menuItem("Trial Run", tabName = "TR", icon = icon("star"))
  )
)

body <- dashboardBody(
  uiOutput("TabSelect"),

#This action button is where I need help
  a(actionButton(inputId = "phone", 
             label = "867-5309", 
             icon = icon("fab fa-skype", lib = "font-awesome")
  ),
  href="skype:LastName, FirstName?chat"
  )
)


ui <- dashboardPage(header, sidebar, body)

server <- function(input, output, session) {

  output$TabSelect <- renderUI ({
    selectInput(inputId = "LoadTab", "Available Tabs",
            choices = c(input$menuChoice)  
    )
  })
}

shinyApp(ui, server)
MLS
  • 108
  • 14
  • How is this application connected to Skype? Also nothing happens when the action button is pushed because there is nothing in the server using the button. – Chabo Feb 13 '19 at 18:59
  • I found this but it uses HTML and JS, I am not quite sure how to use this to implement it in my Shiny app however. https://dev.skype.com/webcontrol – MLS Feb 13 '19 at 19:27
  • you can include js code like you would in an html file with the help of htmltools package and tags. You can also look into using shinyJS. – Sada93 Feb 15 '19 at 05:00

0 Answers0