View source: R/preview_mobile.R
preview_mobile | R Documentation |
Allow to preview a given app on different devices.
preview_mobile(
appPath = NULL,
url = NULL,
port = 3838,
device = c("iphoneX", "galaxyNote8", "iphone8", "iphone8+", "iphone5s", "iphone5c",
"ipadMini", "iphone4s", "nexus5", "galaxyS5", "htcOne"),
color = NULL,
landscape = FALSE
)
appPath |
App to preview if local. |
url |
App to preview if online. |
port |
Default port. Ignored if url is provided. |
device |
Wrapper devices. |
color |
Wrapper color. Only with iphone8 (black, silver, gold), iphone8+ (black, silver, gold), iphone5s (black, silver, gold), iphone5c (white,red , yellow, green, blue), iphone4s (black, silver), ipadMini (black, silver) and galaxyS5 (black, white). |
landscape |
Whether to put the device wrapper in landscape mode. Default to FALSE. |
A shiny app containing an iframe surrounded by the device wrapper.
choose either url or appPath!
if (interactive()) {
library(shiny)
library(shinyMobile)
preview_mobile(appPath = "~/whatever", device = "galaxyNote8")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.