Sound recording can be done by using RecordControl
. Series 40 platform supports sound recording from 3rd Edition, Feature
Pack 1 onwards. You can check the support by using the
following system properties:
supports.audio.capture
- for audio recording
These properties return true
if recording
is supported.
When creating a Player
for audio capture,
or specific capture, the locator URL must be used as a parameter to
the createPlayer
method of the Manager
class. The following code line creates a Player
instance for audio capture:
Player p = Manager.createPlayer("capture://audio");
Camera snapshot for pictures or audio recording use the following locators:
Photo capture locator:
capture://image
Audio capture locator:
capture://audio
You can also define the exact recorded media type to the locator URL. The supported parameters vary between platforms and devices. Note that SDKs might not support capture features at all, so testing should be done with the actual mobile devices. For further details about recording, check the (JSR-135) Mobile Media API.