Get GroundSage Venue Info with Android
Kotlin
class MainActivity : AppCompatActivity(), IAGSManagerListener { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) requestVenueDensityExample() } fun requestVenueInformationExample() { val sdk = IAGSManager.getInstance(this) // set your api key and api secret. sdk.setApiKey( "SET YOUR API KEY HERE", "YOUR SECRET KEY HERE" ) // start to request venue information sdk.requestVenueInfo { venues, _ -> print(venues) } } }
Java
public class MainActivity extends AppCompatActivity implements IAGSManagerListener {
private final String TAG = MainActivity.class.getSimpleName();
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
requestVenueInformationExample();
}
void requestVenueInformationExample() {
IAGSManager sdk = IAGSManager.Companion.getInstance(this);
// set your api key and api secret.
sdk.setApiKey(
"SET YOUR API KEY HERE",
"YOUR SECRET KEY HERE"
);
// start to request venue information
sdk.requestVenueInfo((iagsVenues, e) -> {
Log.d(TAG, String.format("%s, %s", iagsVenues, e));
return Unit.INSTANCE;
});
}
}