【问题标题】:How do you reference files stored on a mobile device?您如何引用存储在移动设备上的文件?
【发布时间】:2023-03-24 03:36:01
【问题描述】:

在构建应用程序(在我的情况下为 android)时,您将如何引用和显示使用 Corona 存储在设备上的音乐文件。我搜索了http://developer.coronalabs.com/reference,但我找不到它,但我并不是说它不是他们的。

所以这是视图之一,将用于“歌曲”

local storyboard = require( "storyboard" )
local scene = storyboard.newScene()

function scene:createScene( event )
  local group = self.view

  local bg = display.newRect( 0, 0, display.contentWidth, display.contentHeight )
  bg:setFillColor( 255 )    -- white

  local title = display.newRetinaText( "First View", 0, 0, native.systemFont, 32 )
  title:setTextColor( 0 )   -- black
  title:setReferencePoint( display.CenterReferencePoint )
  title.x = display.contentWidth * 0.5
  title.y = 125

  local summary = display.newRetinaText( "Loaded by the first tab 'onPress' listener\n— specified in the 'tabButtons' table.", 0, 0, 292, 292, native.systemFont, 14 )
  summary:setTextColor( 0 ) -- black
  summary:setReferencePoint( display.CenterReferencePoint )
  summary.x = display.contentWidth * 0.5 + 10
  summary.y = title.y + 215

  local sliderListener = function( event )
  local sliderObj = event.target

function buildGUI()
  print( "New value is: " .. event.target.value )
end


group:insert( bg )
group:insert( title )
group:insert( summary )

谁在神秘帐户上写了这篇文章?

【问题讨论】:

    标签: android lua coronasdk


    【解决方案1】:

    你不能。

    Corona 只能访问其自己的沙箱中的文件或通过 http 下载内容。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2010-10-07
      • 2013-07-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-12-23
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多