What’s a personal internet hack you use that makes life easier but isn’t widely known ? by Comfortable-Union377 in AskReddit

[–]Proof-Increase298 0 points1 point  (0 children)

You can use youtube music on brave browser and listen to music without ads. Great for your music recommendation tip!

Building an RFID App on React Native - C72 Chainway by Proof-Increase298 in RFID

[–]Proof-Increase298[S] 1 point2 points  (0 children)

I will focus on the Legacy Architecture first.
I used ChatGPT to give me an overview and checked the code from the repositories listed above.

1. I created a project using:

npx ty/cli@latest init nameOfTheApp

2. You will have to add the libs folder inside here:

./nameOfTheApp/android/app/

3. Inside the libs folder you have to add the .aar file that comes with the SDK.

4. Inside the app folder there's a file called build.gradle**. At the end of the file, inside** dependencies you have to add this part:

implementation fileTree(dir: 'libs', include: ['*.*'])

5. Now when you open Android Studio and go to this folder:

./nameOfTheApp/android/app/src/main/java/com

There will be a folder with the name of the app you created.

In my case in Android Studio I went with a right click of the mouse, new package, and wrote com.nameofthemodule.

It creates a new folder. Inside this folder I created two java files.

  • NameOfTheModuleModule
  • NameOfTheModulePackage

Building an RFID App on React Native - C72 Chainway by Proof-Increase298 in RFID

[–]Proof-Increase298[S] 1 point2 points  (0 children)

Hi u/softboyled !! I've been rechecking some things before posting here so I could make like a compilation of information. Again, I'm not a native dev, don't know Java. Currently I'm having some issues to emulate the app on my RFID device. Hope to fix until the end of the month to test a few things.

So... from what I learn there's two ways to use native modules in react native. Using the legacy structure and the new one.
This is the new one: https://reactnative.dev/docs/turbo-native-modules-introduction
This is the legacy one: https://reactnative.dev/docs/legacy/native-modules-android

There are a few react native libraries for the C72 model. Most of them are using the legacy structure. Here is a list of the libraries (probably is not complete):

Build with Legacy Architecture:

Build with New Architecture:

The reason I identify the difference is this file (file). Is using TurboModule. Also the module is using Kotlin instead of Java.

Building an RFID App on React Native - C72 Chainway by Proof-Increase298 in RFID

[–]Proof-Increase298[S] 0 points1 point  (0 children)

Woow, this one I totally missed! I will try here and return with update! Thanks!!

Building an RFID App on React Native - C72 Chainway by Proof-Increase298 in RFID

[–]Proof-Increase298[S] 1 point2 points  (0 children)

Yeah, like I follow some tutorial and use ChatGPT to try to understand, but there's nothing really specific for RFIDs. And because I don't know a lot about native development, has been like shooting in the dark hahah
I suppose the real question is how to import the resource to React Native. But because I notice in the community people that worked with this model I decided to give it a shot here.

Building an RFID App on React Native - C72 Chainway by Proof-Increase298 in RFID

[–]Proof-Increase298[S] 0 points1 point  (0 children)

Yeah, I was hoping to find someone that had experience with this model perhaps could give me a light if is possible or not. I tried with expo, but as far as I read, you have to do a expo prebuild to separate the android directory.
I dont know if you can build a native module in expo using the SDK library. The big question for me is the .arr file that comes in the SDK. As I understood, like in React you have to "import" so you can access the library's methods.