ilabs-flir 1.0.4 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/android/Flir/build.gradle.kts +14 -27
  2. package/android/Flir/libs/androidsdk-release.aar +0 -0
  3. package/android/Flir/libs/thermalsdk-release.aar +0 -0
  4. package/android/Flir/src/main/java/flir/android/FlirDownloadManager.kt +23 -44
  5. package/android/Flir/src/main/java/flir/android/FlirModule.kt +32 -0
  6. package/android/Flir/src/main/java/flir/android/FlirSDKLoader.kt +35 -194
  7. package/android/Flir/src/main/java/flir/android/FlirSdkManager.java +410 -1161
  8. package/package.json +1 -1
  9. package/src/index.d.ts +21 -1
  10. package/android/Flir/libs/flir-stubs.jar +0 -0
  11. package/android/Flir/src/main/java/com/flir/thermalsdk/ErrorCode.java +0 -13
  12. package/android/Flir/src/main/java/com/flir/thermalsdk/ErrorCodeException.java +0 -14
  13. package/android/Flir/src/main/java/com/flir/thermalsdk/ThermalSdkAndroid.java +0 -16
  14. package/android/Flir/src/main/java/com/flir/thermalsdk/androidsdk/image/BitmapAndroid.java +0 -20
  15. package/android/Flir/src/main/java/com/flir/thermalsdk/image/ImageBuffer.java +0 -11
  16. package/android/Flir/src/main/java/com/flir/thermalsdk/image/JavaImageBuffer.java +0 -35
  17. package/android/Flir/src/main/java/com/flir/thermalsdk/image/Palette.java +0 -15
  18. package/android/Flir/src/main/java/com/flir/thermalsdk/image/PaletteManager.java +0 -16
  19. package/android/Flir/src/main/java/com/flir/thermalsdk/image/Point.java +0 -11
  20. package/android/Flir/src/main/java/com/flir/thermalsdk/image/ThermalImage.java +0 -23
  21. package/android/Flir/src/main/java/com/flir/thermalsdk/image/ThermalValue.java +0 -9
  22. package/android/Flir/src/main/java/com/flir/thermalsdk/live/Camera.java +0 -26
  23. package/android/Flir/src/main/java/com/flir/thermalsdk/live/CameraType.java +0 -8
  24. package/android/Flir/src/main/java/com/flir/thermalsdk/live/CommunicationInterface.java +0 -16
  25. package/android/Flir/src/main/java/com/flir/thermalsdk/live/ConnectParameters.java +0 -16
  26. package/android/Flir/src/main/java/com/flir/thermalsdk/live/Identity.java +0 -23
  27. package/android/Flir/src/main/java/com/flir/thermalsdk/live/IpSettings.java +0 -9
  28. package/android/Flir/src/main/java/com/flir/thermalsdk/live/RemoteControl.java +0 -16
  29. package/android/Flir/src/main/java/com/flir/thermalsdk/live/connectivity/ConnectionStatusListener.java +0 -7
  30. package/android/Flir/src/main/java/com/flir/thermalsdk/live/discovery/DiscoveryEventListener.java +0 -14
  31. package/android/Flir/src/main/java/com/flir/thermalsdk/live/discovery/DiscoveryFactory.java +0 -33
  32. package/android/Flir/src/main/java/com/flir/thermalsdk/live/remote/OnReceived.java +0 -5
  33. package/android/Flir/src/main/java/com/flir/thermalsdk/live/remote/OnRemoteError.java +0 -7
  34. package/android/Flir/src/main/java/com/flir/thermalsdk/live/streaming/Stream.java +0 -8
  35. package/android/Flir/src/main/java/com/flir/thermalsdk/live/streaming/ThermalStreamer.java +0 -28
  36. package/android/Flir/src/main/java/com/flir/thermalsdk/live/streaming/VisualStreamer.java +0 -18
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ilabs-flir",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "FLIR Thermal SDK for React Native - On-Demand Download",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
package/src/index.d.ts CHANGED
@@ -13,5 +13,25 @@ export interface FlirDownloadAPI {
13
13
  delete(): Promise<boolean>;
14
14
  }
15
15
 
16
+ export interface SDKStatus {
17
+ available: boolean;
18
+ arch: string;
19
+ dexPath: string;
20
+ nativeLibPath: string;
21
+ dexExists: boolean;
22
+ nativeLibsExist: boolean;
23
+ }
24
+
25
+ export interface FlirModuleAPI {
26
+ getTemperatureFromColor(color: number): Promise<number>;
27
+ getLatestFramePath(): Promise<string | null>;
28
+ getTemperatureAt(x: number, y: number): Promise<number>;
29
+ isEmulator(): Promise<boolean>;
30
+ isDeviceConnected(): Promise<boolean>;
31
+ getConnectedDeviceInfo(): Promise<string>;
32
+ isSDKDownloaded(): Promise<boolean>;
33
+ getSDKStatus(): Promise<SDKStatus>;
34
+ }
35
+
16
36
  export declare const FlirDownload: FlirDownloadAPI;
17
- export declare const FlirModule: any;
37
+ export declare const FlirModule: FlirModuleAPI;
Binary file
@@ -1,13 +0,0 @@
1
- package com.flir.thermalsdk;
2
-
3
- /**
4
- * Stub enum for FLIR SDK ErrorCode - compile-time only.
5
- */
6
- public enum ErrorCode {
7
- OK,
8
- GENERIC_ERROR,
9
- CAMERA_ERROR,
10
- CONNECTION_ERROR,
11
- TIMEOUT,
12
- CANCELLED
13
- }
@@ -1,14 +0,0 @@
1
- package com.flir.thermalsdk;
2
-
3
- public class ErrorCodeException extends Exception {
4
- private final ErrorCode errorCode;
5
-
6
- public ErrorCodeException(ErrorCode errorCode) {
7
- super(errorCode.toString());
8
- this.errorCode = errorCode;
9
- }
10
-
11
- public ErrorCode getErrorCode() {
12
- return errorCode;
13
- }
14
- }
@@ -1,16 +0,0 @@
1
- package com.flir.thermalsdk;
2
-
3
- import android.content.Context;
4
-
5
- /**
6
- * Stub class for FLIR SDK ThermalSdkAndroid - compile-time only.
7
- */
8
- public class ThermalSdkAndroid {
9
- public static void init(Context context) {
10
- throw new UnsupportedOperationException("Stub!");
11
- }
12
-
13
- public static void init(Context context, Object licenseCallback) {
14
- throw new UnsupportedOperationException("Stub!");
15
- }
16
- }
@@ -1,20 +0,0 @@
1
- package com.flir.thermalsdk.androidsdk.image;
2
-
3
- import android.graphics.Bitmap;
4
- import com.flir.thermalsdk.image.JavaImageBuffer;
5
-
6
- /**
7
- * Stub class for FLIR SDK BitmapAndroid - compile-time only.
8
- * The actual implementation is loaded at runtime from the FLIR SDK AAR.
9
- */
10
- public class BitmapAndroid {
11
- private Bitmap bitMap;
12
-
13
- public static BitmapAndroid createBitmap(JavaImageBuffer buffer) {
14
- throw new UnsupportedOperationException("Stub!");
15
- }
16
-
17
- public Bitmap getBitMap() {
18
- throw new UnsupportedOperationException("Stub!");
19
- }
20
- }
@@ -1,11 +0,0 @@
1
- package com.flir.thermalsdk.image;
2
-
3
- public interface ImageBuffer {
4
- int getWidth();
5
-
6
- int getHeight();
7
-
8
- int getStride();
9
-
10
- byte[] getPixelBuffer();
11
- }
@@ -1,35 +0,0 @@
1
- package com.flir.thermalsdk.image;
2
-
3
- public class JavaImageBuffer implements ImageBuffer {
4
- public final byte[] pixelBuffer;
5
- public final int height;
6
- public final int width;
7
- public final int stride;
8
-
9
- public JavaImageBuffer(byte[] pixelBuffer, int width, int height, int stride) {
10
- this.pixelBuffer = pixelBuffer;
11
- this.width = width;
12
- this.height = height;
13
- this.stride = stride;
14
- }
15
-
16
- @Override
17
- public int getWidth() {
18
- return width;
19
- }
20
-
21
- @Override
22
- public int getHeight() {
23
- return height;
24
- }
25
-
26
- @Override
27
- public int getStride() {
28
- return stride;
29
- }
30
-
31
- @Override
32
- public byte[] getPixelBuffer() {
33
- return pixelBuffer;
34
- }
35
- }
@@ -1,15 +0,0 @@
1
- package com.flir.thermalsdk.image;
2
-
3
- public class Palette {
4
- public final String name;
5
- public final boolean inverted;
6
-
7
- public Palette(String name, boolean inverted) {
8
- this.name = name;
9
- this.inverted = inverted;
10
- }
11
-
12
- public Palette getInverted() {
13
- return new Palette(name, !inverted);
14
- }
15
- }
@@ -1,16 +0,0 @@
1
- package com.flir.thermalsdk.image;
2
-
3
- import java.util.ArrayList;
4
- import java.util.List;
5
-
6
- public class PaletteManager {
7
- public static List<Palette> getDefaultPalettes() {
8
- List<Palette> palettes = new ArrayList<>();
9
- palettes.add(new Palette("iron", false));
10
- palettes.add(new Palette("rainbow", false));
11
- palettes.add(new Palette("arctic", false));
12
- palettes.add(new Palette("lava", false));
13
- palettes.add(new Palette("grayscale", false));
14
- return palettes;
15
- }
16
- }
@@ -1,11 +0,0 @@
1
- package com.flir.thermalsdk.image;
2
-
3
- public class Point {
4
- public final int x;
5
- public final int y;
6
-
7
- public Point(int x, int y) {
8
- this.x = x;
9
- this.y = y;
10
- }
11
- }
@@ -1,23 +0,0 @@
1
- package com.flir.thermalsdk.image;
2
-
3
- public class ThermalImage {
4
- public void setPalette(Palette palette) {
5
- // Stub implementation
6
- }
7
-
8
- public Palette getPalette() {
9
- return null;
10
- }
11
-
12
- public int getWidth() {
13
- return 0;
14
- }
15
-
16
- public int getHeight() {
17
- return 0;
18
- }
19
-
20
- public ThermalValue getValueAt(Point point) {
21
- return new ThermalValue(0.0);
22
- }
23
- }
@@ -1,9 +0,0 @@
1
- package com.flir.thermalsdk.image;
2
-
3
- public class ThermalValue {
4
- public final double value;
5
-
6
- public ThermalValue(double value) {
7
- this.value = value;
8
- }
9
- }
@@ -1,26 +0,0 @@
1
- package com.flir.thermalsdk.live;
2
-
3
- import com.flir.thermalsdk.live.connectivity.ConnectionStatusListener;
4
- import com.flir.thermalsdk.live.streaming.Stream;
5
- import java.util.List;
6
-
7
- /**
8
- * Stub class for FLIR SDK Camera - compile-time only.
9
- */
10
- public class Camera {
11
- public void connect(ConnectParameters params, ConnectionStatusListener listener) {
12
- throw new UnsupportedOperationException("Stub!");
13
- }
14
-
15
- public void disconnect() {
16
- throw new UnsupportedOperationException("Stub!");
17
- }
18
-
19
- public List<Stream> getStreams() {
20
- throw new UnsupportedOperationException("Stub!");
21
- }
22
-
23
- public RemoteControl getRemoteControl() {
24
- throw new UnsupportedOperationException("Stub!");
25
- }
26
- }
@@ -1,8 +0,0 @@
1
- package com.flir.thermalsdk.live;
2
-
3
- public enum CameraType {
4
- FLIR_ONE,
5
- FLIR_ONE_PRO,
6
- FLIR_ONE_EDGE,
7
- GENERIC
8
- }
@@ -1,16 +0,0 @@
1
- package com.flir.thermalsdk.live;
2
-
3
- public enum CommunicationInterface {
4
- USB,
5
- NETWORK,
6
- FIREWIRE,
7
- EMULATOR,
8
- BLUETOOTH,
9
- EBUS,
10
- USBHSI,
11
- LIGHTNING,
12
- INTEGRATED,
13
- FLIR_ONE_WIRELESS,
14
- ACE,
15
- CUSTOM
16
- }
@@ -1,16 +0,0 @@
1
- package com.flir.thermalsdk.live;
2
-
3
- import com.flir.thermalsdk.live.Identity;
4
-
5
- /**
6
- * Stub class for FLIR SDK ConnectParameters - compile-time only.
7
- */
8
- public class ConnectParameters {
9
- public ConnectParameters() {
10
- throw new UnsupportedOperationException("Stub!");
11
- }
12
-
13
- public ConnectParameters(Identity identity) {
14
- throw new UnsupportedOperationException("Stub!");
15
- }
16
- }
@@ -1,23 +0,0 @@
1
- package com.flir.thermalsdk.live;
2
-
3
- public class Identity {
4
- public final CommunicationInterface communicationInterface;
5
- public final CameraType cameraType;
6
- public final IpSettings ipSettings;
7
- public final String deviceId;
8
-
9
- public Identity() {
10
- this.communicationInterface = null;
11
- this.cameraType = null;
12
- this.ipSettings = null;
13
- this.deviceId = null;
14
- }
15
-
16
- public Identity(CommunicationInterface communicationInterface, CameraType cameraType, String deviceId,
17
- IpSettings ipSettings) {
18
- this.communicationInterface = communicationInterface;
19
- this.cameraType = cameraType;
20
- this.deviceId = deviceId;
21
- this.ipSettings = ipSettings;
22
- }
23
- }
@@ -1,9 +0,0 @@
1
- package com.flir.thermalsdk.live;
2
-
3
- public class IpSettings {
4
- public final String ipAddress;
5
-
6
- public IpSettings(String ipAddress) {
7
- this.ipAddress = ipAddress;
8
- }
9
- }
@@ -1,16 +0,0 @@
1
- package com.flir.thermalsdk.live;
2
-
3
- /**
4
- * Stub class for FLIR SDK RemoteControl - compile-time only.
5
- */
6
- public class RemoteControl {
7
- public void subscribeStream(com.flir.thermalsdk.live.streaming.Stream stream,
8
- com.flir.thermalsdk.live.remote.OnReceived callback,
9
- com.flir.thermalsdk.live.remote.OnRemoteError errorCallback) {
10
- throw new UnsupportedOperationException("Stub!");
11
- }
12
-
13
- public void unsubscribeStream(com.flir.thermalsdk.live.streaming.Stream stream) {
14
- throw new UnsupportedOperationException("Stub!");
15
- }
16
- }
@@ -1,7 +0,0 @@
1
- package com.flir.thermalsdk.live.connectivity;
2
-
3
- import com.flir.thermalsdk.ErrorCode;
4
-
5
- public interface ConnectionStatusListener {
6
- void onDisconnected(ErrorCode errorCode);
7
- }
@@ -1,14 +0,0 @@
1
- package com.flir.thermalsdk.live.discovery;
2
-
3
- import com.flir.thermalsdk.live.CommunicationInterface;
4
- import com.flir.thermalsdk.live.Identity;
5
-
6
- /**
7
- * Stub interface for FLIR SDK DiscoveryEventListener - compile-time only.
8
- */
9
- public interface DiscoveryEventListener {
10
- void onCameraFound(Identity identity);
11
- void onCameraLost(Identity identity);
12
- void onDiscoveryError(CommunicationInterface iface, String errorMessage);
13
- void onDiscoveryFinished(CommunicationInterface iface);
14
- }
@@ -1,33 +0,0 @@
1
- package com.flir.thermalsdk.live.discovery;
2
-
3
- import com.flir.thermalsdk.live.CommunicationInterface;
4
-
5
- /**
6
- * Stub class for FLIR SDK DiscoveryFactory - compile-time only.
7
- * The real SDK uses instance methods via getInstance().
8
- */
9
- public class DiscoveryFactory {
10
-
11
- private static DiscoveryFactory instance;
12
-
13
- private DiscoveryFactory() {}
14
-
15
- public static DiscoveryFactory getInstance() {
16
- if (instance == null) {
17
- instance = new DiscoveryFactory();
18
- }
19
- return instance;
20
- }
21
-
22
- public void scan(DiscoveryEventListener listener, CommunicationInterface... interfaces) {
23
- throw new UnsupportedOperationException("Stub!");
24
- }
25
-
26
- public void stop(CommunicationInterface... interfaces) {
27
- throw new UnsupportedOperationException("Stub!");
28
- }
29
-
30
- public void stop() {
31
- throw new UnsupportedOperationException("Stub!");
32
- }
33
- }
@@ -1,5 +0,0 @@
1
- package com.flir.thermalsdk.live.remote;
2
-
3
- public interface OnReceived<T> {
4
- void onReceived(T data);
5
- }
@@ -1,7 +0,0 @@
1
- package com.flir.thermalsdk.live.remote;
2
-
3
- import com.flir.thermalsdk.ErrorCode;
4
-
5
- public interface OnRemoteError {
6
- void onRemoteError(ErrorCode error);
7
- }
@@ -1,8 +0,0 @@
1
- package com.flir.thermalsdk.live.streaming;
2
-
3
- /**
4
- * Stub interface for FLIR SDK Stream - compile-time only.
5
- */
6
- public interface Stream {
7
- // Marker interface for stream types
8
- }
@@ -1,28 +0,0 @@
1
- package com.flir.thermalsdk.live.streaming;
2
-
3
- import com.flir.thermalsdk.image.ThermalImage;
4
-
5
- /**
6
- * Stub class for FLIR SDK ThermalStreamer - compile-time only.
7
- */
8
- public class ThermalStreamer implements Stream {
9
- public ThermalStreamer(Stream stream) {
10
- throw new UnsupportedOperationException("Stub!");
11
- }
12
-
13
- public void update() {
14
- throw new UnsupportedOperationException("Stub!");
15
- }
16
-
17
- public Object getImage() {
18
- throw new UnsupportedOperationException("Stub!");
19
- }
20
-
21
- public void withThermalImage(ThermalImageCallback callback) {
22
- throw new UnsupportedOperationException("Stub!");
23
- }
24
-
25
- public interface ThermalImageCallback {
26
- void run(ThermalImage thermalImage);
27
- }
28
- }
@@ -1,18 +0,0 @@
1
- package com.flir.thermalsdk.live.streaming;
2
-
3
- /**
4
- * Stub class for FLIR SDK VisualStreamer - compile-time only.
5
- */
6
- public class VisualStreamer implements Stream {
7
- public VisualStreamer(Stream stream) {
8
- throw new UnsupportedOperationException("Stub!");
9
- }
10
-
11
- public void update() {
12
- throw new UnsupportedOperationException("Stub!");
13
- }
14
-
15
- public Object getImage() {
16
- throw new UnsupportedOperationException("Stub!");
17
- }
18
- }