Skip to content

Instantly share code, notes, and snippets.

@miguelcardo
Created December 22, 2014 16:44
Show Gist options
  • Save miguelcardo/01e2c5edbe407e2e6d19 to your computer and use it in GitHub Desktop.
Save miguelcardo/01e2c5edbe407e2e6d19 to your computer and use it in GitHub Desktop.
Process result from installation
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
if (requestCode == SERVICE_DELIVERY_REQUEST_CODE) {
if (resultCode == RESULT_OK) {
Log.i(TAG, "Cardlet installation returned SUCCESS");
mainMessage.setText(R.string.put_card);
installButton.setVisibility(View.GONE);
} else {
Log.i(TAG, "Cardlet installation returned FAILURE");
Toast.makeText(getApplicationContext(), getString(R.string.failure), Toast.LENGTH_LONG).show();
}
} else {
Log.i(TAG, "Unknown Activity has returned a result");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment