Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私は教育用ソフトウェアを開発しています。利用可能なアルファベットのグリッドビューがあります。誰かがクリックしたときにアルファベットを言うオーディオクリップを再生したい。これを行う方法を教えてもらえますか
サウンドファイルをアセットフォルダに入れます。AssetManagerクラスを使用してサウンドファイルを取得します。クリック音が聞こえたら、カウンドを再生し、MediaPlayerのインスタンスを作成して、ファイルを再生します。
これらのそれぞれは、各クラスの使用方法について少し掘り下げる必要があります。
sound = MediaPlayer.create(Splash.this, R.raw.splashsound); サウンド.スタート();