11-14-2009 12:13 AM
First off I am testing with the 9500 simulator that comes with the Eclipse BlackBerry Java Plug-In.
Second, when I say root directory I mean the folder after the host (file:///SDCard/BlackBerry/ where "BlackBerry" is the root directory and host is "SDCard"). For information about path formats look at the FileConnection methods getPath, getURL, and getName. Finally the path I am using is "file:///SDCard/BlackBerry/."
So I have a helper library that contains a collection of file operations. I specifically made sure that I didn't use any APIs that require signing for this library (that way I can do quick updates without resigning). So I use javax.microedition.io.file.FileConnection a lot. I noticed a couple issues:
Has anyone else noticed this or had this issue? I don't know if this is a simulator issue or a OS issue. I would test on a actual device but for whatever reason I am being told that I need to sign my helper library (I think I added a signed class for testing and forgot to remove it, but don't know where it is yet). I also don't know if it is because I am using the file system as the SDCard or because I am using a SDCard in the first place or nether of those too.
Solved! Go to Solution.
11-14-2009 11:10 AM
I did another test on the simulator and found that when using "store" instead of "SDCard" it can view past the root directory but that isDirectory() still says a directory is not a directory. Also getPath no longer returns the host when I use "store" instead of "SDCard."
Does anyone know if this exists on a actual device or if it is simulator only?
11-20-2009 05:24 PM - edited 11-20-2009 05:43 PM
I found that the all the problems I came across was because I was using my computer's file system for the SDCard. If I didn't use my file system then everything works.
EDIT: Nevermind, the only problem fixed was the getPath() function.
11-20-2009 10:41 PM
No idea, all I know is before the BlackBerry Developer Conference there was SDK 5.0 Beta 4, afterwords there was SDK 5.0 Beta 5.
I would hope they release a final version soon but right now I just hope that certain elements (OpenGL, FileConnection when used with a file system SDCard, the GUI Builder, etc.) get implented in the simulator/Eclipse and are as close to perfect as possible so there is no disconnection between the real device and the simulator and that you can implement as many features/APIs/classes as the real OS has implemented.
On a different note, do you think I went overboard on the problem information?
11-25-2009 03:39 PM
I haven't been able to reproduce this in the BlackBerry smartphone simulator or on a real BlackBerry smartphone. What OS are you running on your PC? This could be an oddity with the simulator accessing the simulated micro SD card.
11-25-2009 05:23 PM
I am running Windows Vista 32bit with Service Pack 2. I am running the Eclipse 1.1 plugin with Component Pack 5.0 Beta 5 and am using the simulator that came with it.
I have not done tried it on an actual device but on the simulator I can only create/modify/etc. files/folders. It works when the SDCard is a *.dmp file but not when it is the file system.
I recently found out that some of the functions I was using required the file/folder to exist and have access to it so some of the functions I had said weren't working didn't work at all unless the folder/file existed. Either way when I tried it out on the built in memory and the SDCard as a *.dmp file and a file system. As stated before the SDCard worked as a *.dmp but it also worked with the built in memory so it tells me that it has something to do with using the file system.
11-26-2009 05:10 PM
I'm also seeing some issues with simulating the micro SD card using the beta 5.0 BlackBerry smartphone simulators on Windows Vista. I have sent this issue to our development team.
11-26-2009 05:29 PM