How to skip the questions when using FileConnectio

2019-08-05 07:48发布

问题:

I want to display photos stored in the phone , and I use the FileConnection and the openInputStream stuff. The problem is that there are many questions that I must accept when launching the program ; they are all about access to the file system or a particular file. So how to "skip" these questions , that is accept all of them programmatically, so they do not appear when launching the application ?

回答1:

Basically this type of alerts asking for security purpose. Because you are using FileConnecion(JSR-75).

In this purpose, You have to signing your application with 3rd party providers like Verisign or Thrawte or Java Verified. It will be cost.

If you are facing this issue on the emulator, go to preferences and MIDP tab, set the application domain to Trusted and set permission as "Allow Always". For more info, see this MIDP 2.0's Security Architecture...

Signing sites are,

Thawte

Verisign

Java Verified