Skip to content
This repository has been archived by the owner on Jun 8, 2024. It is now read-only.

Commit

Permalink
Updated
Browse files Browse the repository at this point in the history
  • Loading branch information
HiddenPirates committed Jun 19, 2022
1 parent 9950400 commit cf65ca5
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.ActionBarDrawerToggle;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.app.AppCompatDelegate;
import androidx.appcompat.widget.SearchView;
Expand Down Expand Up @@ -199,34 +200,34 @@ else if (item.getItemId() == R.id.donate_me_action) {

// ------------------------------------------------------------------------------------------
//
// if (!CustomFunctions.isSystemApp(this)){
//
// AlertDialog.Builder builder = new AlertDialog.Builder(this);
//
// builder.setTitle(getString(R.string.not_system_app_message_title));
// builder.setMessage(getString(R.string.not_system_app_message_body));
// builder.setIcon(R.drawable.ic_error);
// builder.setCancelable(false);
// builder.setPositiveButton("Ok", (dialog, which) -> {
// dialog.dismiss();
if (!CustomFunctions.isSystemApp(this)){

AlertDialog.Builder builder = new AlertDialog.Builder(this);

builder.setTitle(getString(R.string.not_system_app_message_title));
builder.setMessage(getString(R.string.not_system_app_message_body));
builder.setIcon(R.drawable.ic_error);
builder.setCancelable(false);
builder.setPositiveButton("Ok", (dialog, which) -> {
dialog.dismiss();
finishAndRemoveTask();
});
builder.setNegativeButton("Read Post", (dialog, which) -> {
try {
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(getString(R.string.tutorial_post_link))));
new Handler(Looper.getMainLooper()).postDelayed(this::finishAndRemoveTask, 2000);
}
catch (Exception e){
Toast.makeText(this, "No app found to open this link", Toast.LENGTH_SHORT).show();
dialog.dismiss();
onBackPressed();
}
// finishAndRemoveTask();
// });
// builder.setNegativeButton("Read Post", (dialog, which) -> {
// try {
// startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(getString(R.string.tutorial_post_link))));
// new Handler(Looper.getMainLooper()).postDelayed(this::finishAndRemoveTask, 2000);
// }
// catch (Exception e){
// Toast.makeText(this, "No app found to open this link", Toast.LENGTH_SHORT).show();
// dialog.dismiss();
// onBackPressed();
// }
//// finishAndRemoveTask();
// });
// builder.create();
// builder.show();
// }
// else{
});
builder.create();
builder.show();
}
else{
requestCallScreenPermission();

if (!isPermissionGranted()){
Expand Down Expand Up @@ -366,7 +367,7 @@ else if (dy < 0) { // scrolling up

}
// ------------------------------------------------------------------------------------------
// }
}

//__________________________________________________________________________________________________

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public void startVoiceRecoding() {

recorder = new MediaRecorder();
recorder.reset();
recorder.setAudioSource(MediaRecorder.AudioSource.MIC);
recorder.setAudioSource(MediaRecorder.AudioSource.VOICE_CALL);
recorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
recorder.setAudioEncodingBitRate(16);
Expand Down

0 comments on commit cf65ca5

Please sign in to comment.