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
Philipk
Posts: 676
Registered: ‎05-06-2012
My Device: Dev Alpha & PlayBook

Re: Data based URLs

PM your app store email and I'll sandbox you so you can see the issue
_________________________________________________________
co-founder of Diaree | BB Dev for PictureThis
Developer
peardox
Posts: 1,229
Registered: ‎03-20-2011
My Device: Playbook, Z10 LE, Dev Alpha B, 2x Dev Alpha C

Re: Data based URLs

OK Phil

 

Once I know what you're trying to do I may have less wishy-washy answers




Click the like button if you find my posts useful!
Developer
peardox
Posts: 1,229
Registered: ‎03-20-2011
My Device: Playbook, Z10 LE, Dev Alpha B, 2x Dev Alpha C

Re: Data based URLs

OK - I know what Phil's after now so here's the problem

 

You have a small amount of text to transmit to the user but you can't be sure that you're online

 

This is a situation that happens a lot - SMS is the most obvious example like that I can think of

 

In cases like this you need to know something has happened so that you can try again if it fails

 

A simple example would be to use local storage (LS for brevity) - here's how that scanario would go

 

1) write a JSON record to LS

2) try to send it

3) did it go?

 

Depending on the answer to (3) leave it where it is in LS (failed) or delete it from LS (went)

 

This provides any app with resiliance when transferring information to an external source

 

The important thing is catering for the cases where your initial message didn't get through and you have to cater for as many as viable

 

Things that can go wrong are numerous, the worst example I can think of is that the server and device are up but the signal is bad so it gets garbled on the way.

 

For this reason I would suggest hashing your data before send then get the endpoint to reply with its own hash of the data it got - compare the numbers, if same it got thru

 

I would also number the messages sent as you may send more than one at the same time and you won't know which one comes back first

 

For failed messages you need to try resending them every so often

 

Basically everything lives on the device until it's hit somewhere you know it can reliably be transferred from

 

Once it's gone, remove it from LS and forget about it

 

 




Click the like button if you find my posts useful!
Developer
Philipk
Posts: 676
Registered: ‎05-06-2012
My Device: Dev Alpha & PlayBook

Re: Data based URLs

Seems pointless to connect to a server. Sending data from the device to the server and back to the device?

 

I think I used filesystem api in the past to save a Base64 so maybe that code can be modified for CSV.

 

It would be awesome if in the future BlackBerry allowed you to invoke the browser with a datastring.

_________________________________________________________
co-founder of Diaree | BB Dev for PictureThis
Developer
peardox
Posts: 1,229
Registered: ‎03-20-2011
My Device: Playbook, Z10 LE, Dev Alpha B, 2x Dev Alpha C

Re: Data based URLs

We can continue this in private if you like but the above is your basic method of knowing it went thru.

 

Obviously the download button on your app wants to transfer data [somewhere] and not back onto the device

 

If you simply ask me the Q you want answered :smileyhappy:

 

Handshaking is extremely important.

 

Send a message and confirm reciept of the message without ambiguity - the reply is small regardless of the size of the sent data

 

For example, we've got that encryption extension on git now - that would quickly calc a MD5 / SHA1

 

You're after hash compare ONLY

 

I could send a gig to a server and know it arrived simply via a hash returned via AJAX

 

I don't see the problem

 




Click the like button if you find my posts useful!