Search in sources :

Example 1 with EventDepacker

use of com.cpjd.roblu.sync.cloud.EventDepacker in project Roblu by wdavies973.

the class EventCreateMethodPicker method importRobluCloudEvent.

/**
 * Imports an event from Roblu Cloud, given one exists
 *
 * @param teamNumber -1 to disable
 */
private void importRobluCloudEvent(int teamNumber) {
    d = new ProgressDialog(EventCreateMethodPicker.this);
    d.setTitle("Get ready!");
    d.setMessage("Roblu is importing an event from Roblu Cloud...");
    d.setCancelable(false);
    d.show();
    // Stop the background service so it won't interfere
    IntentFilter serviceFilter = new IntentFilter();
    serviceFilter.addAction(Constants.SERVICE_ID);
    Intent serviceIntent = new Intent(this, Service.class);
    stopService(serviceIntent);
    EventDepacker dp = new EventDepacker(new IO(getApplicationContext()), teamNumber);
    dp.setListener(this);
    dp.start();
}
Also used : IntentFilter(android.content.IntentFilter) IO(com.cpjd.roblu.io.IO) EventDepacker(com.cpjd.roblu.sync.cloud.EventDepacker) Intent(android.content.Intent) ProgressDialog(android.app.ProgressDialog)

Aggregations

ProgressDialog (android.app.ProgressDialog)1 Intent (android.content.Intent)1 IntentFilter (android.content.IntentFilter)1 IO (com.cpjd.roblu.io.IO)1 EventDepacker (com.cpjd.roblu.sync.cloud.EventDepacker)1