1

I have 2 weird behaviors, and I think they might be related, but I am not sure..

1) In my phonegap app (Remini), local offline images (icons) sometimes (not always) are not loaded/displayed on Android 4.4.2. For example Look at the difference between the two screen shots:

The screen as it supposed to look

The screen on Android 4.4.2

2) The second problem (in the same Android 4.4.2), is that I when the user picks an image from his gallery (using a non-standard image picker plugin for phonegap), sometimes, the image simply doesn't load. The image paths / URIs are returned to the javascript correctly, and when I am trying to assign these to an .src, the onload event doesn't fire.. In other (lower) versions of Android it worked just fine. Now in order to prevent some anticipated comments - My img.onload event is defined before the img.src assignment, and the plugin works correctly on other versions..

Now, I am not sure the problems are related, but in both cases, there is an unloaded image element, although with different sources..

Does anybody know one of these problems? Are these related?

doron
  • 251
  • 4
  • 12
  • "I when the user picks an image from his gallery (using a non-standard image picker plugin for phonegap)" which one? – jcesarmobile Jul 13 '15 at 07:50
  • A custom made one, Which is based on the phonegap standard camera plugin, only allows multiple selection, and solves the crashing problem of Android 4.1.2 - [link](http://stackoverflow.com/questions/8368091/phonegap-camera-restarts-the-application?lq=1) – doron Jul 13 '15 at 14:13
  • the plugin return conten:// urls? I think you can't use those urls on img tags – jcesarmobile Jul 13 '15 at 14:48
  • But it does work. Sometimes.. and sometimes it doesn't, same as the icons, which looks like this `` – doron Jul 14 '15 at 11:03
  • the icons thing is strange, they should load always if they are inside the www folder, but the the plugin problem might be that some times you get a content:// url and some other times you get a real url. Or you get that problem selecting the same image? – jcesarmobile Jul 14 '15 at 11:08
  • Thanks, well, the icons are in the www/img folder. and the images from the library are resized by the plugin, and then saved in a temporary location. but it does happen with the same exact image.. sometimes it works and sometimes it doesn't.. – doron Jul 15 '15 at 06:00

0 Answers0