I’m planning on making a touckit application (my first touchkit one. so i don’t know that much about the add-on) .
What it will roughly do:
In the app or in a desktop version of it you can upload audiofiles or link them (for example from soundcloud by using their API). The content of these files will be stored in the server. For example in a DataBase BLOB field. The user can then start the mobile/Touchkit version of this app, download/transfer all the audio to the client side so that when the user goes offline he can still play the audio. Not planning to have the audio stored in the phone, just available at runtime.
The upload/linking (in short: the desktop-) part should not really be a problem.
I now have some question on the touckit part:
To achieve the download/transfer to the client-side i had the idea on creating a custom component which has 2 states:
State 1: component shows a download button which triggers the audio to be collected on the server side and then either transfered using a AbstractComponentState class or a RPC and then stored in a client-side array variable.
State 2: Component shows some kind of Music Player interface (maybe using
gwt-sound
) which only operates on the client-side so that it works with a touchkit app which is offline.
- Is this way theoretically possible or/and is there maybe even a better way?
- What type should be used to transfer the audio to the client? maybe byte array?
- Is there anything special i have to keep in mind when making the custom component so that it works in a offline touchkit app?
I’m really interested to hear from anyone on that topic.
Thanks in advance,
Marius