Android SpiceException - 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 SpiceException class.

This code example shows how to use the following methods:getMessage
    private final class ReverseStringRequestListener implements 
        RequestListener<String> {
        @Override 
        public void onRequestFailure(SpiceException spiceException) {
            Toast.makeText(MainActivity.this,
                "Error: " + spiceException.getMessage(), Toast.LENGTH_SHORT)
                .show();
        } 
 
        @Override 
        public void onRequestSuccess(String result) {
            MainActivity.this.setProgressBarIndeterminateVisibility(false);
            resultTextView.setText(getString(R.string.result_text, result));
        } 
    } 
 
    @Override 
    protected void onSaveInstanceState(Bundle outState) {
        String result = resultTextView.getText().toString();
        if (!TextUtils.isEmpty(result)) {
4
CodeRank
This code example shows how to use the following methods:getMessage
			RequestListener<ImageList> {
 
		@Override 
		public void onRequestFailure(SpiceException e) {
			Toast.makeText(getActivity(),
					"Error during request: " + e.getMessage(),
					Toast.LENGTH_LONG).show();
 
			progressBar.setVisibility(View.GONE);
		} 
 
		@Override 
		public void onRequestSuccess(ImageList imageList) {
			if (imageList == null) {
				return; 
			} 
 
			imageListAdapter = new ImageListAdapter(getActivity(), imageList);
			AdultImageListFragment.this.imagesGridView.setAdapter(imageListAdapter);
			imageListAdapter.notifyDataSetChanged();
4
CodeRank
This code example shows how to use the following methods:getMessage
	private class LoginRequestListener implements RequestListener<Response> {
 
		@Override 
		public void onRequestFailure(SpiceException exception) {
			progressBar.dismiss();
			Log.d(LOGTAG, exception.getMessage());
			startActivity(new Intent(LoginActivity.this, SongListActivity.class));
		} 
 
		@Override 
		public void onRequestSuccess(Response response) {
			progressBar.dismiss();
			if (response.getError().equals("")) {
				Toast.makeText(
						getApplicationContext(),
						response.getMessage() + " as "
								+ response.getUser().getUsername(),
						Toast.LENGTH_LONG).show();
				Intent i = new Intent("com.mtls.project56.TRACEACTIVITY");
				i.putExtra("user", response.getUser());
3
CodeRank
This code example shows how to use the following methods:
			throws SpiceException { 
		try { 
			request.setHttpRequestFactory(createRequestFactory()); 
			return request.loadDataFromNetwork(); 
		} catch (Exception e) { 
			throw new SpiceException(e); 
		} 
	} 
 
	public void setObjectGraph(ObjectGraph objectGraph) { 
		this.objectGraph = objectGraph; 
	} 
 
} 
4
CodeRank
See Code Examples for Android SpiceException Methods: