Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private class createDiscountAsyncTask extends AsyncTask<Void, Void, String> {
- @Override
- protected final String doInBackground(Void... params) {
- Discount d = new Discount();
- d.setName("Discount A");
- d.setAmount(-1000l);
- try {
- return mInventoryConnector.createDiscount(d).getId();
- } catch (RemoteException | ClientException | ServiceException | BindingException e) {
- e.printStackTrace();
- }
- return null;
- }
- protected final void onPostExecute(String discountId) {
- TextView textView = (TextView) findViewById(R.id.text);
- textView.setText(discountId);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement