Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Highlighted
New Contributor
Posts: 9
Registered: ‎07-29-2012
My Device: Torch 9800
My Carrier: none

Application created using html and js - issues

[ Edited ]

Hi,

 

I have been reading this forum for a time now. Thank you for all your support you have solved many of my problems here only by reading. However I have an issue I'd like to solve and I thought I ask you guys here.

 

I have developed a web application using HTML, Jquery mobile and javascript. I zip all my files and upload it into build.phonegap in order to generate the web app for different platforms for distribution.

 

I have no problems with the packaging and app creation. The application is nicely working in iPhone and Android devices as a native application after installation.

 

However when it comes to Blackberry:

 

I installed the application on a real Torch 9800 device with OS 6. It takes time to start up the application. Sometimes it stucks at the spash screen, sometimes it loads up after a while then the app is fine and stable running. This is not my major issue however I am curious why it doesn't really want to start up all the time.

 

I installed the application on a real Storm 9520 device with OS 5. When I start the application I notice the followings: I can see the splash screen that after few seconds I can only see a white scrollable screen.

 

I am not really experienced with Blackberry, but I decided to look into the issue in more details. Then after 2 days for reading and searching finally I set up my eclipse with Blackberry plugin in order to run the application in the simulator in the hope that I can figure out what the problem is from the console messages. So I ran a Blackberry 9550 simulator and I downloaded my application on it. The behaviour is the same. (white screen after splash screen). Unfortunatelly I have no idea what is wrong and how I can fix the problem using my html and js files.
So after the application start (named Friday) these are the following messages in eclipse's console:

[0.0] VM:+GC(f)w=11
[0.0] VM:-GCt=28,b=1,r=0,g=f,w=11
[0.0] VM:QUOT t=2
[0.0] VM:+CR
[0.0] VM:-CR=0
[0.0] Starting Friday
[0.0] Started Friday(199)
[0.0] Foreground Friday(199)
[0.0] Detected background switch for net_rim_bb_ribbon_app(85) who has NO tunnels open - defocus NOT calle[0.0] d
[0.0] FocusHistory: Focus lost; App net_rim_bb_ribbon_app; Component net.rim.device.apps.internal.ribbon.l[0.0] auncher.RibbonIconField
[0.0] Detected foreground switch for Friday(199) who has NO tunnels open - focus NOT called
[0.0] FocusHistory: Focus gained; App Friday; Component blackberry.web.widgetc33b138a163847cdb6caeeb7c9a12[0.0] 6b4package.bf.BrowserFieldScreen
[0.0] Warning: VerticalFieldManager INCREMENTAL_LAYOUT style specified without specifying USE_ALL_WIDTH | [0.0] USE_ALL_HEIGHT | VERTICAL_SCROLL
[0.0] Warning: VerticalFieldManager INCREMENTAL_LAYOUT style specified without specifying USE_ALL_WIDTH | [0.0] USE_ALL_HEIGHT | VERTICAL_SCROLL
[0.0] FocusHistory: Focus lost; App Friday; Component blackberry.web.widgetc33b138a163847cdb6caeeb7c9a126b[0.0] 4package.bf.BrowserFieldScreen
[0.0] TID:unable to execute in the app blackberry.web.widgetc33b138a163847cdb6caeeb7c9a126b4package.Widget[0.0] @6e80a8a0|java.lang.Object@d2776bd3|-1
[0.0] FocusHistory: Focus gained; App Friday; Component blackberry.web.widgetc33b138a163847cdb6caeeb7c9a12[0.0] 6b4package.loadingScreen.LoadingScreen
[0.0] Friday [2012-07-29 14:06:09.962]: Logger enabled: GUID=142828802821, name=Friday
[0.0] Friday [2012-07-29 14:06:10.073]: Found plugin App = org.apache.cordova.app.App
[0.0] Friday [2012-07-29 14:06:10.078]: Found plugin Device = org.apache.cordova.device.Device
[0.0] Friday [2012-07-29 14:06:10.082]: Found plugin Camera = org.apache.cordova.camera.Camera
[0.0] Friday [2012-07-29 14:06:10.087]: Found plugin NetworkStatus = org.apache.cordova.network.Network
[0.0] Friday [2012-07-29 14:06:10.090]: Found plugin Notification = org.apache.cordova.notification.Notifi[0.0] cation
[0.0] Friday [2012-07-29 14:06:10.097]: Found plugin Accelerometer = org.apache.cordova.accelerometer.Acce[0.0] lerometer
[0.0] Friday [2012-07-29 14:06:10.103]: Found plugin Geolocation = org.apache.cordova.geolocation.Geolocat[0.0] ion
[0.0] Friday [2012-07-29 14:06:10.108]: Found plugin File = org.apache.cordova.file.FileManager
[0.0] Friday [2012-07-29 14:06:10.112]: Found plugin FileTransfer = org.apache.cordova.http.FileTransfer
[0.0] Friday [2012-07-29 14:06:10.118]: Found plugin Contacts = org.apache.cordova.pim.Contact
[0.0] Friday [2012-07-29 14:06:10.122]: Found plugin Capture = org.apache.cordova.capture.MediaCapture
[0.0] Friday [2012-07-29 14:06:10.130]: Found plugin Battery = org.apache.cordova.battery.Battery
[0.0] Friday [2012-07-29 14:06:10.134]: Found plugin Media = org.apache.cordova.media.Media
[0.0] Friday [2012-07-29 14:06:10.141]: org.apache.cordova.CordovaExtension: invoking Cordova.onNativeRead[0.0] y.fire()
[0.0] FocusHistory: Focus lost; App Friday; Component blackberry.web.widgetc33b138a163847cdb6caeeb7c9a126b[0.0] 4package.loadingScreen.LoadingScreen

