I am currently working on an "Order food from home" restaurant app. What I am trying to do is to send the quantity of a product (a bottle of CocaCola for example) from the activity that includes only the juice to the "Shopping Cart" activity where I will calculate the price and then show both the quantity and the total price of the product.
My problem is that I can't really figure out how to send information from activity A to activity B.
If possible, I would like doing that without using a database. (Through intents for example) This code shows on the activity with the juice the quantity of CocaCola's the customer wishes to buy. I want to send this quantity in the shoppingCart activity.
Code:
public void displayCantitateCocaCola(int number){
TextView quantityText = (TextView) findViewById(R.id.cantitateCola);
quantityText.setText("" + number);
}
So, if the above method's display is 3, I want to get that value in the shopping cart activity.