Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6290

How to use native Java code in my React Native cli Android app?

$
0
0

I want to add nativ Java code to my React Native cli android app. How can i do this? For example i want to call this enum from a Java file ...

package chip.setuppayload;/** Enum values for possible bits in the onboarding paylod's discovery capabilities bitmask. */public enum DiscoveryCapability {  SOFT_AP,  BLE,  ON_NETWORK}

... in this Typescript class:

import {QrCodeInfo} from "./QrCodeInfo";export class Greeter {    version: number;    vendorId: number;    productId: number;    discriminator: number;    setupPinCode: number;    commissioningFlow: number;    discoveryCapabilities: Set<DiscoveryCapability>;    ipAddress: String | null;    constructor(version: number, vendorId: number, productId: number, discriminator: number, setupPinCode: number, commissioningFlow: number, optionalQrCodeInfoMap: Map<number, QrCodeInfo>, discoveryCapabilities: Set<DiscoveryCapability>, ipAddress: String | null) {        this.version = version;        this.vendorId = vendorId;        this.productId = productId;        this.discriminator = discriminator;        this.setupPinCode = setupPinCode;        this.commissioningFlow = commissioningFlow;        this.discoveryCapabilities = discoveryCapabilities;        this.ipAddress = ipAddress;    }}

In general i want to being able to use this Matter sdk (https://github.com/project-chip/connectedhomeip) to build my own Matter Android app with React Native (like the ChipTool app https://github.com/project-chip/connectedhomeip/tree/master/examples/android/CHIPTool). I would also be really grateful if you could send me any nice tutorials for this topic.


Viewing all articles
Browse latest Browse all 6290

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>