Back to project page AudioChoice.
The source code is released under:
Apache License
If you think the Android project AudioChoice 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 com.hwrdprkns.audiochoice.server; //from w w w . ja v a2 s .co m import android.content.Context; import com.hwrdprkns.audiochoice.R; public class AudioChoiceLocalServer extends NanoHTTPD { private Context context; public AudioChoiceLocalServer(Context context) { super ("localhost", 9001); this.context = context; } @SuppressWarnings("unused") public AudioChoiceLocalServer(Context context, String unusedURI) { this(context); } @Override public Response serve(IHTTPSession session) { return new Response(Response.Status.OK, "audio/mpeg", context.getResources().openRawResource(R.raw.wildfire)); } }