MainActivity.java: package import import import import import import import import import import import android.os.Vibrator import 7.app.AppCompatActivity import android.os.Bundle import import import import import import android.widget. You may check out the related API usage on the sidebar. ToneGenerator tgnew ToneGenerator (AudioManager.STREAMNOTIFICATION, 100) tg.startTone (ToneGenerator.TONECDMAONEMINBEEP, 5000) works fine but the playing of the beep is very shot (around 200ms) No matter if I set 5000ms or more for the duration, still nothing changes : (.
ANDROID TONEGENERATOR HOW TO
Почему это происходит? Как это исправить? Вот мой код: Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. Simple tone generator: Android app (4.3, 1000000+ downloads) Use this application to generate tone from 1 to 20000 Hz. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. How to make ToneGenerator play longer than 3 seconds. Ive looked around and ToneGenerator was the only thing I was able to find.