Quantcast
Channel: Embarcadero Community - Embarcadero Community
Viewing all articles
Browse latest Browse all 1963

play sound in android

$
0
0

hello .... why this code is not working in Tokyo 10.2 .... but working in seattle 10.0

procedure TForm1.Sound;

{$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(0);

  //0 - http://developer.android.com/intl/ru/reference/android/view/SoundEffectConstants.html

  {$endif}

end;

 


Viewing all articles
Browse latest Browse all 1963

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>