Note that there are some explanatory texts on larger screens.

plurals
  1. PONull values on reading custom JAD attributes
    text
    copied!<p>I have a blackberry Application. It is downloaded from a web page which provides dynamic JAD file content. The JSP prints those : </p> <pre><code>out.println("Appid: " + appid); out.println("Ip: " + user.getIp()); out.println("Servicename: " + service); out.println("MIDlet-Version: 1.0.0"); out.println("MIDlet-Jar-URL: MyApp.jar"); out.println("MIDlet-Jar-Size: 91633"); out.println("MicroEdition-Profile: MIDP-2.0"); (and other attributes goes on like that..) </code></pre> <p>I need to get my custom attributes like "Appid" but it <strong>sometimes</strong> gets null values. User can download and run the app, but some of them cannot get my custom attributes. I dont know it is about the phone model or the current state of OS, but according to my logs, this problem appears mostly on those devices :</p> <p>9800 with OS 6.0.0.546</p> <p>9300 with OS 6.0.0.570</p> <p>9300 with OS 6.0.0.668</p> <p>9320 with OS 7.1.0.398</p> <p>My code to get attributes :</p> <pre><code> CodeModuleGroup cmg = null; CodeModuleGroup[] allGroups = CodeModuleGroupManager.loadAll(); String moduleName = ApplicationDescriptor .currentApplicationDescriptor().getModuleName(); for (int i = 0; i &lt; allGroups.length; i++) { if (allGroups[i].containsModule(moduleName)) { cmg = allGroups[i]; break; } } if (cmg != null) { AppData.firstPageURL = cmg.getProperty("Firstpage"); AppData.appId = cmg.getProperty("Appid"); AppData.firstIp = cmg.getProperty("Ip"); AppData.firstSubServiceName = cmg.getProperty("Servicename"); for (Enumeration e = cmg.getPropertyNames(); e.hasMoreElements();) { String name = (String) e.nextElement(); String value = cmg.getProperty(name); AppData.errorStep += "-" + name + ":" + value + "-"; } } </code></pre> <p>By the way, I determined that the code in the for loop above never runs in these cases.</p> <p>Any idea ? </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload