EVMap uses multiple different data sources, most of which require an API key. These API keys need to
be put into the app in the form of a resource file called apikeys.xml
under
app/src/main/res/values
, with the following content:
apikeys.xml content
<resources>
<string name="google_maps_key" templateMergeStrategy="preserve" translatable="false">
insert your Google Maps key here
</string>
<string name="mapbox_key" translatable="false">
insert your Mapbox key here
</string>
<string name="goingelectric_key" translatable="false">
insert your GoingElectric key here
</string>
<string name="chargeprice_key" translatable="false">
insert your Chargeprice key here
</string>
<string name="openchargemap_key" translatable="false">
insert your OpenChargeMap key here
</string>
<string name="fronyx_key" translatable="false">
insert your Fronyx key here
</string>
</resources>
Not all API keys are strictly required if you only want to work on certain parts of the app. For example, you can choose only one of the map providers and one of the charging station databases. The Chargeprice API key is also only required if you want to test the price comparison feature.
All APIs can be used for free, at least for testing. Some APIs require payment above a certain usage limit or to get access to the full dataset, but the free tiers should be plenty for local testing and development.
Below you find a list of all the services and how to obtain the API keys.
The different Map SDKs are wrapped by our fork of the
AnyMaps library to provide a common API. The google
build flavor of the app includes both Google Maps and Mapbox and allows the user to switch between
the two, while the foss
flavor only includes the Mapbox SDK.
⚠️ When testing the app using the Android Emulator, we recommend using Google Maps and not Mapbox, as the latter has issues displaying the markers. It works fine on real Android devices.
Maps SDK for Android, Places API
How to obtain an API key
- Log in to the Google API console with your Google account
- Create a new project, or select an existing one that you want to use
- Under APIs & Services → Library, enable the Maps SDK for Android and Places API.
- Under APIs & Services → Credentials, click on Create credentials → API Key
- Copy the displayed key to your
apikeys.xml
file.
How to obtain an API key
- Sign up for a Mapbox account
- Under Access Tokens, create a new access token
- Set a name for the scope and enable only the preselected public scopes. Do not restrict the token to a specific URL (this setting is not compatible with Android apps)
GoingElectric.de provides an API for their community-maintained directory of charging stations. The website and data are mostly only available in German.
How to obtain an API key
- Sign up for an account in the GoingElectric.de forum. The registration page can be switched to English using the dropdown menu under "Sprache". Then, agree to the registration terms.
- Fill in your desired username, password and email address and submit the registration form. You do not need to fill the information under GoingElectric Usermap.
- Verify your account by clicking on the link in the email you received
- Log in to the GoingElectric forum
- Go to this link to request access to
the API. This page is only available in German. You need to fill in the following data:
- name / company (Name / Firma)
- street address (Straße, Nr.)
- postal code, town (Postleitzahl, Ort)
- country (Land)
- email address (E-Mail Adresse)
- website (Webseite, optional)
- phone number (Telefonnummer, optional)
- name of the app (Name der App): EVMap
- app website (Webseite der App): https://github.com/ev-map/EVMap
- description (kurze Beschreibung der App): please explain that you would like to contribute to the development of EVMap and therefore need access to the GoingElectric.de API.
- Referrer (Herkunft): leave this field blank!
- When your access to the API is approved, you can access the API console to retrieve your API key.
How to obtain an API key
- Sign up for an account at OpenChargeMap
- Go to the My Apps page and click Register an application
- Enter the name of the app (EVMap) and website (https://github.com/ev-map/EVMap), and in the description field describe that you would like to contribute to the development of EVMap and therefore need access to the OpenChargeMap API. Do not tick the List App in Public Showcase box. Then, click save.
- Your API key will appear on the My Apps page.
How to obtain an API key
Since February 2022, the Chargeprice API is no longer available for free to new customers. However,
you can use their
staging API
for free to test the Chargeprice features. This is already
configured
by default for the debug version of the app, so you can leave the chargeprice_key
field in your
new app/src/main/res/values/apikeys.xml
file blank. Note that the staging API contains only a
limited dataset, so it only outputs prices for certain charge point operators and payment plans (see
here for
details).
In case you want to pay for access to the full Chargeprice API, check out their API docs on GitHub and contact them at [email protected].
fronyx provides us predictions of charging station availability.
How to obtain an API key
The API is not publically available, contact fronyx to get an API key and documentation.
If you don't want to test this functionality, simply leave the API key blank.