Question: I have an android app that gets my devices location and adds a marker. It also tracks the location and the marker moves. I want to add a marker on the map each time the location changes, so I can then draw a Polyline between them at a later date. I am not using firebase or a DBHelper. Just looking for a simple way to do it. 

This is the onLocationChanged function 

```
@Override
public void onLocationChanged(Location location) {
    LatLng myCoordinates = new LatLng(location.getLatitude(), location.getLongitude());
    LocationMarker.setPosition(myCoordinates);
    mMap.moveCamera(CameraUpdateFactory.newLatLng(myCoordinates));
    float zoomLevel = 12.0f;
    mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(myCoordinates, zoomLevel));

```

}

This is my onCreate function

```
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_tracking);

    mOptions = new MarkerOptions().position(new LatLng(0, 0)).title("My Current Location")
            .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_BLUE));

    if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
        checkLocationPermission();
    }
    // Gets map fragment and allows map to display location
    SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()
            .findFragmentById(map);
    mapFragment.getMapAsync(this);

}

```

Is it possible to store the lat and long into an array and use the array to plot the points? I've been trying to get my head around it but there isn't a definitive

Answer: 
I get the feeling that the reasons the other answers may not be working for you is that you are looking for how to SET the config, as opposed to retrieving it.

If you don't have it already, you'll need to install the Firebase CLI, as per the steps in <https://firebase.google.com/docs/cli/> .

with it installed, you can set up your config like so: 

`firebase functions:config:set algolia.app_id="YOUR_APP_ID_HERE"` 

You can set multiple variables at once by just separating them with spaces like so:

`firebase functions:config:set algolia.api_id="YOUR_API_ID_HERE" algolia.search_key="YOUR_SEARCH_KEY_HERE"`

To check you have the right config in there, you can also run:

`firebase functions:config:get`

Which should print out, in JSON format, the current config you have set.
What are you trying to achieve exactly ?

I think you missed a step, this part uses the cloud function from firebase. 
You can see here "Extending Cloud Firestore with Cloud Functions" <https://cloud.google.com/firestore/docs/extend-with-functions>

Which will help you to extend firestore with cloud functions, and here you have a tutorial to write your first cloud function: <https://firebase.google.com/docs/functions/get-started>

Once you have that, you will notice that you will create

```
const functions = require('firebase-functions');

```

Which then allow you to do:

```
functions.config()

```

This is your "functions config variables". I'm guessing if you load Algolia dependency, you will have access to

```
functions.config().algolia.xxx;

```