如何引用存储在移动设备上的文件?

问题描述 投票:0回答:1

在构建应用程序时(在我的情况下为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 corona
1个回答
0
投票

你不能。

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

© www.soinside.com 2019 - 2024. All rights reserved.