Monday, March 19, 2012

Blackberry Webworks Issues and Pitfalls

Blackberry Issues

è Error: cannot access file C:/windows/TEMP/some =filename.extention, preverifier failed, RAPC error occurred.

The above error occurred on the installation of blackberry ant build. To solve this you have to clear the TEMP folder.

è Blackberry with JQuery mobile: Must remove dot, hyphen and other special characters from the filename also should replace image names without special characters. Because blackberry hate special characters and it never take elements which has special characters.

è Blackberry change simulator

Right click project on eclipse click run as -> run configurations

Double click blackberry simulator click on JRE tab choose alternative JRE from the Installed JRE

Click on Simulator -> General tab choose BB simulator SDK version. Click on apply and close

è Error: If you found any error like “JVM Error uncaught: controlled access exception scroll for available commands” while running blackberry emulator then go to run as -> run configuration and remove all new_configuration and Blackberry webworks under Blackberry webworks

è Issue: Internet not working on emulator or simulator

For solving this issue go to blackberry web works package directory called BBWP or wcpc and click on mds->config folder and then open rimpublic.property file. Then edit after

[HTTP=HANDLER] with following lines

application.handler.http.proxyEnabled = true

application.handler.http.proxyHost=proxy.symphonysv.com

application.handler.http.proxyPort=8080

Note: if you are running under proxy.

Note: wcpc folder will be under

E:\Java\BBeclipse\plugins\net.rim.browser.tools.wcpc_2.0.0.201103231828-18\

Reference links:

http://www.blackberryforums.com/developer-forum/28005-mds-simulator-proxy.html

http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/796557/800738/800792/801079/How_To_-_Configure_the_MDS_simulator_to_work_behind_a_proxy.html?nodeid=800740&vernum=4

è Issue: Blackberry simulator keypad is not visible

Solution: disabling graphics acceleration in the simulator (View -> Graphics Acceleration) usually does the trick.

Link: http://supportforums.blackberry.com/t5/Java-Development/simulator-not-showing-the-keypad/td-p/609817

è Error: JVM Error 545

Solution: this is because of dump file. Running clean.bat file will remove all the dump file and will set the default simulator.

Link: http://supportforums.blackberry.com/t5/Java-Development/JVM-error-545-in-8100-emulator/td-p/62869

è JQuery mobile Alpha version 4 does not support Ajax paging

Supported:

jquery.mobile.1.0b2.min.css

jquery.1.6.2.min.js

jquery.mobile.1.0b2.min.js

Unsupported:

jquery.mobile.1.0a4.1.css

jquery.mobile.1.0a4.1.js

jquery.1.5.2.min.js

è Error: The selected server returned an error when attempting to fulfill your request.

Solution: This is because your internet connection is not working or you are under the proxy control. If you are under the proxy control add the proxy setting [refer above] into rimpublic.property file.

è Problem: http sites working fine. https sites returned an error like “The selected server returned an error when attempting to fulfill your request”.

Solution: This is problem with proxy block. Remove proxy and try it will work.

è Getting error like “Error starting sybasecbq: module ‘sybasecbq’ attempts to access a secure API"

This error is happening because the COD file or JAR file is not signed properly.

So, to sign the COD file first get the KEY files from Blackberry.

To get the KEY file use the below link

https://www.blackberry.com/SignedKeys/

To install signing keys follow steps below

http://supportforums.blackberry.com/t5/Testing-and-Deployment/BlackBerry-Applications-and-code-signing-Start-to-Finish/ta-p/445848

è Sign the Blackberry web works application using command prompt

c:\BBWP>bbwp.exe E:\Java\Locate\memorycheck1\build\memorycheck1.zip /g SymphonySV

Here zip file Is that your complete code zip file. SymphonySV is the password of signing keys.

è Application getting too long to respond means the request goes to BB site and goes to serve then comes back to BB site and then user.

è Application getting struck

Solution: Phonegap is creating the stuck issue. This is due to Phonegap.js and jar file. These files are external and too large to use in hybrid application. Taking too much time to load and loaded memory is not been removed while close if application. This memory issue is creating the stuck problem.

è Application icon changing to normal folder and Application give the low memory on multiple open close

Solution: This is also problem with the memory leak issue. If memory leak popup is happening then immediately icon will be changed to normal icon.

- This problem can happen due to handling of callback methods from APIs providing function pointers from Java to JavaScript. By loading below line in directly through JavaScript without using onload function then this problem will happen. To solve this problem clear the menu items and nullify the variable bb_login onclose of application.

Ex: bb_login = new blackberry.ui.menu.MenuItem(false, 0, "Login", call_login);

- If you use phonegap then also the same problem will happen.

This is a known bug in BB6.0 reference

http://supportforums.blackberry.com/t5/Web-and-WebWorks-Development/How-to-Free-Up-Memory-Through-BlackBerry-Webworks-Code/m-p/1499111

http://supportforums.blackberry.com/t5/Web-and-WebWorks-Development/Device-memory-is-Low-issue-for-an-WebWork-app/m-p/1166441/highlight/true#M14223

The fix for these issues are

http://supportforums.blackberry.com/t5/Web-and-WebWorks-Development/PRE-RELEASE-Memory-Leak-Fix-Download/td-p/1335253

è If we enable ui.HardwareBackKey hardware back button will not close if menu is opened. Instead it will override the back key with your user defined function when you create the build using webworks 2.3 OS. For this use the 2.2 version It will solve the problem.

Use the below URL to solve back key problem.

http://supportforums.blackberry.com/t5/Web-and-WebWorks-Development/PRE-RELEASE-Memory-Leak-Fix-Download/td-p/1335253

è How to take screenshot of blackberry smartphone

javaloader -u screenshot c:\[name].jpg

http://www.blackberrycool.com/2006/03/10/taking-screenshots-of-your-actual-blackberry/

No comments: