Skip to content

Commit

Permalink
Updated HBRecorder class for when no parameters are passed
Browse files Browse the repository at this point in the history
  • Loading branch information
HBiSoft committed Aug 14, 2019
1 parent fd72560 commit e09354f
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions hbrecorder/src/main/java/com/hbisoft/hbrecorder/HBRecorder.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ public class HBRecorder implements MyListener {
private String notificationTitle;
private String notificationDescription;
private String notificationButtonText;
private int audioBitrate;
private int audioSamplingRate;
private int audioBitrate = 0;
private int audioSamplingRate = 0;
private FileObserver observer;
private final HBRecorderListener hbRecorderListener;
private byte[] byteArray;
Expand Down Expand Up @@ -159,6 +159,21 @@ private void startService(Intent data) {
observer = new FileObserver(String.valueOf(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_MOVIES)), activity, HBRecorder.this);
observer.startWatching();

if (audioBitrate == 0){
audioBitrate = 128000;
}
if (audioSamplingRate == 0){
audioSamplingRate = 44100;
}

if (notificationTitle.equals("")){
notificationTitle = "Recording your screen";
}

if (notificationDescription.equals("")){
notificationDescription = "Drag down to stop the recording";
}

Intent service = new Intent(context, ScreenRecordService.class);
service.putExtra("code", resultCode);
service.putExtra("data", data);
Expand Down

0 comments on commit e09354f

Please sign in to comment.