Back to project page intent_radio.
The source code is released under:
Copyright (c) 2014 Stephen Blott Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Soft...
If you think the Android project intent_radio listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package org.smblott.intentradio; // www .j a va2s .c om import android.content.Context; import android.content.Intent; import android.content.BroadcastReceiver; public class Intents extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { Intent msg = new Intent(context, IntentPlayer.class); msg.putExtra("action", intent.getAction()); passExtra("url", intent, msg); passExtra("name", intent, msg); passExtra("debug", intent, msg); msg.putExtra("broadcast", true); context.startService(msg); } private static void passExtra(String key, Intent intent, Intent msg) { if ( intent.hasExtra(key) ) { String str = intent.getStringExtra(key); if ( str != null ) msg.putExtra(key, str); } } }