And then white screen. The application is fairly complex. I am using Lawnchair to save data in database which is working just fine in Android and iPhone. 

 

I don't know what else you need in order to lead me to the solution. Ask me any other details and I try and answer them.

My questions are: 

- Why doesn't the application load up in Torch 9800 properly every time?

- Why do I only see white screen on my Storm 9520 after launch on both device and simulator?

 

Your answeres are indeed appreciated.

 

Gabor

 

New Contributor
Posts: 9
Registered: ‎07-29-2012
My Device: Torch 9800
My Carrier: none

Re: Application created using html and js - issues

Additionally I hooked up my real Blackberry 9520 device with the debugger and ran the application. Result as usual (white screen after splash screen). here is the log:

 

[0.0] Starting Friday
[0.0] Started Friday(225)
[0.0] Foreground Friday(225)
[0.0] Detected background switch for net_rim_bb_ribbon_app(85) who has NO tunnels open - defocus NOT calle[0.0] d
[0.0] Detected foreground switch for Friday(225) who has NO tunnels open - focus NOT called
[0.0] FocusHistory: Focus lost; App net_rim_bb_ribbon_app; Component net.rim.device.apps.internal.ribbon.l[0.0] auncher.RibbonIconField
[0.0] FocusHistory: Focus gained; App Friday; Component blackberry.web.widgetc33b138a163847cdb6caeeb7c9a12[0.0] 6b4package.bf.BrowserFieldScreen
[0.0] FocusHistory: Focus lost; App Friday; Component blackberry.web.widgetc33b138a163847cdb6caeeb7c9a126b[0.0] 4package.bf.BrowserFieldScreen
[0.0] TID:unable to execute in the app blackberry.web.widgetc33b138a163847cdb6caeeb7c9a126b4package.Widget[0.0] @ad322891|java.lang.Object@1128ebc4|-1
[0.0] FocusHistory: Focus gained; App Friday; Component blackberry.web.widgetc33b138a163847cdb6caeeb7c9a12[0.0] 6b4package.loadingScreen.LoadingScreen
[0.0] Friday [2012-07-29 16:51:33.835]: Logger enabled: GUID=142828802821, name=Friday
[0.0] Friday [2012-07-29 16:51:34.458]: Found plugin App = org.apache.cordova.app.App
[0.0] Friday [2012-07-29 16:51:34.473]: Found plugin Device = org.apache.cordova.device.Device
[0.0] Friday [2012-07-29 16:51:34.487]: Found plugin Camera = org.apache.cordova.camera.Camera
[0.0] Friday [2012-07-29 16:51:34.502]: Found plugin NetworkStatus = org.apache.cordova.network.Network
[0.0] Friday [2012-07-29 16:51:34.515]: Found plugin Notification = org.apache.cordova.notification.Notifi[0.0] cation
[0.0] Friday [2012-07-29 16:51:34.531]: Found plugin Accelerometer = org.apache.cordova.accelerometer.Acce[0.0] lerometer
[0.0] Friday [2012-07-29 16:51:34.548]: Found plugin Geolocation = org.apache.cordova.geolocation.Geolocat[0.0] ion
[0.0] Friday [2012-07-29 16:51:34.563]: Found plugin File = org.apache.cordova.file.FileManager
[0.0] Friday [2012-07-29 16:51:34.576]: Found plugin FileTransfer = org.apache.cordova.http.FileTransfer
[0.0] Friday [2012-07-29 16:51:34.589]: Found plugin Contacts = org.apache.cordova.pim.Contact
[0.0] Friday [2012-07-29 16:51:34.603]: Found plugin Capture = org.apache.cordova.capture.MediaCapture
[0.0] Friday [2012-07-29 16:51:34.615]: Found plugin Battery = org.apache.cordova.battery.Battery
[0.0] Friday [2012-07-29 16:51:34.627]: Found plugin Media = org.apache.cordova.media.Media
[0.0] Friday [2012-07-29 16:51:34.643]: org.apache.cordova.CordovaExtension: invoking Cordova.onNativeRead[0.0] y.fire()
[0.0] JVM: bklt @85871101: timer
[0.0] JVM: bklt[1] @85871101: idle 5
[0.0] JVM: bklt @85871101: setTimer 5
[0.0] JVM: bklt @85876101: timer
[0.0] JVM: bklt[1] @85876101: idle 10
[0.0] JVM: bklt @85876101: setTimer 10
[0.0] FocusHistory: Focus lost; App Friday; Component blackberry.web.widgetc33b138a163847cdb6caeeb7c9a126b[0.0] 4package.loadingScreen.LoadingScreen
[0.0] JVM: bklt @85883007: timer
[0.0] JVM: bklt[1] @85883007: idle 10
[0.0] JVM: bklt[1] @85883007: enableBacklight 0
[0.0] JVM: bklt[1]: setTimeout 20

