Example usage for android.app Service START_STICKY_COMPATIBILITY

List of usage examples for android.app Service START_STICKY_COMPATIBILITY

Introduction

In this page you can find the example usage for android.app Service START_STICKY_COMPATIBILITY.

Prototype

int START_STICKY_COMPATIBILITY

To view the source code for android.app Service START_STICKY_COMPATIBILITY.

Click Source Link

Document

Constant to return from #onStartCommand : compatibility version of #START_STICKY that does not guarantee that #onStartCommand will be called again after being killed.

Usage

From source file:edu.berkeley.boinc.TasksActivity.java

public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    setContentView(R.layout.tasks_layout);
    // Establish a connection with the service, onServiceConnected gets called when
    // (calling within Tab needs getApplicationContext() for bindService to work!)
    getApplicationContext().bindService(new Intent(this, Monitor.class), mConnection,
            Service.START_STICKY_COMPATIBILITY);

    //load data model
    loadData();//from  w w  w  . j a  v  a 2s .  c o m
}

From source file:edu.berkeley.boinc.EventLogActivity.java

@Override
public void onCreate(Bundle savedInstanceState) {
    Log.d(TAG, "onCreate()");

    super.onCreate(savedInstanceState);

    // Establish a connection with the service, onServiceConnected gets called when
    // (calling within Tab needs getApplicationContext() for bindService to work!)
    getApplicationContext().bindService(new Intent(this, Monitor.class), mConnection,
            Service.START_STICKY_COMPATIBILITY);
}

From source file:edu.berkeley.boinc.TransActivity.java

public void onCreate(Bundle savedInstanceState) {
    Log.d(TAG, "onCreate()");

    super.onCreate(savedInstanceState);

    // Establish a connection with the service, onServiceConnected gets called when
    // (calling within Tab needs getApplicationContext() for bindService to work!)
    getApplicationContext().bindService(new Intent(this, Monitor.class), mConnection,
            Service.START_STICKY_COMPATIBILITY);
}