Hi Team,
Can anyone Suggest me how to implement
Tips screen in
Custom tender App ?
Thanks in Advance
final long orderAmount = getIntent().getLongExtra(Intents.EXTRA_AMOUNT, 0); final String orderId = getIntent().getStringExtra(Intents.EXTRA_ORDER_ID); Intent intent = new Intent(Intents.ACTION_CUSTOMER_ADD_TIP); intent.putExtra(Intents.EXTRA_ORDER_ID, orderId); intent.putExtra(Intents.EXTRA_AMOUNT, orderAmount); // needs to be type long startActivityForResult(intent, tipRequestCode); // Set a unique request code so you know the result is from this request. <br>@Override public void onActivityResult(int requestCode, int resultCode, Intent data) { if (requestCode == tipRequestCode){ long tipAmount = data.getLongExtra(Intents.EXTRA_TIP_AMOUNT, 0); Intent data = new Intent(); data.putExtra(Intents.EXTRA_AMOUNT, orderAmount); data.putExtra(Intents.EXTRA_TAX_AMOUNT, taxAmount); data.putExtra(Intents.EXTRA_TIP_AMOUNT, tipAmount); data.putExtra(Intents.EXTRA_NOTE, paymentNote); setResult(RESULT_OK, data); finish(); } }
2 People are following this question.