Android SpiceManager - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android SpiceManager class.

This code example shows how to use the following methods:isStarted, shouldStop
 
    @Override 
    public void onStop() { 
        // Please review https://github.com/octo-online/robospice/issues/96 for the reason of that 
        // ugly if statement. 
        if (spiceManager.isStarted()) {
            spiceManager.shouldStop();
        } 
        super.onStop(); 
    } 
 
    private void initUIComponents() { 
        Button reverseButton = (Button) getView().findViewById(R.id.reverse_button);
        wordField = (EditText) getView().findViewById(R.id.word_field);
        resultTextView = (TextView) getView().findViewById(R.id.result);
        reverseButton.setOnClickListener(new View.OnClickListener() {
            @Override 
            public void onClick(View view) {
                performRequest(wordField.getText().toString());
            } 
8
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:shouldStop
        } 
    } 
 
    @Override 
    public final void onDestroy() { 
        spiceManager.shouldStop();
        super.onDestroy(); 
    } 
 
    public Notification onCreateForegroundNotification() {
        throw new RuntimeException("If you use foreground = true, then you must override onCreateForegroundNotification().");
    } 
 
    public abstract Notification onCreateNotificationForRequestFailure(SpiceException ex);
 
    public abstract Notification onCreateNotificationForRequestSuccess();
 
    public abstract Notification onCreateNotificationForRequestProgress(RequestProgress requestProgress);
 
    // ---------------------------------- 
8
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:execute, start
        assertNotNull(getService().createRestAdapterBuilder());
    } 
 
    public void test_addRequest_injects_request_factory() throws InterruptedException { 
        // given 
        spiceManager.start(getContext());
        RetrofitSpiceRequestStub retrofitSpiceRequestStub = new RetrofitSpiceRequestStub(WeatherResult.class);
 
        // when 
        spiceManager.execute(retrofitSpiceRequestStub, new RequestListenerStub<WeatherResult>());
        retrofitSpiceRequestStub.await(REQUEST_COMPLETION_TIMEOUT);
 
        // test 
        assertNotNull(retrofitSpiceRequestStub.getService());
    } 
} 
8
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:isStarted, shouldStop
    } 
 
    @Override 
    protected void onStop() { 
        super.onStop(); 
        if (mSpiceManager.isStarted()) {
            mSpiceManager.shouldStop();
        } 
    } 
 
    public void showProgressDialog(int resId) {
        showProgressDialogFragment(getString(resId));
    } 
 
    public void showProgressDialog(String msg) {
        showProgressDialogFragment(msg);
    } 
 
    private void showProgressDialogFragment(String msg) {
        Fragment frag = getSupportFragmentManager().findFragmentByTag(PROGRESS_DIALOG_TAG);
8
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:shouldStop
        loadListTweets(); 
    } 
 
    @Override 
    public void onStop() { 
        spiceManagerJson.shouldStop();
        spiceManagerBinary.shouldStop();
        super.onStop(); 
    } 
 
    // -------------------------------------------------------------------------------------------- 
    // PRIVATE 
    // -------------------------------------------------------------------------------------------- 
 
    private void updateListViewContent( ListTweets listTweets ) {
        listTweetArrayAdapter = new ListTweetArrayAdapter( this, spiceManagerBinary, listTweets );
        octoListView.setAdapter( listTweetArrayAdapter );
 
        loadingView.setVisibility( View.GONE );
        octoListView.setVisibility( View.VISIBLE );
7
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:isStarted, shouldStop
    } 
 
    @Override 
    public void onStop() { 
        super.onStop(); 
        if(spiceManager.isStarted()) {
            spiceManager.shouldStop();
        } 
    } 
 
    @Override 
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
 
        View view = inflater.inflate(R.layout.fragment_movie_detail, container, false);
 
        return view;
    } 
 
    @Override 
    public void onViewCreated(View view, Bundle savedInstanceState) {
7
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:shouldStop
        super.onStart(); 
    } 
 
    @Override 
    protected void onStop() { 
        spiceManager.shouldStop();
        super.onStop(); 
    } 
 
    private void initUIComponents() { 
        Button reverseButton = (Button) findViewById(R.id.reverse_button);
        wordField = (EditText) findViewById(R.id.word_field);
        resultTextView = (TextView) findViewById(R.id.result);
        reverseButton.setOnClickListener(new View.OnClickListener() {
            @Override 
            public void onClick(View view) {
                performRequest(wordField.getText().toString());
            } 
        }); 
    } 
7
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:shouldStop
        super.onStart(); 
    } 
 
    @Override 
    protected void onStop() { 
        spiceManager.shouldStop();
        super.onStop(); 
    } 
 
    public SpiceManager getSpiceManager() {
        return spiceManager;
    } 
 
} 
7
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:shouldStop
        super.onStart(); 
    } 
 
    @Override 
    protected void onStop() { 
        spiceManager.shouldStop();
        super.onStop(); 
    } 
 
    protected SpiceManager getSpiceManager() {
        return spiceManager;
    } 
 
} 
7
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:shouldStop
		spiceManager.start(this);
	} 
 
	@Override 
	public void onDestroy() { 
		spiceManager.shouldStop();
		super.onDestroy(); 
	} 
 
	@Override 
	public IBinder onBind(Intent arg0) {
		// TODO Auto-generated method stub 
		return null; 
	} 
 
	 
} 
7
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
See Code Examples for Android SpiceManager Methods: