Regarding caching of images from server for reload
Hi,
My application in AS 2.0 (FL 3.0) takes a lot of time to load images from the server and if any other operation is performed while the loading, i get the error:"Unable to load data". Is it possible to cache the images when loaded once and then use from the local cache? Also, if caching is possible, how should i make sure that all that is cached is emptied while application uninstallation from the phone.
Regards,
Supriya Tenany
Re: Regarding caching of images from server for reload
The only way to store local data (or cache) in pure flash app is by using sharedObjects which are quite limited in size i.e 4 KB. Second way , is by using Widgets which automatically cache some stuff for u (tested it with XML). Third way, is by using [URL="http://wiki.kunerilite.net/index.php?title=Upload/Download_plugin"]KuneriLite Download Plugin[/URL] .Fourth way, is to create ur own server or a plugin for API Bridge.
Best Regards,
SajiSoft
Re: Regarding caching of images from server for reload
Hi SajiSoft,
Amongst the possible methods you have suggested, using sharedObjects is not possible due to size. Kuneri doesnt work on my machine and above all, since I have the free version I do not think I can use KuneriLite Download Plugin either.
Also do you mean widgets using Carbide C++? If any other, please explain. How can I create my own server or a plugin for API Bridge? Does creating a server involve expenses?
Regards,
Supriya Tenany
Re: Regarding caching of images from server for reload
[QUOTE]Also do you mean widgets using Carbide C++? [/QUOTE]
By widgets i mean WRTs :).
[QUOTE]How can I create my own server or a plugin for API Bridge? Does creating a server involve expenses?[/QUOTE]
Creating your own local server can be hard if u r not good in Symbian C++ .However, creating API Bridge Plugin is somewhat less time consuming than a whole local server. For details , read here :
[URL="http://wiki.forum.nokia.com/index.php/APIBridge_Plug-in_API"]APIBridge_Plug-in_API[/URL]
Best Regards,
SajiSoft
Re: Regarding caching of images from server for reload
Hi SajiSoft,
How shall I package this plugin along with my SWF using the Helisso Packager? I am unable to use the Kunerilite, Carbide C++ or any other for creating an SIS. Above all, I have also read a discusstion thread stating that only textual data can be stored. How is it then possible to save images that take a long time loading from the server?
Regards,
Supriya Tenany
Re: Regarding caching of images from server for reload
Hello,
Maybe you could try Python for S60. Sample with source code here [url]http://www.swf2go.com/wiki/PyS60Sample_BeMyLips.ashx[/url]
Best,
// chall3ng3r //
Re: Regarding caching of images from server for reload
I am sorry for late reply, i just missed your question. You can pack the Api bridge and plugin in the sis file generated by Helisso after reading the blog about API bridge on my blog site. However, it is not true that u can save only textual data in case of a local server because u can code the local server to download images from the site and than load them in ur flash lite content using loadMovie APi.Now, come to the point , that why Challenger give u a link to an app which interlinks Python (local server)and Flash Lite , because python is quite easy than Symbian C++, therefore, i also suggest u to follow his link if u r a beginner to Symbian C++.
Best Regards,
SajiSoft
Re: Regarding caching of images from server for reload
Hi SajiSoft,
The essential question still remains for creating a local server on a mobile handset; how is it possible and how do we check for the removal of all downloaded images during installation as mention in the Symbian Signed test criteria. Also what changes to be made in my application code for the API bridge? I am unable to place the 'si' folder(import si.apibridge.*;) as the required path cannot be found in my CS4 installation.
Regards,
Supriya Tenany
Re: Regarding caching of images from server for reload
[QUOTE]how is it possible and how do we check for the removal of all downloaded images during installation as mention in the Symbian Signed test criteria.[/QUOTE]
Oops! I really forgot about this criteria :). Well! I think the content get automatically deleted if u place them in the application's private directory.So, if u download and keep the images in private folder of ur application than the images get deleted once the app is removed. Now, another issue, which may arise is that what if the swf is not allowed to read from applications private directory?. I think this issue will not arise if u use a Flash Lite Stub i.e the one provided by Kuneri Lite .However, u need few tests by urself before taking a look at this approach :).
[QUOTE]I am unable to place the 'si' folder(import si.apibridge.*;) as the required path cannot be found in my CS4 installation.[/QUOTE]
Just copy paste the si folder to the directory where u have ur current fla file & it will work.
Best Regards,
SajiSoft
Re: Regarding caching of images from server for reload
An interesting discussion. I also have the same issue to solve. The approach mentioned by Saji seems good. SWF can read from applicatiosn private data folder if deploayed using stub. This will take care of removal during uninstallation.
I will be writing the plugin for download. Supriya if you have already written the same, can you share your code? Else i will take it up. I have good symbian C++ background and love coding in it.
Ramesh
Re: Regarding caching of images from server for reload
Hi Ramesh,
I havent written the code. You can share with me at [email]supriyat@akgentertainment.com[/email]. Please also let me know the changes in packaging.
Thanks,
Supriya
Re: Regarding caching of images from server for reload
why not embed those images in application?
or if the images are not the same, why caching? try to make images smaller, for mobiles, not more than 640x360... and compress them...
I'll personally won't do any cache, and if I'll think about cache, I'll go with the widget solution (widget is like a html witch loads the swf... but all the load images form flash should be done with javascript too, kind of document.getElementById("IMG").src="http://domani/path/to/file/img.jpg"; )
Re: Regarding caching of images from server for reload
Embedding the images is not always an option. For example if you want to update the images for the new movie releases in the application, then only option is to fetch it from the server. Hence having a caching mechanism definitely helps.
Ramesh
Re: Regarding caching of images from server for reload
Hi Ramesh,
Earlier in this discussion you had mentioned coding for caching. Any breakthrough? I could successfully install the Carbide C++ and create a SIS, but the code is all latin and greek to me.
Regards,
Supriya Tenany
Re: Regarding caching of images from server for reload
I will be starting work on that soon. I will post the solution as soon as its done.
Ramesh