Skip to content

This is a React-Native Typescript application that serves as an example on how to implement calls to the TomTom Points Of Interest Search API using Native Modules.

Notifications You must be signed in to change notification settings

johnkozaris/TomTomPOIExample

Repository files navigation

TomTom POIS API Usage Example 👋

Version License: MIT

This is a React-Native Typescript application that serves as an example on how to implement calls to the TomTom Points Of Interest Search API using Native Modules.
Using React Hooks and React Components we are creatinng a custom List View that inflates its children when a TomTom API response is received.
The Items inside this List View get populated from the Json response received from the API.
The network requests are implemented in native android (java). They are returned as a promise to React-Native (Typescript).

This project only implements native Android modules, iOS is not yet implemented.

Prerequisites

Dependencies & 3rd Party Libraries

Name Downloads
react-native-get-location badge
accordion-collapse-react-native badge

Install

Download the project and install all the dependencies using:

git clone https://github.com/johnkozaris/TomTomPOIExample.git
cd TomTomPOIExample
npm install

TomTom API Key

Creating a TomTom Developer Account

  1. Create a TomTom Developer Account
  2. Login and go to your Dashboard
  3. In the Keys Section, Generate and copy an API KEY

Using your API Key in The Project:

  1. Go inside the android native files and open the TomTomPOIModule Class located in android/app/src/main/java/com/tomtompoiexample/TomTomPOIModule.java
  2. Inside the class find the static final String TOMTOM_API_KEY and put your API key there

Usage

First you need to start the Metro Javascript bundler. Inside the project root directory run:

react-native start

In order to run the app in a connected android device or emulator run:

react-native run-android 

Disclaimer

In ordered to be easier to review this code contains A LOT of unneeded comments But this also makes it better to serve as an example application.

Author

👤 John Kozaris


Give a ⭐️ if this project helped you!

About

This is a React-Native Typescript application that serves as an example on how to implement calls to the TomTom Points Of Interest Search API using Native Modules.

Topics

Resources

Stars

Watchers

Forks