How to skip the questions when using FileConnection?

限于喜欢 提交于 2020-01-25 00:16:14

问题


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



来源:https://stackoverflow.com/questions/6425627/how-to-skip-the-questions-when-using-fileconnection

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!