MCPcopy Index your code
hub / github.com/alhazmy13/MediaRecorderDialog

github.com/alhazmy13/MediaRecorderDialog @1.0.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release 1.0.0 ↗ · + Follow
62 symbols 111 edges 12 files 11 documented · 18%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Media Recorder Dialog


Android has a built in microphone through which you can capture audio and store it , or play it in your phone. There are many ways to do that but with this dialog you can do all thats with only one dialog.

You can report any issue on issues page. Note: If you speak Arabic, you can submit issues with Arabic language and I will check them. :)

mediarecorderdialog

Installation


Maven

<dependency>
<groupId>net.alhazmy13.MediaRecorderDialog</groupId>
<artifactId>libary</artifactId>
<version>1.0.0</version>
</dependency>

Gradle


dependencies {
    compile 'net.alhazmy13.MediaRecorderDialog:libary:1.0.0'
}

Usage



 new MediaRecorderDialog.Builder(MainActivity.this)
    .setOutputFormat(MediaRecorderDialog.OutputFormat.MPEG_4)
    .setAudioEncoder(MediaRecorderDialog.AudioEncoder.AAC)
    .setTitle("Recording,,,")
    .setMessage("Press the button")
    .setOnSaveButtonClickListener(new OnSaveButtonClickListener() {
        @Override
        public void onSucceed(String path) {
            // Toast.makeText(MainActivity.this,path,Toast.LENGTH_SHORT).show();
        }
        @Override
        public void onFailure() {
            //Toast.makeText(MainActivity.this,"Failure",Toast.LENGTH_SHORT).show();
        }
    })
    .show();

Implement an OnSaveButtonClickListener

In order to receive the path of file, you will need to implement the OnSaveButtonClickListener interfaces.

    @Override
    public void onSucceed(String path) {
        //Your Code
    }
    @Override
    public void onFailure() {
        //Your Code
    }

Additional Options

  • setTitle You can change the title of Dialog
.setTitle("Recording,,,")
  • setMessage to change the message
.setMessage("Press the button")
  • setOutputFormat You can change the Output format by passing the format from MediaRecorderDialog.OutputFormat
.setOutputFormat(MediaRecorderDialog.OutputFormat.MPEG_4)
  • setAudioEncoder You can change the Encoder by passing the value from MediaRecorderDialog.AudioEncoder
.setAudioEncoder(MediaRecorderDialog.AudioEncoder.AAC)

Theme and style

You can theme the dialog by overwriting the color resources in your project.

    <color name="media_recorder_colorPrimary">#00796B</color>
    <color name="media_recorder_background">#009688</color>
    <color name="media_recorder_bar">#80CBC4</color>

Credits

License


Copyright 2015 alhazmy

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Extension points exported contracts — how you extend this code

OnSaveButtonClickListener (Interface)
Created by Alhazmy13 on 12/24/15. [1 implementers]
libary/src/main/java/net/alhazmy13/mediarecorderdialog/OnSaveButtonClickListener.java

Core symbols most depended-on inside this repo

getValue
called by 3
libary/src/main/java/net/alhazmy13/mediarecorderdialog/MediaRecorderDialog.java
show
called by 2
libary/src/main/java/net/alhazmy13/mediarecorderdialog/MediaRecorderDialog.java
setOutputFormat
called by 2
libary/src/main/java/net/alhazmy13/mediarecorderdialog/MediaRecorderDialog.java
setAudioEncoder
called by 2
libary/src/main/java/net/alhazmy13/mediarecorderdialog/MediaRecorderDialog.java
setTitle
called by 1
libary/src/main/java/net/alhazmy13/mediarecorderdialog/MediaRecorderDialog.java
setMessage
called by 1
libary/src/main/java/net/alhazmy13/mediarecorderdialog/MediaRecorderDialog.java
setOnSaveButtonClickListener
called by 1
libary/src/main/java/net/alhazmy13/mediarecorderdialog/MediaRecorderDialog.java
setMaxLength
called by 1
libary/src/main/java/net/alhazmy13/mediarecorderdialog/MediaRecorderDialog.java

Shape

Method 46
Class 11
Enum 3
Interface 2

Languages

Java100%

Modules by API surface

libary/src/main/java/net/alhazmy13/mediarecorderdialog/MediaRecorderDialog.java21 symbols
libary/src/main/java/net/alhazmy13/mediarecorderdialog/SoundDialog.java16 symbols
app/src/main/java/net/alhazmy13/mediarecorderdialog_example/MainActivity.java5 symbols
libary/src/main/java/net/alhazmy13/mediarecorderdialog/SoundDialogView.java3 symbols
libary/src/main/java/net/alhazmy13/mediarecorderdialog/OnSaveButtonClickListener.java3 symbols
libary/src/main/java/net/alhazmy13/mediarecorderdialog/MyCountDownTimer.java3 symbols
libary/src/test/java/net/alhazmy13/library/ExampleUnitTest.java2 symbols
libary/src/main/java/net/alhazmy13/mediarecorderdialog/SoundDialogPresenter.java2 symbols
libary/src/androidTest/java/net/alhazmy13/mediarecorderdialog/ApplicationTest.java2 symbols
app/src/test/java/net/alhazmy13/mediarecorderdialog/ExampleUnitTest.java2 symbols
app/src/androidTest/java/net/alhazmy13/mediarecorderdialog_example/ApplicationTest.java2 symbols
libary/src/main/java/net/alhazmy13/mediarecorderdialog/GenralAtteribute.java1 symbols

For agents

$ claude mcp add MediaRecorderDialog \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact