Text file fails to load on android device

I’m trying to load a text file that contains a dictionary for my app.

It loads fine in the simulator and on my ipod touch, but it fails to load on my android device.

Is anyone else having trouble loading files on their android device? Is there a workaround? [import]uid: 27183 topic_id: 7416 reply_id: 307416[/import]

Can you share the code you’re using to load the file?

Tim [import]uid: 8196 topic_id: 7416 reply_id: 26191[/import]

Hi Tim,

here’s the code. once I call load() I can call exists(‘hello’). This works in the simulator and ipod touch, but not on my t-mobile g2.

[code]
module(…, package.seeall)

local Words = { words = {}}

function load()
local path = system.pathForFile(“english-words.clean”)

local fh = io.open(path, ‘r’)

for word in fh:lines() do
Words.words[word] = true
end
fh:close()

return Words
end

function Words:exists(_word)
return self.words[_word] == true
end

[/code] [import]uid: 27183 topic_id: 7416 reply_id: 26210[/import]