Skip to content

Instantly share code, notes, and snippets.

@pbrisbin
Created October 10, 2010 00:25
Show Gist options
  • Save pbrisbin/618759 to your computer and use it in GitHub Desktop.
Save pbrisbin/618759 to your computer and use it in GitHub Desktop.
package rawAudio.apk;
import android.app.Activity;
import android.content.ComponentName;
import android.content.Intent;
import android.content.ServiceConnection;
import android.os.Bundle;
import android.os.IBinder;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
public class RawAudio extends Activity implements OnClickListener {
private static final String APP = "RawAudio";
// our background player service
private StreamMusic streamMusic = null;
@Override public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// setup ui
setContentView(R.layout.main);
// setup play/pause button
Button ppButton = (Button)findViewById(R.id.playpause);
ppButton.setOnClickListener(this);
// connect/create our service
connectToService();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment