r89shi / bluetooth-ble-example

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TypeScript React Native

🛠️ Requirements

Before start, check if you have the Android Studio.

Download Android Studio

🚀 Installation

1. Clone the repository

git clone https://github.com/r89shi/bluetooth-ble-example.git

2. Install the dependencies

Warning

For some reason the pnpm does not work, so if you have some error like Register Component problably that is the reason.

Important

Before install remove the package: @config-plugins/react-native-ble-plx from the packege.json file.

I do recommend, first install all others packages using the npx expo install, after that install the @config-plugins/react-native-ble-plx using npm or yarn

Install packages

npx expo install

Install config-plugins

npm install @config-plugins/react-native-ble-plx

or

yarn install @config-plugins/react-native-ble-plx

3. Open the Android Studio

Open the Android Studio and start one Android Emulator.

4. Prepare project

Export the Android folder from the project.

npx expo prebuild

4. Run the start

Start the project and let it running to create an auto link.

Note

Make this step only in the first initialization, after that it is not necessary.

npm start

or

yarn start

4. Run the android

For this step connect a physical device on USB.

npm android

or

yarn android

About


Languages

Language:TypeScript 99.3%Language:JavaScript 0.7%