J2ME cache issue - image

I have to write a J2ME app to retrieve images from server and display in mobile phone.
I have seen and test that Snaptu have a mechanism to cache image, event with 100 images (both normal size and zoom size). I wonder how they can do that?
I though that those guys use rms to save image stream to data. But when i check in working folder of simulater( I use Windows XP and Sun Wireless Toolkit 3.0, the Emulator device i use to run my program is CLDC Device 1 - my working folder is C:\Document And Settings\Administrator\javame-sdk\3.0\work\6\appdb), i see some .db file. When i delete these files, i still can view cache image in my emulator????
I also thought that those guys use heap memory to save image. But it is not correct because when i set limit device memory is 2MB (like some mobile phones), and i load and view 100 images in zoom size, it didn't make OutOfMemory Error?
It so weird.
Any one can help me? Thanks

RMS is possible solution for trusted and untrusted MIDlet.
JSR-75 file connection is possible solution for trusted MIDlet only. You can't create file if your app is untrusted.

Related

Faster image upload on mobile

So, for my wordpress mobile site, there is a button to upload an image (either from camera or phone gallery).
However since the size of mobile images are well over 3 MB, it takes too long to upload them.
Is there a way to reduce the image size before the upload even happens? or to speed up the uploading process.
Thank you guys!
Yes, you have some solutions:
Compress image before send; open image in your graphic editor and save as JPEG or PNG with lower quality; file will be <3MB
Upgrade your home internet - upload parameter is important here
Upgrade your server plan - maybe you can have better network connection.
You can't make it faster by changing the code or something.

Image size reduces while it send through "ShareMediaTask" in windows phone 8

In my image editing application i am providing two option to the user, 1) save image to Media library and another share it through ShareMediaTask. The issue i am facing is while saving the image to library the size of the image is 1.5 mb. If i share the same image through ShareMediaTask(Gmail / Hotmail etc) The size of the image reduces to 330 Kb. Hence it affects the quality of the image. How i can share the same image in Media library without losing the size and quality in windows phone 8.
I also tried the same share through library (ie without using my application). Still the result is same.
If anyone had a solution to this issue please update your suggestions.
Thanks,
Stez.
The email application automatically downscales images, there is no way to control this. An alternative solution would be to, eg, upload the image to Skydrive and email the link.

What is the best image size to use on mobile devices? (HTML)

I would be using Google for this, but it would display outdated info, and that's not what I want.
Basing from statistics of 2012,cellphones and tablets have shifted the way we interact with websites. Due to that, I'm planning going fully mobile and I would like to know which is the "standard" image size I should implement (for mobile display only) so they don't slow down cellular connections and the browsing session. Of course... they shouldn't look crap either
Thanks a lot!
40 kb seems to be best images sizes all images used in your original website should be reduced from the original size to this size. as most mobile devices will not be compatible with any image size bigger than this.

equivalent of setidletimerdisabled in windows phone 7 to prevent the phone screen from getting locked

Is there a way to prevent the screen from getting locked while the app the running(basically while downloading) ??
Use of ApplicationIdleDetectionMode lets the app be running when the screen gets locked but on screen lock also wi-fi gets disconnected which is essential for the app to be running !!
You might be able to use PhoneApplicationService.UserIdleDetectionMode :-
http://msdn.microsoft.com/en-us/library/microsoft.phone.shell.phoneapplicationservice.useridledetectionmode(v=vs.92).aspx
For additional information the following thread may help :-
http://social.msdn.microsoft.com/Forums/is/windowsphone7series/thread/c38d897f-afb6-48ab-a2d0-57ebbb632dae
Instead of preventing the phone going to the lock-screen you should better use the new (7.1) BackgroundTransfer-Agent. There are a few restrictions (maximum of 5MB upload, files larger than 20MB require WiFi instead of mobile-data, files larger than 100MB require the phone to be connected to a external power source), but is the recommend method for uploading / downloading larger files with Windows Phone. Also your app doesn't have to be running in foreground when using this service.
More information:
Background File Transfers Overview for Windows Phone
BackgroundTransferRequest Class documentation

Images in Browsers

Does anyone know why sometimes when you right click on an image in a browser (IE, FF or Chrome), and save the image on your hard drive, you get a different file size image and lower quality than the original image you uploaded to the server? This happens even if you clear the browser cache.
What is strange is that it doesn't happen all the time. What is stranger is that I wrote a simple html page with a link to the image. I right clicked on the link and saved the target image. It saved it with the original size and quality. However, a little later, I tried saving the same image again, the same exact way, I got the lower quality image with the reduced file size.
I know it's not an issue with my PC because the same thing happens on my phone (Droid X) browser. When I save an image into its memory from the browser, it is lower quality and reduced file size.
The lower quality image file size is usually a little bigger than half of the original image file size.
What is going on?
UPDATE AND ANSWER:
My problem was caused by Verizon Wireless compressing images through its network: http://www.macobserver.com/tmo/article/verizon_starts_data_throttling_content_optimization/
I was occasionally tethering using a MiFi device and was apparently in the top 5% of bandwidth users. Therefore, images downloaded through the MiFi into my laptop and on my Droid X were being compressed through the network. The browser was caching the "bad" images, so they appeared compressed even when I was on a different network, making it harder to for me to troubleshoot what the heck was going on. I hope my answer helps others.
I don't want to get credit for my own answer, so I am changing this to a different question: Since a lot of people use such wireless networks now on their mobile phones and through tethering, should web developers test their sites for such use to account for the image loss? Sometimes the image loss is considerable. If so, how do we do it if this occurs only during certain periods of the month for only certain users? What compression algorithm are they using? Can we emulate the compression?
My problem was caused by Verizon Wireless compressing images through its network (see the edit to my question). This problem no longer exists with newer devices (or perhaps Verizon has abandoned this practice).

Resources