Code example for Ringtone

Methods: isPlaying, play

0
 
	@Override 
	public void receiveData(Context context, int transactionId,
			PebbleDictionary data) {
		Log.d("PagerDataReceiver", "Got some data");
		if (ringtone.isPlaying()) {
			ringtone.stop();
		} else { 
			ringtone.play();
		} 
	} 
	 
	public void setRingtone(Ringtone ringtone) {
		this.ringtone = ringtone;
	} 
}