Skip to content

Commit

Permalink
1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Shaji Khan committed Jun 12, 2024
1 parent d916b67 commit 70c94f5
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 18 deletions.
15 changes: 1 addition & 14 deletions .idea/deploymentTargetDropDown.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ android {
applicationId "org.acoustixaudio.tonesmith"
minSdk 29
targetSdk 34
versionCode 3
versionName '1'
versionCode 4
versionName '1.1'

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
externalNativeBuild {
Expand Down
Binary file modified app/release/app-release.aab
Binary file not shown.
19 changes: 17 additions & 2 deletions app/src/main/java/org/acoustixaudio/tonesmith/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@

import androidx.appcompat.app.AppCompatDelegate;
import androidx.core.app.ActivityCompat;
import androidx.core.content.ContextCompat;
import androidx.core.content.FileProvider;
import androidx.navigation.NavController;
import androidx.navigation.Navigation;
Expand Down Expand Up @@ -271,7 +272,7 @@ public void onClick(View v) {
@Override
public void onClick(View v) {
if (filename != null)
shareFile(new File(filename));
shareFile(new File(filename + ".mp3"));
}
});
lastPlayPause.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
Expand All @@ -294,8 +295,12 @@ public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
public void onIsPlayingChanged(boolean isPlaying) {
Log.i(TAG, "onIsPlayingChanged: " + isPlaying);
Player.Listener.super.onIsPlayingChanged(isPlaying);
if (! isPlaying)
if (! isPlaying) {
lastPlayPause.setChecked(false);
MediaItem mediaItem = MediaItem.fromUri(filename + ".mp3");
mediaPlayer.setMediaItem(mediaItem);
mediaPlayer.prepare();
}
}
});

Expand Down Expand Up @@ -1041,5 +1046,15 @@ public void loadPreset (JSONObject jsonObject) {

// loadPlugins();
}

public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
if (ContextCompat.checkSelfPermission(this, Manifest.permission.RECORD_AUDIO)
== PackageManager.PERMISSION_GRANTED) {
startEffect();
} else {
// record.setChecked(false);
}
}
}

0 comments on commit 70c94f5

Please sign in to comment.