is_device_mobile: Is the user on a mobile device?

View source: R/get_info.R

is_device_mobileR Documentation

Is the user on a mobile device?

Description

Convenience function that checks if the user's device is detected as mobile. See get_device() for details.

Usage

is_device_mobile()

Value

Whether or not this user is on mobile

Examples

if (interactive()) {
  library(shiny)

  ui <- fluidPage(
    shinybrowser::detect(),
    "Are you on mobile?",
    textOutput("result")
  )
  server <- function(input, output, session) {
    output$result <- renderText({
      shinybrowser::is_device_mobile()
    })
  }
  shinyApp(ui, server)
}

shinybrowser documentation built on May 18, 2022, 5:18 p.m.