Skip to content

Commit

Permalink
Fix issue #127 and updated dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
HBiSoft committed Mar 5, 2023
1 parent 7d890df commit 5362ac3
Show file tree
Hide file tree
Showing 6 changed files with 243 additions and 209 deletions.
6 changes: 3 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ android {

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.4.2'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.legacy:legacy-support-core-utils:1.0.0'
implementation 'androidx.preference:preference:1.2.0'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test:runner:1.4.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
androidTestImplementation 'androidx.test:runner:1.5.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
implementation project(path: ':hbrecorder')
}
Binary file modified app/release/HBRecorderDemo.apk
Binary file not shown.
3 changes: 2 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
android:theme="@style/AppTheme"
tools:ignore="GoogleAppIndexingWarning">
<activity android:name=".SettingsActivity"/>
<activity android:name=".MainActivity">
<activity android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

Expand Down
6 changes: 3 additions & 3 deletions hbrecorder/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ android {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])

implementation 'androidx.appcompat:appcompat:1.4.2'
implementation 'androidx.appcompat:appcompat:1.6.1'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test:runner:1.4.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
androidTestImplementation 'androidx.test:runner:1.5.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
}
31 changes: 31 additions & 0 deletions hbrecorder/src/main/java/com/hbisoft/hbrecorder/HBRecorder.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.media.AudioManager;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
Expand Down Expand Up @@ -97,6 +98,36 @@ public void setOutputUri(Uri uri){
mUri = uri;
}

// WILL IMPLEMENT THIS AT A LATER STAGE
// DEVELOPERS ARE WELCOME TO LOOK AT THIS AND CREATE A PULL REQUEST
/*Mute microphone*/
/*public void setMicMuted(boolean state){
if (context!=null) {
try {
((AudioManager)context.getSystemService(Context.AUDIO_SERVICE)).setStreamMute(AudioManager.STREAM_SYSTEM,true);
AudioManager myAudioManager = (AudioManager)context.getSystemService(Context.AUDIO_SERVICE);
// get the working mode and keep it
int workingAudioMode = myAudioManager.getMode();
myAudioManager.setMode(AudioManager.MODE_IN_COMMUNICATION);
// change mic state only if needed
if (myAudioManager.isMicrophoneMute() != state) {
myAudioManager.setMicrophoneMute(state);
}
// set back the original working mode
myAudioManager.setMode(workingAudioMode);
}catch (Exception e){
Log.e("HBRecorder", "Muting mic failed with the following exception:");
e.printStackTrace();
}
}
}*/

/*Set max duration in seconds */
public void setMaxDuration(int seconds){
isMaxDurationSet = true;
Expand Down
Loading

0 comments on commit 5362ac3

Please sign in to comment.