2011-03-09 21:41:31 +00:00
|
|
|
package com.onirica.carrousel;
|
|
|
|
|
|
|
|
import android.app.Activity;
|
2011-03-09 22:14:57 +00:00
|
|
|
import android.content.ComponentName;
|
|
|
|
import android.content.Intent;
|
|
|
|
import android.content.ServiceConnection;
|
2011-03-09 21:41:31 +00:00
|
|
|
import android.os.Bundle;
|
2011-03-09 22:14:57 +00:00
|
|
|
import android.os.IBinder;
|
2011-03-09 21:41:31 +00:00
|
|
|
|
|
|
|
public class Configuration extends Activity {
|
2011-03-09 22:14:57 +00:00
|
|
|
private Results mResults;
|
2011-03-09 21:41:31 +00:00
|
|
|
/** Called when the activity is first created. */
|
|
|
|
@Override
|
|
|
|
public void onCreate(Bundle savedInstanceState) {
|
|
|
|
super.onCreate(savedInstanceState);
|
|
|
|
setContentView(R.layout.main);
|
2011-03-09 22:14:57 +00:00
|
|
|
Intent intent = new Intent(getBaseContext(), Results.class);
|
|
|
|
startService(intent);
|
|
|
|
ServiceConnection conn = new ServiceConnection() {
|
|
|
|
@Override
|
|
|
|
public void onServiceConnected(ComponentName className, IBinder service) {
|
|
|
|
mResults = ((Results.LocalBinder)service).getService();
|
|
|
|
|
|
|
|
}
|
|
|
|
@Override
|
|
|
|
public void onServiceDisconnected(ComponentName className) {
|
|
|
|
mResults = null;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
bindService(intent, conn, BIND_AUTO_CREATE);
|
2011-03-09 21:41:31 +00:00
|
|
|
}
|
|
|
|
}
|