Skip to content

pdhruv93/timestamp-react-native-app

Repository files navigation

Timestamping React Native Application

Create new project

npx react-native init Timestamping

google-services.json

Check if project url is present else add: "firebase_url": "https://timestamps-aaddf-default-rtdb.firebaseio.com"

changes in MainActivity.java

import com.facebook.react.ReactActivityDelegate; import com.facebook.react.ReactRootView; import com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView;

@Override protected ReactActivityDelegate createReactActivityDelegate() { return new ReactActivityDelegate(this, getMainComponentName()) { @Override protected ReactRootView createRootView() { return new RNGestureHandlerEnabledRootView(MainActivity.this); } }; }

Vector icons not showing

react-native link react-native-vector-icons

In AndroidManifest.xml

NFC related changes

FB Login related changes(will be told in setup wizard):

FB Login related changes In strings.xml(will be told in setup wizard)

209034510719349 fb209034510719349

Key Hash for Facebook Login

keytool -exportcert -alias timestamp -keystore "C:\Users\dhruv.pandey\Desktop\hackathon\Timestamping\android\app\debug.keystore" | openssl sha1 -binary | openssl base64

Keystore pass: android

Gradle related changes(quite important and confusing)

For Firebase DB(Given in setup wizard): Project-level build.gradle (/build.gradle): buildscript { repositories { // Check that you have the following line (if not, add it): google() // Google's Maven repository } dependencies { ... // Add this line classpath 'com.google.gms:google-services:4.3.5' } }

allprojects { ... repositories { // Check that you have the following line (if not, add it): google() // Google's Maven repository ... } } App-level build.gradle (//build.gradle): apply plugin: 'com.android.application' // Add this line apply plugin: 'com.google.gms.google-services'

dependencies { // Import the Firebase BoM implementation platform('com.google.firebase:firebase-bom:27.1.0') implementation 'com.google.firebase:firebase-database'

// Add the dependencies for the desired Firebase products // https://firebase.google.com/docs/android/setup#available-libraries }

For FB Login: Project-level build.gradle (/build.gradle): buildscript { ext { buildToolsVersion = "29.0.3" minSdkVersion = 21 compileSdkVersion = 29 targetSdkVersion = 29 ndkVersion = "20.1.5948944" } repositories { mavenCentral() //ADD THIS google() jcenter() }

App-level build.gradle (//build.gradle):

dependencies { implementation fileTree(dir: "libs", include: ["*.jar"]) //noinspection GradleDynamicVersion implementation "com.facebook.react:react-native:+" // From node_modules implementation 'com.facebook.android:facebook-android-sdk:[5,6)' //ADD THIS

Start Metro server

react-native start --port=8088

Run App

react-native run-android --port=8088

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published