Template
24 lines
597 B
Kotlin
24 lines
597 B
Kotlin
package com.weightscalebridge
|
|||
|
|
|
||
|
|
import com.facebook.react.bridge.ReactApplicationContext
|
||
|
|
import com.facebook.react.module.annotations.ReactModule
|
||
|
|
|
||
|
|
@ReactModule(name = WeightScaleBridgeModule.NAME)
|
||
|
|
class WeightScaleBridgeModule(reactContext: ReactApplicationContext) :
|
||
|
|
NativeWeightScaleBridgeSpec(reactContext) {
|
||
|
|
|
||
|
|
override fun getName(): String {
|
||
|
|
return NAME
|
||
|
|
}
|
||
|
|
|
||
|
|
// Example method
|
||
|
|
// See https://reactnative.dev/docs/native-modules-android
|
||
|
|
override fun multiply(a: Double, b: Double): Double {
|
||
|
|
return a * b
|
||
|
|
}
|
||
|
|
|
||
|
|
companion object {
|
||
|
|
const val NAME = "WeightScaleBridge"
|
||
|
|
}
|
||
|
|
}
|