Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lintangwisesa/android-react_native-favoriot-api
A simple Android React Native app using Favoriot API
https://github.com/lintangwisesa/android-react_native-favoriot-api
android axios favoriot react-native
Last synced: 4 days ago
JSON representation
A simple Android React Native app using Favoriot API
- Host: GitHub
- URL: https://github.com/lintangwisesa/android-react_native-favoriot-api
- Owner: LintangWisesa
- Created: 2019-06-27T01:46:09.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T01:13:01.000Z (almost 2 years ago)
- Last Synced: 2023-03-07T10:26:50.219Z (over 1 year ago)
- Topics: android, axios, favoriot, react-native
- Language: JavaScript
- Homepage: https://www.youtube.com/watch?v=vH764RTC_Vc
- Size: 2.28 MB
- Stars: 0
- Watchers: 0
- Forks: 2
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
![simplinnovation](https://4.bp.blogspot.com/-f7YxPyqHAzY/WJ6VnkvE0SI/AAAAAAAADTQ/0tDQPTrVrtMAFT-q-1-3ktUQT5Il9FGdQCLcB/s350/simpLINnovation1a.png)
# Android React Native & Favoriot API
[![Video Lintang](https://img.youtube.com/vi/vH764RTC_Vc/0.jpg)](https://www.youtube.com/watch?v=vH764RTC_Vc)
1. Make sure [__*Node.js*__](https://nodejs.org/en/) is installed on your PC, then simply download or clone this repo and install all dependencies:
```bash
$ git clone https://github.com/LintangWisesa/Android-React_Native-Favoriot-API.git$ cd Android-React_Native-Favoriot-API
$ npm install
```#
2. Open your code editor (I'm using [__*Visual Studio Code*__](https://code.visualstudio.com/)), insert your __*Favoriot API key*__ and __*Favoriot device developer ID*__ to the __App.js__ file!
- __*API key*__ goes to request headers:```javascript
var headers = {
headers: {
'Content-Type': 'application/json',
'apikey': 'your_API_key'
}
}
```- __*Device developer ID*__ goes to request headers:
```javascript
var dataBody = {
device_developer_id: 'your_device_developer_ID',
data: {
Temperature: this.state.input1,
Humidity: this.state.input2,
Potentio: this.state.input3
}
}
```
#3. Open your Android emulator or AVD (_Android Virtual Device_), in this case I'm using __*Genymotion*__ cause it's lighter than __*Android Studio*__'s AVD. Then just run the project!
```bash
$ react-native run-android
```The app will be run automatically on your AVD. Try to POST some data & GET the data back from Favoriot!
![android](./app.png)
Enjoy your code~ 😍
#
#### Lintang Wisesa :love_letter: [email protected]_
[Facebook](https://www.facebook.com/lintangbagus) |
[Twitter](https://twitter.com/Lintang_Wisesa) |
[Google+](https://plus.google.com/u/0/+LintangWisesa1) |
[Youtube](https://www.youtube.com/user/lintangbagus) |
:octocat: [GitHub](https://github.com/LintangWisesa) |
[Hackster](https://www.hackster.io/lintangwisesa)