This is an automatic bus ticketing solution using NFC tags and smartphones.
Mobile application is developed by using React-Native.
- React Native Paper UI Component Library
- clone the project
- run
npm install
on the project folder it will install all the dependencies - run
npx react-native run-android
to run the project on AVD
- follow the installation guide and install all the node modules required
- locate the file
node_modules\react-native-nfc\android\src\main\java\com\novadart\reactnativenfc\ReactNativeNFCPackage.java
- comment out the line 21
@override
- file should look like this after comenting out the line 21
package com.novadart.reactnativenfc;
import com.facebook.react.ReactPackage;
import com.facebook.react.bridge.JavaScriptModule;
import com.facebook.react.bridge.NativeModule;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.uimanager.ViewManager;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
public class ReactNativeNFCPackage implements ReactPackage {
@Override
public List<NativeModule> createNativeModules(ReactApplicationContext reactContext) {
List<NativeModule> modules = new ArrayList<>(1);
modules.add(new ReactNativeNFCModule(reactContext));
return modules;
}
// @Override
public List<Class<? extends JavaScriptModule>> createJSModules() {
return Collections.emptyList();
}
@Override
public List<ViewManager> createViewManagers(ReactApplicationContext reactContext) {
return Collections.emptyList();
}
}
- If you encounter any errors in the gradle build, delete
android\app\build
folder and runnpx react-native run-android
again.