Developer
Posts: 434
Registered: ‎07-23-2012
My Device: Blackberry 10
My Carrier: Orange

Re: Application created using html and js - issues

1. are you aware of webworks?

2.  Copy and paste content of your config file ?

Thanks
-------------------------------------------------------------------------------------
Press the Accept as solution Button when u got the Solution
Press Kudo to say thank to developer.
-------------------------------------------------------------------------------------.
Developer
Posts: 434
Registered: ‎07-23-2012
My Device: Blackberry 10
My Carrier: Orange

Re: Application created using html and js - issues

If u don't want to share your config file content than check are u using <feature id> Tag??

Thanks
-------------------------------------------------------------------------------------
Press the Accept as solution Button when u got the Solution
Press Kudo to say thank to developer.
-------------------------------------------------------------------------------------.
New Contributor
Posts: 9
Registered: ‎07-29-2012
My Device: Torch 9800
My Carrier: none

Re: Application created using html and js - issues

[ Edited ]

@kamal_nigam:

Thank you for your reply.

Do you mean the config.xml file that is packaged and uploaded to phonegap in order to generate the native apps?

Developer
Posts: 434
Registered: ‎07-23-2012
My Device: Blackberry 10
My Carrier: Orange

Re: Application created using html and js - issues

yes.

Thanks
-------------------------------------------------------------------------------------
Press the Accept as solution Button when u got the Solution
Press Kudo to say thank to developer.
-------------------------------------------------------------------------------------.
New Contributor
Posts: 9
Registered: ‎07-29-2012
My Device: Torch 9800
My Carrier: none

Re: Application created using html and js - issues

My config.xml looks like this:

 

 

<?xml version="1.0" encoding="UTF-8"?>
<widget xmlns = "http://www.w3.org/ns/widgets"
xmlns:gap = "http://phonegap.com/ns/1.0"
id = "com.adorecms.friday"
versionCode ="1"
version = "1.0.0">

<name>Friday</name>

<description>
</description>

<author href="http://adorecms.com/"
email="xxxxxx@yahoo.co.uk">
xxx xxxx
</author>

<preference name="disable-cursor" value="true" />
<preference name="android-installLocation" value="auto" />

<!-- iPhone specific icons -->
<icon src="icon-iphone1.png" gapSmiley Tonguelatform="ios" width="57" height="57" />
<icon src="icon-iphone2.png" gapSmiley Tonguelatform="ios" width="72" height="72" />
<icon src="icon-iphone3.png" gapSmiley Tonguelatform="ios" width="114" height="114" />
<!-- Android specific icons -->
<icon src="icon-android1.png" gapSmiley Tonguelatform="android" gap:density="ldpi" />
<icon src="icon-android2.png" gapSmiley Tonguelatform="android" gap:density="mdpi" />
<icon src="icon-android3.png" gapSmiley Tonguelatform="android" gap:density="hdpi" />
<!-- Blackberry specific icons (Must be smaller then 16k) -->
<icon src="icon-blackberry.png" gapSmiley Tonguelatform="blackberry" />
<icon src="icon-blackberry_hover.png" gapSmiley Tonguelatform="blackberry" gap:state="hover"/>

