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)
}

daattali/shinybrowser documentation built on Aug. 21, 2024, 6:12 a.m.