Audio Player

Plays streaming audio
nickh3640.1.00
platforms: android
$ cordova plugin add net.afa.audioplayer

audio-player-cordova-plugin-android

<receiver android:name="net.afa.audioplayer.AudioPlayer$MediaButtonListener">
    <intent-filter>
       <action android:name="net.afa.audioplayer.MEDIA_BUTTON" />
    </intent-filter>
    </receiver>
    <receiver android:name="net.afa.audioplayer.AudioPlayer$CloseButtonListener">
    <intent-filter>
        <action android:name="net.afa.audioplayer.CLOSE_BUTTON" />
    </intent-filter>        
</receiver>

public class UFT extends CordovaActivity 
{
    public static CordovaActivity activity;
    @Override
    public void onCreate(Bundle savedInstanceState)
    {
        activity = this;
        super.onCreate(savedInstanceState);
        super.init();
        // Set by <content src="index.html" /> in config.xml
        super.loadUrl(Config.getStartUrl());
        //super.loadUrl("file:///android_asset/www/index.html");
    }
    public void sendPlayJS(){
        Log.d("LOG","sendPlayJS");
        this.sendJavascript("playReceived();");

    }
    public void sendStopJS(){
        Log.d("LOG","sendJS");
        this.sendJavascript("stopReceived();");

    }
    public void sendLoadingJS(){
        Log.d("LOG","sendLoadingJS");
        this.sendJavascript("loadingReceived();");

    }
    public void sendErrorJS(){
        Log.d("LOG","sendErrorJS");
        this.sendJavascript("errorReceived();");

    }

}