I want to pass args to this sub (in QR reader example by @Johan Schoeman) to generate different tones as needed i.e.
How to do that?
ToneGenerator reference: https://developer.android.com/reference/android/media/ToneGenerator
B4X:
Jo.RunMethod("playTone", Array as int (streamType, volume))
B4X:
#if Java
import android.media.ToneGenerator;
import android.media.AudioManager;
public void playTone() {
final ToneGenerator tg = new ToneGenerator(AudioManager.STREAM_NOTIFICATION, 100);
tg.startTone(ToneGenerator.TONE_PROP_BEEP);
}
#End If
How to do that?
ToneGenerator reference: https://developer.android.com/reference/android/media/ToneGenerator