Hello, does anyone know how to play the default ringtone in firemonkey (android)? Thanks.

Comments

  1. uses
    Androidapi.JNI.Media, Androidapi.JNI.Provider;

    ...

    FPlayer := TJMediaPlayer.JavaClass.create(TJSettings_System.JavaClass.DEFAULT_RINGTONE_URI);
    FPlayer.start;

    ReplyDelete
  2. Most Java examples translate very easily into Delphi code. Compare what you find at https://www.google.com/search?q=android%20play%20default%20ringtone with the code David Nottage posted on how easy it is to do those translations. (for instance from the Java code "MediaPlayer player = MediaPlayer.create(this,
    Settings.System.DEFAULT_RINGTONE_URI);
    player.start();"

    ReplyDelete

Post a Comment