2

In my j2me app that is signed by veriSign, has problem in accepting the always or yes permissions the time it has to perform PIM.getInstance().openPIMList(..) action.

When my app perform below line of code very first time of it's installation it hangs and doesn't show up the main screen rather a black background hanged screen. When I exit and restart the application it runs normally without any problem even if I delete it and put it back again and runs fine, except I delete and restart the phone and try to run it again it shows the same problem I described above.

My code of line that causes to ask permissions is here that actually also causes the problem. One more thing this error only occurs on specific phones which actually allow ALWAYS permission on start.

I am checking it over Nokia X2-05 and it shows problem but on Nokia C3-02 it doesn't as it doesn't allow ALWAYS permission automatically on start of app.

private void permissionSettings() throws PIMException {
       PIM.getInstance().openPIMList(PIM.CONTACT_LIST, PIM.READ_WRITE);
}

Above is code snippet that hangs at first start.

gnat
  • 6,213
  • 108
  • 53
  • 73
Saqib
  • 1,120
  • 5
  • 22
  • 40
  • Great question, sadly I doubt whether you will find someone with sufficient experience of this on here to get the answer you need. – funkybro Jan 10 '13 at 08:35
  • Yeah, I have been trying over since last week now put this question here. Hopefully someone might ever had such experience :) – Saqib Jan 10 '13 at 09:10
  • I'd try a test with midlet simplified as much as possible, having code inside `permissionSettings` wrapped into try-catch block that would catch and report any exception if there's one – gnat Jan 10 '13 at 11:29
  • well there isn't any exception thrown because I tried that by putting in try catch, issue comes in specific handsets as I mentioned above and when app is signed.If I run without signing the app it works fine (may be because it doesn't ask for ALWAYS permission there that time? just a guess) – Saqib Jan 10 '13 at 14:19

1 Answers1

1

It sounds like a bug on the handset to me, the TCK tests used to verify j2me libraries are pretty weak so lots of bugs like this find their way through.

It seems that the key is in the permissions, so I would try and play around in this area. Make sure you have the right permissions set in the .jad (before signing), if you can get hold of one try to sign with a certificate in a different security domain or certificate, try changing the permission level before running the applet.

I would expect that you'll only be able to work around the problem, so rather than suggest something specific I would be varying things within those areas.

James
  • 224
  • 2
  • 13
  • Though it's not a bug over a specific handset but on all the handsets released by nokia as I have posted to them and found someone else having same issue. And I found work around that and for convenience accepting your answer – Saqib Apr 09 '14 at 07:51