07-03-2011 04:13 PM
I am building an application that will load a JSON configuration pulled from an external server via HTTP for each customer. I am planning on having the custom download the BB application from my website and I would like add a unique ID to their application so when they load it on the BBlackberry I can go to the server and download their personallized configuration.
I was hoping to have an XML file in my BB app that I could modify before they downloaded the app, but everything seems to be compiled and I can not change the applications configuration once build.
How can I set a unique ID into a compiled BB app so when it loads on the phone I know what user installed it to get their custom config from my server. Thoughts ?
07-03-2011 05:33 PM
Please treat these as suggestions/ideas as it is very late here and I'm quite tired. You could use the following as a unique device id, and request that the user input their pin when they download the application.
The other option may be to look at building the configuration at runtime if this is possible and storing it using the HTML5 local storage or SQL lite database. Either of these sound appropriate?
07-03-2011 05:41 PM
Thanks for the suggestions. The suggestion to use the users decive id wont work for me because the app will administered by one person, but shared through their group.
If i could build the configuration at run time it would work, but I am not sure if thats possible.
I thought of using the bbwp.exe to compile the code on demand on the server, but i have not dug that deep into it yet. I was hoping there would be an easier way (i.e an uncompiled .xml file or something)
07-04-2011 02:27 AM
I think you will struggle to use bbwp in an automated way for the following reasons:
You might be able to use the file API's to with a DOMParser to read and parse an xml file stored elsewhere on the playbook but the file APIs are not finalised yet. The other final option might be to write a custom Webworks extension as seen here: http://184.108.40.206/t5/Web-and-WebWorks-Developm
Hope this is of help.
07-04-2011 08:53 PM
Thanks for the info genration,
I am new a BB development so these concepts are new to me.
If i wrote an extension, does that code get compiled when i build the application?