*Hello could you help me figure out how can i stop sound with mediaplayer after clicking another soundbutton?
*and how can i set alarm/ringtone/notification when long press
*and i need help with adding admob on my app, ive read all posts i could google but still i get errors, i cant undrustand what am i doing wrong, if anybody wishes to help me please pm me your skype and we can sort this out.
thank you very much.
code:
final MediaPlayer sound01 = MediaPlayer.create(this, R.raw.sound01);
Button s01 = (Button) findViewById(R.id.button01);
s01.setText(this.getString(R.string.quote01));
s01.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
try {
sound01.prepare();
} catch (IllegalStateException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
sound01.start();
}
*and how can i set alarm/ringtone/notification when long press
*and i need help with adding admob on my app, ive read all posts i could google but still i get errors, i cant undrustand what am i doing wrong, if anybody wishes to help me please pm me your skype and we can sort this out.
thank you very much.
code:
final MediaPlayer sound01 = MediaPlayer.create(this, R.raw.sound01);
Button s01 = (Button) findViewById(R.id.button01);
s01.setText(this.getString(R.string.quote01));
s01.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
try {
sound01.prepare();
} catch (IllegalStateException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
sound01.start();
}