Skip to content

Commit

Permalink
Dump soundcloud intents
Browse files Browse the repository at this point in the history
  • Loading branch information
theli-ua committed Aug 27, 2014
1 parent 1b5989e commit 846ea82
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
7 changes: 7 additions & 0 deletions AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,13 @@
android:exported="true"
android:enabled="true">
<intent-filter>
<action android:name="com.soundcloud.android.playback.toggleplayback" />
<action android:name="com.soundcloud.android.playback.playcurrent" />
<action android:name="com.soundcloud.android.playback.pause" />
<action android:name="com.soundcloud.android.playback.seek" />
<action android:name="com.soundcloud.android.playback.reset" />
<action android:name="com.soundcloud.android.playback.stop" />
<action android:name="com.soundcloud.android.playlistchanged" />
<action android:name="com.amazon.mp3.metachanged" />
<action android:name="com.amazon.mp3.playstatechanged" />
</intent-filter>
Expand Down
19 changes: 19 additions & 0 deletions src/com/adam/aslfms/receiver/AmazonMP3Receiver.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import android.util.Log;
import com.adam.aslfms.util.Track;
import com.adam.aslfms.util.Util;
import java.util.*;

/**
* A BroadcastReceiver for intents sent by the Amazon Music music player
Expand All @@ -39,6 +40,19 @@ public class AmazonMP3Receiver extends AbstractPlayStatusReceiver {
static final String TAG = "AmazonMP3Receiver";
static private Track track = null;

public static void dumpIntent(Bundle bundle){
if (bundle != null) {
Set<String> keys = bundle.keySet();
Iterator<String> it = keys.iterator();
Log.e(TAG,"Dumping Intent start");
while (it.hasNext()) {
String key = it.next();
Log.e(TAG,"[" + key + "=" + bundle.get(key)+"]");
}
Log.e(TAG,"Dumping Intent end");
}
}

@Override
protected void parseIntent(Context ctx, String action, Bundle bundle) {

Expand Down Expand Up @@ -79,6 +93,11 @@ else if (action == ACTION_AMZN_META)

track = b.build();
}
else
{
dumpIntent(bundle);

}

}
}

0 comments on commit 846ea82

Please sign in to comment.