1
0
mirror of https://github.com/balkian/Carrousel-Android.git synced 2024-12-23 05:28:13 +00:00
Carrousel-Android/src/com/onirica/carrousel/Configuration.java

34 lines
1.0 KiB
Java
Raw Normal View History

2011-03-09 21:41:31 +00:00
package com.onirica.carrousel;
import android.app.Activity;
import android.content.ComponentName;
import android.content.Intent;
import android.content.ServiceConnection;
2011-03-09 21:41:31 +00:00
import android.os.Bundle;
import android.os.IBinder;
2011-03-09 21:41:31 +00:00
public class Configuration extends Activity {
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);
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
}
}