Uses
Androidapi.Helpers,
Androidapi.JNIBridge,
Androidapi.JNI.Media,
AndroidApi.Jni.JavaTypes,
AndroidApi.Jni.App;
procedure BeepSound();
{$IFDEF ANDROID}
var
AudioObj: JObject;
Audio: JAudioManager;
{$ENDIF}
begin
{$IFDEF ANDROID}
AudioObj:= TAndroidHelper.Activity.getSystemService( TJActivity.JavaClass.AUDIO_SERVICE);
Audio := TJAudioManager.Wrap((AudioObj as ILocalObject).GetObjectID);
Audio.loadSoundEffects;
Audio.playSoundEffect( 8 ); // 0 ~ 9
{$ENDIF}
end;
댓글 없음:
댓글 쓰기