Application Error Occurs in Nokia 6300

旧巷老猫 提交于 2019-12-04 17:20:24

There is no good way to extract java.lang.Throwable.printStackTrace() on a Nokia 6300 since it is a Series40 phone.

The issue with the permission dialog has nothing to do with your code. You have to be aware of the MIDP security model in order to fix this.

A given phone has several security domain encoded in its firmware by the phone manufacturer.

In each domain, there can be several options to restrict access to a sensitive API.

When you install a MIDlet, the phone decides which domain it belongs to based on who trusts the certificate you signed it with. (could be unsigned, trusted third party, operator, manufacturer... )

When you run the MIDlet, every time it attempts to use a restricted API, the corresponding option is applied. (Could be always deny, ask the user every time, ask the user only once, always allow).

Different restricted APIs can have different options in the same domain.

There are therefore several possible explanations to your problem:

  • You signed the MIDlet differently for 6300 and N70.
  • The security domains are different on 6300 and n70.
  • The option to restrict HTTP connection is different on 6300 and N70.
  • The Mobile Network Operator is different on 6300 and N70.
Pavel Alexeev

I am not sure if it would help, but try closing output stream before HttpConnection in finally block:

    } finally {
        try {
            if (dataOutputStreamObj != null)
                dataOutputStreamObj.close();
            dataOutputStreamObj = null;

            if (httpConnectionObj != null)
                httpConnectionObj.close();
            httpConnectionObj = null;

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