Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.
File size using RecordControl.setRecordSizeLimit(Integer.MAX VALUE) not set accordingly in Series 40 (Known Issue)
Series 40 3rd Edition, FP1
Series 40 5th Edition
Series 40 5th Edition (initial release)
Series 40 3rd Edition FP2
Series 40 3rd Edition FP1
Series 40 3rd Edition (initial release)
File size is not set to the maximum size available in Series 40 when using RecordControl.setRecordSizeLimit(Integer.MAX_VALUE).
When using RecordControl.setRecordSizeLimit(Integer.MAX_VALUE), the file size of the recorded video should be set to its maximum, enabling video recording longer than one minute. However, in Series 40 devices prior to Series 40 5th Edition, Feature Pack 1, the MMAPI player records only for a couple of seconds and exists then abruptly when the value Integer.MAX_VALUE is used.
How to reproduce
- To reproduce this issue, implement the source code available at: File:Video recorder file size test MIDlet using MMAPI.zip
- Install and launch the MIDlet in the test device. The MIDlet starts to record video and stops recording within a couple of seconds.
For the affected devices, the workaround is as follows:
- Modify the example MIDlet's source code by removing the following lines:
- Replace the removed lines with these lines:
int size = (int) fc.availableSize();
if(size < 100*1024) // if less than 100Kb available
Alert memoryAlert = new Alert("Error", "Not enough memory", null, AlertType.ERROR);
rc.setRecordSizeLimit(size - 100*1024); /* set the record size limit
based on the free memory in the video folder, leave 100Kb available to the system */
- Install and launch the MIDlet using a test device. The MIDlet starts to record video and stops when it reaches the file size defined in the previous step.