Where do the files I put in the "www" directory before building a Blackberry widget end up on the device?
Background: I would like to read the content of some of the files (e.g. "www/index.html") from t开发者_开发技巧he www directory in the native Java part of the widget. (I already used FileConnection.list to write the name of all files on the device to System.out - neither index.html nor any other file from the www directory was part of the list.)
The widget is based on PhoneGap 0.9.4 for Blackberry but that shouldn't make a difference.
Found the answer: The files are packaged as resources. Therefore it's possible to read them with Class.getResourceAsStream.
Example:
getClass().getResourceAsStream("/index.html");
精彩评论