Android Open Source - robospice-minnebar-example Base Sample Spice Activity






From Project

Back to project page robospice-minnebar-example.

License

The source code is released under:

Apache License

If you think the Android project robospice-minnebar-example listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.octo.android.robospice.sample.retrofit;
//from w ww .  j a v  a  2 s  .c o  m
import android.app.Activity;

import com.octo.android.robospice.SpiceManager;
import com.octo.android.robospice.sample.retrofit.network.GithubSpiceService;
import com.octo.android.robospice.sample.retrofit.network.TwilioSpiceService;

/**
 * This class is the base class of all activities of the sample project. This class offers all
 * subclasses an easy access to a {@link SpiceManager} that is linked to the {@link Activity}
 * lifecycle. Typically, in a new project, you will have to create a base class like this one and
 * copy the content of the {@link BaseSampleSpiceActivity} into your own class.
 * @author sni
 */
public abstract class BaseSampleSpiceActivity extends Activity {
    private SpiceManager twilioSpiceManager = new SpiceManager(TwilioSpiceService.class);
    private SpiceManager githubSpiceManager = new SpiceManager(GithubSpiceService.class);

    @Override
    protected void onStart() {
        twilioSpiceManager.start(this);
        githubSpiceManager.start(this);
        super.onStart();
    }

    @Override
    protected void onStop() {
        twilioSpiceManager.shouldStop();
        githubSpiceManager.shouldStop();
        super.onStop();
    }

    protected SpiceManager getTwilioSpiceManager() {
        return twilioSpiceManager;
    }
    protected SpiceManager getGithubSpiceManager() { return githubSpiceManager; }

}




Java Source Code List

com.octo.android.robospice.sample.retrofit.BaseSampleSpiceActivity.java
com.octo.android.robospice.sample.retrofit.FakeConfig.java
com.octo.android.robospice.sample.retrofit.SampleSpiceActivity.java
com.octo.android.robospice.sample.retrofit.model.CallResponse.java
com.octo.android.robospice.sample.retrofit.model.Contributor.java
com.octo.android.robospice.sample.retrofit.model.GistDetail.java
com.octo.android.robospice.sample.retrofit.model.GistFile.java
com.octo.android.robospice.sample.retrofit.model.Gist.java
com.octo.android.robospice.sample.retrofit.network.GitHub.java
com.octo.android.robospice.sample.retrofit.network.GithubSpiceService.java
com.octo.android.robospice.sample.retrofit.network.TwilioSpiceService.java
com.octo.android.robospice.sample.retrofit.network.Twilio.java
com.octo.android.robospice.sample.retrofit.network.requests.CallRequest.java
com.octo.android.robospice.sample.retrofit.network.requests.GistRequest.java
com.octo.android.robospice.sample.retrofit.network.requests.GistsRequest.java