Skip to content

baato/baato-android-demo

Repository files navigation

Baato Android Demo app

Baato Splash

This is a public demo of the Baato App for Android. The demo app shows off the usages of the APIs baato.io offer with the use of our java-client library.

Visit the overview page to get started using the Baato library for Android in your Android project.

Running locally

1. Setting the Baato access token

This demo app requires a Baato account and a Baato access token. Obtain your access token on the Baato account page. Paste your access token into strings.xml.

<string name="baato_access_token">PASTE_YOUR_TOKEN_HERE</string>

2. Baato logo attribution

NOTE: We highly request you to include Baato logo in the map view while using any of our Baato map styles. So, please download the Baato logo from this link. Add the downloaded image to your res/drawable folder and follow the steps as mentioned in the code snippet below.

    mapView = findViewById(R.id.mapView);

    Mapbox.getInstance(this, null);

    //add your map style url here
    mapView.setStyleUrl(getString(R.string.base_url)+ "styles/retro?key=" + getString(R.string.baato_access_token));
    mapView.getMapAsync(mapboxMap ->
    {
        //remove mapbox attribute
        mapboxMap.getUiSettings().setAttributionEnabled(false);
        mapboxMap.getUiSettings().setLogoEnabled(false);

        //add your baato logo attribution here
        final FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(250, 104);
        params.gravity = Gravity.BOTTOM | Gravity.LEFT;
        params.setMargins(12, 12, 12, 12);
        ImageView imageview = new ImageView(this);
        imageview.setImageResource(R.drawable.baato_logo);
        imageview.setLayoutParams(params);
        mapView.addView(imageview);

    });
    mapView.onCreate(savedInstanceState);

If you're still having issues, please feel free to contact us at [email protected].

Built With

  • Mapbox - Used maps sdk to load our baato map styles.

Releases

No releases published

Packages

No packages published

Languages