How to add sound to a button in android studio | Android studio tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 10 ธ.ค. 2024

ความคิดเห็น • 38

  • @snehal5429
    @snehal5429 4 ปีที่แล้ว +18

    upto 4:00 - How to make a button and place it in center
    from 4:00 - How to add sounds in android studio

  • @someshsahu4638
    @someshsahu4638 ปีที่แล้ว +1

    nice video thank you so much 🙏🏼🙏🏼🙏🏼

  • @raphelbenal4875
    @raphelbenal4875 4 ปีที่แล้ว +2

    You are life saver man. I thinking of adding sounds to my app. How i can pause the music??

    • @TechnicalCoding
      @TechnicalCoding  4 ปีที่แล้ว +3

      just call .pause() on the mediaplayer object when you want to pause

    • @simofatihi3842
      @simofatihi3842 4 ปีที่แล้ว

      Can you explain i don't know how ?

    • @maheshmahadar4780
      @maheshmahadar4780 4 ปีที่แล้ว

      @@simofatihi3842
      MediaPlayer mediaPlayer = MediaPlayer
      mediaPlayer.pause();

    • @MrIMacro
      @MrIMacro 3 ปีที่แล้ว

      @@maheshmahadar4780 please could you tell me where to put this code exactly?

  • @avishekchakraborty8289
    @avishekchakraborty8289 4 ปีที่แล้ว +1

    Yes it's working properly but how to stop the sound when the back button is pressed, i.e. when activity closed?

  • @MuhammadHassan-qh3sm
    @MuhammadHassan-qh3sm 3 ปีที่แล้ว +1

    How to add multiple Buttons and each button play different music?

  • @DouglasMorais-uz1ft
    @DouglasMorais-uz1ft ปีที่แล้ว

    Very good thank you! Helped me.

  • @ABDULLAYEV_PUBGM07
    @ABDULLAYEV_PUBGM07 2 ปีที่แล้ว

    thanks bro this is very nice video for me all of the android videous

  • @nyccomputer5949
    @nyccomputer5949 2 ปีที่แล้ว

    I haved 5 button with raw audio file but when i clicked on play fine but if i click another button untill finish first button there were playing both on same time
    I want
    When i click another button first button voice to stop at a time
    Plz help

  • @maheshmahadar4780
    @maheshmahadar4780 4 ปีที่แล้ว +1

    my project throwing exeptions ..why bro ? .... i did it same

  • @Agru69
    @Agru69 3 ปีที่แล้ว +1

    Sir if I write mediaPlayer.pause() below mediaPlayer.start() the audio is not stopping can you please help me ??

    • @akhilpadmanaban3242
      @akhilpadmanaban3242 3 ปีที่แล้ว

      make another button and give on click listener to that pause button then call this pause method inside that...

  • @prottoyhasan7048
    @prottoyhasan7048 4 ปีที่แล้ว +1

    Very Very helpful video sir. Thank you sir for this video tutorial.

  • @briancharlesco563
    @briancharlesco563 2 ปีที่แล้ว

    Sir it is possible that when you clicked the button it will go to the next activity with a sound?

  • @kaff864
    @kaff864 4 ปีที่แล้ว

    How to play all sound file in one button click? All sound will play auto on button click?

  • @rishikumargautam608
    @rishikumargautam608 4 ปีที่แล้ว

    Showing
    Entry name 'META-INF/androidx.vectordrawable_vectordrawable.version' collided
    Error

    • @TechnicalCoding
      @TechnicalCoding  4 ปีที่แล้ว

      i don't fully know about this error though but from the looks of it look like version conflict.

  • @emremuslu7763
    @emremuslu7763 4 ปีที่แล้ว

    Thank you so much. Simple and works well.

  • @rahulkamble4617
    @rahulkamble4617 4 ปีที่แล้ว +1

    Hey bro can u tell me how an audio can be automatically start as soon as the user opens the application , I don't want to use a button . I am a Tybscit Student need help for project purpose
    Please help : )

    • @TechnicalCoding
      @TechnicalCoding  4 ปีที่แล้ว +1

      @overide the onstart method and paste the code inside of it. When the user enter the app that code will execute automatically.

    • @rahulkamble4617
      @rahulkamble4617 4 ปีที่แล้ว

      @@TechnicalCoding Thankyou : )

  • @maliktanveer6172
    @maliktanveer6172 4 ปีที่แล้ว +1

    Nice tutorials bro

  • @jhonmiltalty7882
    @jhonmiltalty7882 4 ปีที่แล้ว +1

    nice tutorial

  • @scoisback
    @scoisback 4 ปีที่แล้ว

    Bro thanks for video

  • @iamyourdad9148
    @iamyourdad9148 4 ปีที่แล้ว

    I learned Android without any teacher

    • @TechnicalCoding
      @TechnicalCoding  4 ปีที่แล้ว

      that's really good because self learning is the best way to build a solid foundation on basic. When I started android there aren't many tutorial available in TH-cam so I joined a course. From you comment it reminds me of my early days of programming.

    • @GiviOfGivia
      @GiviOfGivia 4 ปีที่แล้ว

      @@TechnicalCoding what a life back then ye.. thank you sir for making tutorials for us

  • @redqueengaming6
    @redqueengaming6 3 ปีที่แล้ว

    so good

  • @Sportsmeastro
    @Sportsmeastro 3 ปีที่แล้ว

    Tanks

  • @flavioestudio
    @flavioestudio ปีที่แล้ว

    muito bom. sou desenhista. se precisar de ajuda com desenhos, estou a disposição. thank you