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
Developer
Posts: 58
Registered: ‎02-14-2011
My Device: Bold 9700
My Carrier: Rogers

Re: POST/READ data to PHP/MYSQL on webserver

[ Edited ]

Ok will try the above code and report back... As for the base64 it seems the json encoding is changing the base64 string ?!? Here is the base64 from the json string(which does not work) :

 

iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAIAAAABc2X6AAAQi0lEQVR4nO1aaXhUVZo+5251a0stqaSSSipLJaFCEpIQiSwJiPI44sYiAbe2FbX1kbaxR+1H2z\/qr+lBbXtmbGbmeabpkQFFBUVEwAiCgAESAoIsCUtCFgghldR66+7nzI8bKkVlYUnS7fN03h+V+5669zvfd77vvOfcU4EIIXAVEEIAAMYYQqh93jLVrP0cqfYn5rGG2K3xLTGa8O1gOtyDN0vHAwTGOBZzQq+x9oQb4r8dksYeGSUd7NjoKdRKOpbxG0HCzeNHxwNUfDdDTktwAzUMxqGkb7ygborC+KT\/nOfeWGFgDidgNKWYYPBnRQkwDIbLIb6KIWnM7uiVZpykixpySEaeCcONX\/wAJVT4rdExnGUxSkA4MJO16\/iO40Md7tvBTo+hUCfMuNHTGxWtvwvGI8MwNgNHWBJAXJJvhP6cQSVMaw0J8ccawc3M89EX9o1uj2+GEgnuJtS9hsEtw2FMtGq4fseEjiRaQz55IxjbsMcW\/3CiNbDxSNhmDu77b0\/HcHkbqOLBBwBgkBSBOB0eQQ+GvP+W6ThhaNHqX7Ju0t14Iwk2b43GMIZ0QrSuYkK0JkRrQrQmRGsM6JhjWNFKwHjox43QMQd1\/VtuGPFzIb4yR0MT1GH0lBqyYgeLUCyeWFSD6WgHbBgfxpZecxA\/5MDEWq47iuOqrmMFiBCCEAqC0NTUhBAym80ej4cgBtQ7IaVgxFSPbQWOXFDXpbIsNzc3S5JkNpvz8\/P7LWsrwSuvvFJ9x9xpM2YZrPZNmzapqooQwnH4e9HRYMWKFbN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OBQwh7O7urq+v/6a21mAyz5g7b2vd4cb6gyDge/axZfPnz58+fXpqamr8MqblQ/OK53lRFGVZ1sqTYRiWZY1Go16v1+l0Wg0nrIIjnWnF9xG/FMM4xA9W7AZZll97/fXVG7+iCqeZcyblWAwpcijU2hTu7pKFaLLNZkmyAAgikYg/EEiyWHPzC/K8k1u7ur/dX9d1oRVFgg/cNWfBggVTpkwpLi42GAxgKMQfbsR8iJXucLhGtAYHfMtnWhzHvfPuu6v+/F/ImUOlZZnsjgxbksvMOvW0DmAKIIokGYYBJHXFH2ht72g6fcp3+TISeUriH3rw/rlz52ZnZ0+dOtXhcGgzeYROb4qO10E8xpjjuIaGhn9dtWr/4aMizRImGzSYIMUQJEETEKqKKAiqEEU8hwUOi7yOAFOLi+6///6UlBSPx1NUVJSSkkJR1Niey/dnOMHp+CJJoIPzf425uFRrGuPz+Y4dO7Znz57v9+1vae8QVVVBGGEAMCYAIAmgI4nszMypZaVFRUU2m81qtebm5ubm5losFu2FPKF8RkkTfyIdMoaRhyD+2YTh1AQmHA77/f5gMBgIBDo6Onw+XyQSQQjRNG0ymbS9KkEQFoslLS0tLS3NarWyLBuzlpCGUdLE/4gfPBtvAQmPa8eXgiBwHMdxHM/zgiAoihKTVoPBYDQaTSaTXq+nKErT/Fs7yr4uHS/RGm4uoKuIfUVcRUJKx0qlEug/3K+HxJClm7C+aRexz+Fo7CI+vaOkN9j1jdPxFa1RYkxUKoH+LUTr1ug4iRYxuI/Bt0IIB18MSWOPx766ZRrvw1jSCdHq73VCtCZEa3hMiNaEaE2I1oRoXePSGNIJ0Yobj1jLhGhNiNaEaI0JJkRrQrQmROu6mBCtCdG6BUyI1s9ItP4f2VOIo0ppbEsAAAAASUVORK5CYII=

 These strings are the same until

/qr+

and then they change. I might need to do a seperate request with proper encoding to send the base64 through json...Or I could always just do a single xmlhttp request...

 

So yes, I think the issue was with the base64 string which was being passed through json. I will figure out either the proper json encoding or use the xml request, either way I'll report back with these results aswell. 

Developer
Posts: 58
Registered: ‎02-14-2011
My Device: Bold 9700
My Carrier: Rogers

Re: POST/READ data to PHP/MYSQL on webserver

[ Edited ]

Hello Erik, 

 

function ready() {
			blackberry.system.event.onHardwareKey(blackberry.system.event.KEY_BACK, backKeyCall);
			window.removeEventListener("DOMContentLoaded", ready, false);
		}
		
		window.addEventListener("DOMContentLoaded", ready, false);

 

