Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
New Developer
ysshir
Posts: 16
Registered: ‎02-26-2009
My Device: 9000 v4.6.0.224
Accepted Solution

File Always Encrypted.

Tested device : BlackBerry Bold 9000(v4.6.0.245)


I have an application which create a text file on handheld.
It actually works on handheld.
But when I access to the file by PC, I found the file encrypted. (it has .rem extension

I'm quite sure that it was NOT encrypted when I used v4.6.0.224.

I checked "Encryption Mode" in Options:Memory, and "None" was selected.

 



public class FileAccessDemo extends UiApplication {

public static void main(String[] args) {
FileAccessDemo app = new FileAccessDemo();
app.enterEventDispatcher();
}

private FileAccessDemo() {
pushScreen(new AddressInfo());
}

final class AddressInfo extends MainScreen {

AddressInfo() {
setTitle(new LabelField("FileAccessDemo", LabelField.USE_ALL_WIDTH));

EditField mainField = new EditField();
add(mainField);

StringBuffer text = new StringBuffer();

try {
FileConnection directory = (FileConnection) Connector.open("file:///store/appdata/", Connector.READ_WRITE);
if (! directory.exists()) {
directory.mkdir();
}
directory.close();

FileConnection file = (FileConnection) Connector.open("file:///store/appdata/debug.txt", Connector.READ_WRITE);
if (! file.exists()) {
file.create();
OutputStream output = file.openOutputStream();
output.write("debugging".getBytes("UTF8"));
output.flush();
output.close();

} else {
InputStream input = file.openInputStream();
InputStreamReader reader = new InputStreamReader(input, "UTF8");

int length = 0;
char[] buf = new char[255];
while (-1 != (length = reader.read(buf)))
text.append(buf, 0, length);
reader.close();
input.close();
}

} catch (Exception e) {
text.append(e.getMessage());
}
mainField.setText(text.toString());
}

public void close() {
Dialog.alert("bye!!");
System.exit(0);
}
}
}
Please use plain text.
New Developer
ysshir
Posts: 16
Registered: ‎02-26-2009
My Device: 9000 v4.6.0.224

Re: File Always Encrypted.

I'm aware of that every file created with v4.6.0.245 is ecrypted,

even the image files that are taken by camera.

 

I'm sure I turned  "Encryption Mode" off.

 

This will happen no matter where I saved files in media card or handheld.

 

 

thanks..

 

Please use plain text.
Administrator
MSohm
Posts: 14,521
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook
My Carrier: Bell

Re: File Always Encrypted.

This is an issue with vesrion 4.6.0.245 of BlackBerry handheld software.  However, to date no carrier has released this particular version.  It is recommended to run the version officially released by your carrier, which should be available from their web site.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Please use plain text.
New Developer
ysshir
Posts: 16
Registered: ‎02-26-2009
My Device: 9000 v4.6.0.224

Re: File Always Encrypted.

So, this is a bug.

 

thanks

Please use plain text.
New Developer
Yoge
Posts: 7
Registered: ‎05-20-2009
My Device: Not Specified

Re: File Always Encrypted.

 is there is any encryption api that support both encrytion in C# and java .. ie i want to develop one application which stores some data in

 

mobile  after encryption .. this data has to be viewed in pc so i need do decrypt it in  C#.net .. is there is any api commonly support the both 

 

.. can any one help me for this 

 

Please use plain text.