Public transport fares work om a “time and space” basis. So you will get a ticket valid for a certain time (a couple of hours) and a certain space (a number of zones). Within that time and space you are free to travel. The connection you select in the app will be used to determine the starting time, and the zones for the ticket, but you are not limited to those trains. In your place I would purchase the ticket once i landed from a ticket machine though. I don’t count on my phone working in a foreign country.