Does make the app close on the  OS6.0.0.337 9800 simulator right after the splash screen. The solution which I had working was once the database was opened and variables were populated from the db then to call:

 

blackberry.system.event.onHardwareKey(blackberry.system.event.KEY_BACK, backKeyCall);

 However that seemed to only resove the issue with .337 the issue with .668 was that it would call the openDB(); function but not process any further....no exceptions or errors were thrown...it seems to just hang...the device is still functional I can switch between apps etc...

Retired
Posts: 1,561
Registered: ‎04-12-2010
My Device: BlackBerry Z10
My Carrier: Bell

Re: POST/READ data to PHP/MYSQL on webserver

As for the encoding, from what I can tell the JSON String is inserting escape characters for the / symbol. Basically, whereever there is a /, it is converted to: \/

 

It could simply be a matter of making a call to replace and providing a regular expression for the those symbols. The documentation here outlines how to replace "all" through regular expressions and the g parameter:

http://www.w3schools.com/jsref/jsref_replace.asp


Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.
Retired
Posts: 1,561
Registered: ‎04-12-2010
My Device: BlackBerry Z10
My Carrier: Bell

Re: POST/READ data to PHP/MYSQL on webserver

With respect to registering the back key, that is a little troubling. I think the best course of action would be to hook up Web Inspector and step through the code (to see exactly what is / isn't getting executed, and also identify the line of code that hangs. Have you used Web Inspector yet?


Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.
Developer
Posts: 58
Registered: ‎02-14-2011
My Device: Bold 9700
My Carrier: Rogers

Re: POST/READ data to PHP/MYSQL on webserver

I have used web inspector through google chrome in the ripple emulator. It is very odd, sometimes it shows 'blackberry is not defined' and also 'Unexpected Identifier' for the doctype. I am using <!DOCTYPE html> to define html5 and I also have blackberry.app, blackberry.system and blackberry.system.event in my config file.

 

The other error it throws is in the html5_worker.js file 'Reference Error: google is not defined'. This is the line of code in the html5_worker.js file that its throwing:

varwp = google.gears.workerPool;

 

 

Retired
Posts: 1,561
Registered: ‎04-12-2010
My Device: BlackBerry Z10
My Carrier: Bell

Re: POST/READ data to PHP/MYSQL on webserver

Hello Justam,

 

That certainly is the correct doctype. I've found that sometimes placing your config.xml into the root folder of your web server will make a difference when accessing your application via Ripple; this may prevent the 'blackberry is not defined' error. There are also some APIs which may not be supported in Ripple; but for those I would expect a different error (i.e. blackberry.something is undefined.)

 

Just to confirm, you are including the html5_worker.js file because you have 5.0 devices to support as well with Gears APIs?


Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.
Developer
Posts: 58
Registered: ‎02-14-2011
My Device: Bold 9700
My Carrier: Rogers

Re: POST/READ data to PHP/MYSQL on webserver

I am using ripple on my http web server through godaddy, i couldn't get the local web server to work with the chrome extension. Also the standalone ripple sim gives me a C++ error....very odd because it was working then just stopped. 

 

Yes html5_worker.js is included because I would like to support os5 devices.

Retired
Posts: 1,561
Registered: ‎04-12-2010
My Device: BlackBerry Z10
My Carrier: Bell

Re: POST/READ data to PHP/MYSQL on webserver

With respect to html5_workers.js, can you confirm that you have followed the Getting Started instructions here:
http://supportforums.blackberry.com/t5/Web-and-WebWorks-Development/Supporting-Gears-using-HTML5-in-...

Specifically that in your code, you are using the HTML5 calls; not the Google Gears calls. html5_init.js should take care of switching between HTML5 (OS6+) and Gears (OS5). If you are using workers, then that is the only time that html5_workers.js should really be included, and should only be invoked on a 5.0 device.

If it is being called on a 6.0 device, we will need to trace what exactly is invoking the call. On a 6.0 device that becomes a lot tougher, since we can not hook up Web Inspector to live devices prior to 7.0.

Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.
Retired
Posts: 1,561
Registered: ‎04-12-2010
My Device: BlackBerry Z10
My Carrier: Bell

Re: POST/READ data to PHP/MYSQL on webserver

Actually, if:
varwp = google.gears.workerPool;

Is at the root level of the JS file, then it would be invoked when the script is loaded. On a 6.0 device, Gears isn't supported, which would explain the bombing out; resulting in the rest of the script not loading. However, since 6.0 does not make calls to gears (i.e. HTML5 is executed as HTML5, not converted) then I would say that this may even be able to be ignored.

For the 6.0 tests, it may be a good idea to simlpy comment out the Gears files to rule them out as a cause.

Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.
Developer
Posts: 58
Registered: ‎02-14-2011
My Device: Bold 9700
My Carrier: Rogers

Re: POST/READ data to PHP/MYSQL on webserver

I have tried that...I believe .337 is crashing because of the BACK_KEY code..I placed this after my initDB() call which initalises the db and reads/creates the table etc..

 

window.addEventListener("DOMContentLoaded", ready, false);

 in doing so, .337 does not crash, however even with html5_worker.js commented out .668 still does not load. Also there is no error in the System Log in the simulator.

 

Also my function to save the contact image seems to hang at this part:

 

var string=obj.base64.replace(/\//g,"/");
var pic =  blackberry.utils.stringToBlob(string, 'binary');
contact.setPicture = pic;