diff --git a/res/values/strings.xml b/res/values/strings.xml
index e8188bd0..184d1ad3 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -22,4 +22,7 @@
Notify While Paused
Always display the notification
+
+ Use ScrobbleDroid API
+ Send song info to Last.FM scrobblers such as ScrobbleDroid and Simple Last.FM Scrobbler
\ No newline at end of file
diff --git a/res/xml/preferences.xml b/res/xml/preferences.xml
index d98ba764..b96adbcd 100644
--- a/res/xml/preferences.xml
+++ b/res/xml/preferences.xml
@@ -19,4 +19,9 @@
android:title="@string/notify_while_paused_title"
android:defaultValue="true"
android:summary="@string/notify_while_paused_summary" />
+
\ No newline at end of file
diff --git a/src/org/kreed/vanilla/PlaybackService.java b/src/org/kreed/vanilla/PlaybackService.java
index 2ef94945..44e890c3 100644
--- a/src/org/kreed/vanilla/PlaybackService.java
+++ b/src/org/kreed/vanilla/PlaybackService.java
@@ -227,7 +227,8 @@ public class PlaybackService extends Service implements Runnable, MediaPlayer.On
private boolean mHeadsetOnly;
private boolean mUseRemotePlayer;
- private boolean mNotifyWhilePaused = true;
+ private boolean mNotifyWhilePaused;
+ private boolean mScrobble;
private Handler mHandler;
private MediaPlayer mMediaPlayer;
@@ -342,6 +343,7 @@ public class PlaybackService extends Service implements Runnable, MediaPlayer.On
mHeadsetOnly = mSettings.getBoolean("headset_only", false);
mUseRemotePlayer = mSettings.getBoolean("remote_player", true);
mNotifyWhilePaused = mSettings.getBoolean("notify_while_paused", true);
+ mScrobble = mSettings.getBoolean("scrobble", false);
setCurrentSong(1);
@@ -360,6 +362,8 @@ public class PlaybackService extends Service implements Runnable, MediaPlayer.On
} else if ("notify_while_paused".equals(key)){
mNotifyWhilePaused = mSettings.getBoolean(key, true);
updateNotification();
+ } else if ("scrobble".equals(key)) {
+ mScrobble = mSettings.getBoolean("scrobble", false);
}
}
@@ -383,10 +387,12 @@ public class PlaybackService extends Service implements Runnable, MediaPlayer.On
}
mWatchers.finishBroadcast();
- Intent intent = new Intent("net.jjc1138.android.scrobbler.action.MUSIC_STATUS");
- intent.putExtra("playing", mState == STATE_PLAYING);
- intent.putExtra("id", getSong(0).id);
- sendBroadcast(intent);
+ if (mScrobble) {
+ Intent intent = new Intent("net.jjc1138.android.scrobbler.action.MUSIC_STATUS");
+ intent.putExtra("playing", mState == STATE_PLAYING);
+ intent.putExtra("id", getSong(0).id);
+ sendBroadcast(intent);
+ }
}
private void retrieveSongs()