MediaPlayer _mp; _mp = MediaPlayer.create(this, R.raw.music); try { _mp.prepare(); // æºå _mp.start(); // åç } catch (IOException e) { //ä¾å¤å¦ç } ãã£ãããã ãã§ãã å¯ä¸ã®æ³¨æç¹ã¯music.mp3ãã¡ã¤ã«ãres/raw/ãã£ã¬ã¯ããªã«é ç½®ããå¿ è¦ãããã¾ãã MediaPlayerã¯ä¸ã®ä¾ã®ä»ã«ãsetDataSource(â¦)ã§ãã¡ã¤ã«ãæå®ããäºãåºæ¥ã¾ãã ãã®æ¹æ³ã使ãã¨ãèªã¿åã権éãæã¤ãã£ã¬ã¯ããªã§ããã°ãã¡ã¤ã«ãã©ãã«è¨ç½®ãã¦ãOKã§ãã æ¬å½ã«ç°¡åã§ããã prepare()ã¯åçæºåã®ããã®ã¡ã½ããã ããã§ãã ã¡ãã£ã¢ãã¡ã¤ã«ãè¨å®ãããå¼åºãã®ãã«ã¼ã«ã ããã§ãã ã¨ãAPIä»æ§æ¸ã«æ¸ãã¦ãã¾ãã ããã¯ã©ããã
{{#tags}}- {{label}}
{{/tags}}