Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update #21

Merged
merged 41 commits into from
Nov 2, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
7f84d2b
Made ImageViewer background always transparent to avoid flicker when …
shannah Oct 2, 2019
8356011
Merge branch 'master' of https://github.com/codenameone/CodenameOne
shannah Oct 2, 2019
e5c2e40
Fixed setting the log file URL
shai-almog Oct 4, 2019
6a259af
Merge branch 'master' of https://github.com/codenameone/CodenameOne
shai-almog Oct 4, 2019
9d0369f
Update Jenkinsfile
shai-almog Oct 4, 2019
c42c106
Added AudioRecorderComponent that can be used for recording audio fro…
shannah Oct 7, 2019
bf480da
Merge branch 'master' of https://github.com/codenameone/CodenameOne
shannah Oct 7, 2019
92f9e67
Fixed issue with MediaPlayer when used with Audio-only media.
shannah Oct 7, 2019
3fc47e5
Fixed wayward event in sheet
shai-almog Oct 9, 2019
2456558
Merge branch 'master' of https://github.com/codenameone/CodenameOne
shai-almog Oct 9, 2019
1e02712
Simulator now remembers the bounds of itself, and will use those boun…
shannah Oct 10, 2019
4f30752
Merge branch 'master' of https://github.com/codenameone/CodenameOne
shannah Oct 10, 2019
0e43dfa
Another attempt to fix log
shai-almog Oct 11, 2019
70ae450
Merge branch 'master' of https://github.com/codenameone/CodenameOne
shai-almog Oct 11, 2019
7dc8a29
Improvements to simulator saving window bounds feature.
shannah Oct 11, 2019
f710dce
Merge branch 'master' of https://github.com/codenameone/CodenameOne
shannah Oct 11, 2019
ad1dbac
Changed CSS watcher to use a manual polling implementation that compa…
shannah Oct 11, 2019
6dd5610
Added filter to the skins installation menu so you can search for a s…
shannah Oct 11, 2019
2b3ba7d
Fixed issue with locales in iOS.
shannah Oct 15, 2019
fd2d832
Fixed issue with classpath loader that prevented child classloaders f…
shannah Oct 16, 2019
4a7f398
Fixed JavaDoc
shai-almog Oct 19, 2019
f5acd53
Added description label for on-top mode of text component
shai-almog Oct 20, 2019
5217de2
Added shorthand constraint syntax to the text mode layout
shai-almog Oct 21, 2019
7f1fe39
Initial implementation of AudioBuffer API, which can be used to captu…
shannah Oct 21, 2019
dd8eeac
Merge branch 'master' of https://github.com/codenameone/CodenameOne
shannah Oct 21, 2019
a0d7940
Added WAVWriter class for writing raw PCM data to WAV file format. T…
shannah Oct 21, 2019
da64ac1
Fixed issue with AudioBuffer on iOS not working after playing media.
shannah Oct 22, 2019
57ef476
Fixed password text component
shai-almog Oct 22, 2019
806f2f7
Merge branch 'master' of https://github.com/codenameone/CodenameOne
shai-almog Oct 22, 2019
42031a1
Fixed issue with toolbar expanding in some special cases. The test c…
shannah Oct 22, 2019
27cf911
Merge branch 'master' of https://github.com/codenameone/CodenameOne
shannah Oct 22, 2019
6de6be1
Added low level usage example.
shannah Oct 22, 2019
411f71b
Fixed issue with SwipeableContainer entering undefined states if user…
shannah Oct 23, 2019
54230d6
Fixed an issue with infinite loop of pointerDragged in some cases.
shannah Oct 30, 2019
9b5bd03
Added Rectangle.equals()
shannah Oct 31, 2019
84c6aaf
Slightly improve overhead for revalidateWithAnimationSafety so taht w…
shannah Oct 31, 2019
39e0f4a
Added public methods to Component to retrieve bounds to a Rectangle.
shannah Oct 31, 2019
538735f
Fixed regression in setFileURL
shai-athena Nov 1, 2019
2edd683
Merge branch 'master' of https://github.com/codenameone/CodenameOne
shai-athena Nov 1, 2019
d99942d
Fixed some issues with unicode and emoji font rendering. This fixes …
shannah Nov 1, 2019
f12f794
Merge branch 'master' of https://github.com/codenameone/CodenameOne
shannah Nov 1, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions CodenameOne/src/com/codename1/capture/Capture.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import com.codename1.io.FileSystemStorage;
import com.codename1.io.Log;
import com.codename1.io.Util;
import com.codename1.media.MediaRecorderBuilder;
import com.codename1.ui.Display;
import com.codename1.ui.events.ActionEvent;
import com.codename1.ui.events.ActionListener;
Expand Down Expand Up @@ -95,6 +96,18 @@ public static String captureAudio() {
Display.getInstance().invokeAndBlock(c);
return c.url;
}

/**
* Same as {@link #captureAudio(com.codename1.media.MediaRecorderBuilder) { only a blocking version that holds the EDT
* @return the audio file location or null if the user canceled
* @since 7.0
*/
public static String captureAudio(MediaRecorderBuilder recordingOptions) {
CallBack c = new CallBack();
captureAudio(recordingOptions, c);
Display.getInstance().invokeAndBlock(c);
return c.url;
}


/**
Expand Down Expand Up @@ -178,6 +191,24 @@ public static String capturePhoto(int width, int height) {
public static void captureAudio(ActionListener response){
Display.getInstance().captureAudio(response);
}

/**
* This method tries to invoke the device native hardware to capture audio.
* The method returns immediately and the response will be sent asynchronously
* to the given ActionListener Object
* The audio record settings are specified in the recorderOptions parameter.
*
* <p>use this in the actionPerformed to retrieve the file path.
* String path = (String) evt.getSource();</p>
*
*
* @param response a callback Object to retrieve the file path
* @throws RuntimeException if this feature failed or unsupported on the platform
* @since 7.0
*/
public static void captureAudio(MediaRecorderBuilder recorderOptions, ActionListener response){
Display.getInstance().captureAudio(recorderOptions, response);
}

/**
* Captures video with some constraints, like width, height, and max length. Video constraints
Expand Down
Loading