iMobile supports the collection of photos, audio and video, and records the latitude and longitude coordinates of the collection location, and can upload them to the designated iportal service. It also supports downloading data from iportal.
To realize multimedia collection, the required class libraries include com.supermap.data.jar, com.supermap.mapping.jar, com.supermap.services.jar, com.supe Rmap.mdatacollector.jar, so libraries include libimb2d.so, libgnustl_shared.so, libQt5Core.so, libQt5Gui.so, libQt5Svg.so , libQt5Widgets.so.
The key categories and methods are as follows:
Class | Method |
---|---|
MDataCollector | captureImage(), captureVideo(), startCaptureAudio(), stopCaptureAudio(), setLocalFilePath(), setM ediaDataset() |
Step 1: Set the collection parameters
//Set the path to store multimedia files locally
m_MDataCollector.setLocalFilePath("SuperMap/MediaTemp/");
// Set up the data set for multimedia acquisition
m_MDataCollector.setMediaDataset(m_Datasource, dvName);
Step 2: Multimedia Acquisition
(1) Picture collection
m_MDataCollector.captureImage();
(2) Video acquisition
m_MDataCollector.captureVideo();
(3) Sound collection
m_MDataCollector.startCaptureAudio(); //Start Recording
m_MDataCollector.stopCaptureAudio(); //End recording
For the above multimedia collection, please refer to the sample code MDataCollector.