Is there anyway to determine the region (EU, US or Canada) on device using Android SDK?
Is there anyway to determine the region (EU, US or Canada) on device using Android SDK?
In the Java SDK, you can use the `MerchantAddress` object to call `getCountry()`, which will determine which region they're in. As far as I know, there isn't an explicit call to check the region (North America, EUrope, or Latin America), but each merchant UUID is tied to one specific address, which will be in one of our regions.
It would help if you could explain why you want to know.
You seem to be mixing the concept of a region, which for Clover would be EU, LA (Latin America), or US... and countries (Canada, US). If you just want to know the country what Richelle said is correct.
EDIT: If you want to know the REGION, there's no a well-defined way accomplish that. One idea you won't like I'm sure is to build different flavors per region and include some bit in the app that identifies the region to which you published that app.
Another idea would be to use CloverAuth, and obtain AuthResult#baseUrl. This should be either api.clover.com, la.api.clover.com, or eu.api.clover.com (in addition to needing to account for sandbox, and any other env which you run).
Another idea would be to organize your subscriptions to identify the region... e.g. "free-eu" or something. Then obtain the subscriptions at runtime using AppsConnector#getApp().
Just ideas, I haven't tested these.
One of apps launched in both US/Canada and EU region, we try to find a way to determine the region (both device and merchant) in that app at runtime, so that different feature could turn on/off.
When Jeff talks about regions, he's talking about how Clover infrastructure currently divides our markets into North America (US and Canada), Europe, and Latin America (which may be better described as South America). But even within these regions, the roll out of new projects may be staggered. You will probably want to focus on country more than region, then, as products will roll out to different countries on different timelines due to all manner of constraints (e.x. tax, certifications, etc.).
3 People are following this question.