<!-- Splash screens must be in png -->
<!-- iPhone specific splash screens -->
<gap:splash src="splash-iphone1.png" width="320" height="480" />
<gap:splash src="splash-iphone2.png" width="640" height="960" />
<gap:splash src="splash-iphone3.png" width="1024" height="768" />
<gap:splash src="splash-iphone4.png" width="768" height="1024" />
<!-- Adnroid specific splash screens -->
<gap:splash src="splash-android1.png" gapSmiley Tonguelatform="android" gap:density="ldpi" />
<gap:splash src="splash-android2.png" gapSmiley Tonguelatform="android" gap:density="mdpi" />
<gap:splash src="splash-android3.png" gapSmiley Tonguelatform="android" gap:density="hdpi" />
<!-- Blackberry specific splash screen -->
<gap:splash src="splash-blackberry.png" gapSmiley Tonguelatform="blackberry" />

<feature name="http://api.phonegap.com/1.0/network"/>

</widget>

Developer
Posts: 434
Registered: ‎07-23-2012
My Device: Blackberry 10
My Carrier: Orange

Re: Application created using html and js - issues

We never upload zip file at phonegap for compiling the apps. We are using webworks and I feel phonegap (at backend) using the same process. I feel these element should be part of you blackberry platform
<feature id>
<rimSmiley Tongueermissions>
<icon src="icons/example.png"/>
<content src="index.html" rim:allowInvokeParams="true"/>
Etc.
Explore following sites
https://developer.blackberry.com/html5/documentation/code_sample_creating_a_bb_widget_config_documen...

 

One more thing can you please check with event log (type alt lglg @ home screen you will got to event log screen and apply filter for you application

 

Thanks
-------------------------------------------------------------------------------------
Press the Accept as solution Button when u got the Solution
Press Kudo to say thank to developer.
-------------------------------------------------------------------------------------.
New Contributor
Posts: 9
Registered: ‎07-29-2012
My Device: Torch 9800
My Carrier: none

Re: Application created using html and js - issues

[ Edited ]

Thank you for your reply.

 

On phonegap build, when you click NEW APP. You can select an upload method "upload an archive or an index.html file". When I upload the application zipped into one file containing the above config.xml file phonegap takes care about the rest.

 

About the link you sent me: Does phonegap require that file? I can see know requirements about this kind of config.xml. I follow the instructions outlines here: https://build.phonegap.com/docs/config-xml

 

I might be able to insertthe namespace and the different BB specific tags, but the question remains: Will phonegap ignore those tag because they are not supported? I believe they would be mentioned in their conig.xml documentation.

 

EDIT:

How do I press alt + lglg on a Storm? It has no physical keyboard. If I type it in the search nothing happens. I can see the log with Torch

 

Regards,

Gabor

Developer
Developer
Posts: 607
Registered: ‎04-29-2011
My Device: PlayBook 16GB, BB10 LE Z10 (red)
My Carrier: none

Re: Application created using html and js - issues


GaborP wrote:

Thank you for your reply.

 

On phonegap build, when you click NEW APP. You can select an upload method "upload an archive or an index.html file". When I upload the application zipped into one file containing the above config.xml file phonegap takes care about the rest.

 

About the link you sent me: Does phonegap require that file? I can see know requirements about this kind of config.xml. I follow the instructions outlines here: https://build.phonegap.com/docs/config-xml

 

I might be able to insertthe namespace and the different BB specific tags, but the question remains: Will phonegap ignore those tag because they are not supported? I believe they would be mentioned in their conig.xml documentation.


For a WebWorks app to get started I think it is essential to add the content tag to locate your file to be started/loaded after the app was initialized:

 

<content src="startpage.html" />

Since it seems missing in your config.xml it might not load any content. The startup handlers in Android/iOS/... might work different since they use any "index.html" in the "assets" or "www" folder, but BlackBerry might not work without it. Give it a try and add it to the config.xml to see if this is the magic you need to get it working!


"Like" if you liked the post.
"Accept as Solution" if the post solves your question.