This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). | |
* | |
* Do not edit this file as changes may cause incorrect behavior and will be lost | |
* once the code is regenerated. | |
* | |
* @generated by codegen project: GenerateModuleJavaSpec.js | |
* | |
* @nolint |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.simcardinfo | |
class SimcardInfoModule(reactContext: ReactApplicationContext) :NativeSimcardInfoSpec(reactContext) { | |
fun onAirplaneModeChanged(isAirplaneModeOn: Boolean) { | |
emitOnAirplaneModeChange(isAirplaneModeOn) | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"codegenConfig": { | |
"name": "RNSimcardInfoSpec", | |
"type": "modules", | |
"jsSrcsDir": "src", | |
"outputDir": { | |
"ios": "ios/generated", | |
"android": "android/generated" | |
}, | |
"android": { | |
"javaPackageName": "com.simcardinfo" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import type { TurboModule } from 'react-native'; | |
import { TurboModuleRegistry } from 'react-native'; | |
import type { EventEmitter } from 'react-native/Libraries/Types/CodegenTypes'; | |
export interface Spec extends TurboModule { | |
readonly onAirplaneModeChange: EventEmitter<boolean>; | |
readonly onSIMCardStateChange: EventEmitter<Array<Object>>; | |
} | |
export default TurboModuleRegistry.getEnforcing<Spec>('SimcardInfo'); |