Details
-
Type: New Feature
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 4.0
-
Component/s: MOBI-Components
-
Labels:None
-
Environment:Icefaces 4 trunk
-
Assignee Priority:P1
-
Affects:Documentation (User Guide, Ref. Guide, etc.), Sample App./Tutorial
Description
-
- CameraRenderer.java
- 6 kB
- Judy Guglielmin
-
- thumbnail.js
- 7 kB
- Judy Guglielmin
-
- ThumbnailMeta.java
- 2 kB
- Judy Guglielmin
-
- ThumbnailRenderer.java
- 6 kB
- Judy Guglielmin
Activity
- All
- Comments
- History
- Activity
- Remote Attachments
- Subversion
Tomcat 7, all browsers:
- Thumbnail image is not loaded when used with mobi:camera. After taking a photo, only a blank thumbnail image appears.
A test application located at: http://dev.icesoft.com/svn/repo/qa/trunk/Regression-Icefaces4/Sparkle/Manual/thumbnail
r42319: fixed thumbnail support for mobi:camera and mobi:camcorder.
Tested with Android 4.4.2 on Galaxy S4 mini and iphone ios 7 on iphone 4S.
The thumbnail still shows as a empty placeholder on the iphone.
The thumbnail appears the first time you run the test app on the Android. After using the camera, the mobi:camera button changes to Photo Captured and the Thumbnail appears. Once you click the Upload button the Thumbnail is now rendered as an empty placeholder. I am not sure if this is a problem with the test application or not.
Please see:
http://dev.icesoft.com/svn/repo/qa/trunk/Regression-Icefaces4/Sparkle/Manual/thumbnail
The problem is that the thumbnail data is provided by bridgeit after taking the picture, and then it's added as the src attribute of the thumbnail img element. When the picture is uploaded, it seems that the whole form is updated and thus the thumbnail data is lost. In order to preserve the thumbnail data it will be necessary to submit the data in the form and keep it on the server for future updates.
r42325: committed enhancement above to persist thumbnail image data across requests.
Testing r42325 with Android 4.4.2 device and camera test application. Thumbnail does not consistently render, sometimes a second photo must be taken before the thumbnail appears, or if the demo is run 3 or four times in a row the thumbnail stops appearing.
Testing with the camcorder test app has been unsuccessful. There was a thumbnail on the second upload attempt. Subsequent attempts leave bridgeIt in an endless submit mode.
Using thumbnail with camera and camcorder leaves files behind on the server.
Server messages such as this are seen:
Could not dispose of media file 'C:\Servers\apache-tomcat-7.0.42\temp\0-camera\uploads\4D452D64BAD259F6ADA7B5EEBAEDCB
Server warning seen when undeploying war file;
Aug 28, 2014 3:21:47 PM org.apache.catalina.startup.ExpandWar delete
SEVERE: [C:\Servers\apache-tomcat-7.0.42\work\Catalina\localhost\camera] could not be completely deleted. The presence of the remaining files may cause problems.
r42534: fix to flush and close the OutputStream for camera and camcorder uploads, in order to avoid file locks when disposing of uploaded files.
This fix takes care of the last two issues in the previous comment. Now the upload folder and uploaded files are disposed successfully when undeploying the app. However, the main app folder (e.g. /thumbnail) is not disposed successfuly (even when making sure that no other applications in the OS are accessing such folder). This happens even when doing a fresh deploy of the app and undeploying right away, without loading the app on any device. So, this seems to be an with with the app and/or Tomcat.
ICEfaces4 trunk revision# 42532 (thumbnail test application)
Nexus 5 (Android 4.4.4)
BridgeIt App 1.0.4-P3
I'm unable to get the thumbnail to render on my device at all using the thumbnail test app. It always renders as an empty white box. There is a JS error occurring after returning from the BridgeIt application:
Uncaught TypeError: Cannot read property 'substring' of undefined component.js.jsf?ln=org.icefaces.component.util&v=4_0_0_140909:925
Using camera and camcorder demos in showcase (ICEfaces 4 trunk r42540) also leaves behind files when un-deploying the .war file.
Sep 10, 2014 11:34:17 AM org.apache.catalina.startup.ExpandWar deleteDir
SEVERE: [C:\Servers\apache-tomcat-7.0.42\work\Catalina\localhost\showcase] could not be completely deleted. The presence of the remaining files may cause problems.
This is without the thumbnail involved. Using other demos then undeploying does not cause this same error.
Note that it appears that mobi:fetchContact showcase demo is also failing the first time it is invoked via a similar or possibly identical issue.
Modified CameraRenderer to delay the execution of the callback that updates the thumbnail until after the thumbnail markup is updated.
Re-open to apply this workaround to the camcorder renderer also.
QA for camcorder in thumbnail qa app r 39694
camcorder timeout on callback rev 43051
showcase updated to use thumbnail on camera and camcorder example r.43053
Tested with ICEfaces 4 trunk r43054. QA test applications run as expected. Showcase thumbnails are not functioning in the camera or camcorder demo unless the page is refreshed. At that time the thumbnail is displayed.
I noticed that the thumbnail was not being rendered as the ClientDescriptor (on first render) did not recognize bridgeIt was present when it was not loaded already in the head for the first request of the page . Not a problem in the QA app, so strange-just a problem in showcase. Commented out the check for icemobileSX or container, and made renderThumbnail true all the time and although it renders the required markup, it still would not render the thumbnail until a GET was performed (similar to FetchContact). Once a GET is performed (page reload), then thumbnail works every time (as does fetchContact).
New mobi:thumbnail component added in svn rvn#39804.