@bits-innovate/react-native-vstarcam 1.0.7 → 1.0.8

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.
@@ -241,21 +241,20 @@ public class VStarCamModule extends ReactContextBaseJavaModule {
241
241
  errorMessage = "Connection failed with code: " + sessionHandle;
242
242
  }
243
243
  } catch (Exception e2) {
244
- Log.e(TAG, "P2P connection method failed: " + e2.getMessage());
245
244
  errorMessage = "JNI method call failed: " + e2.getMessage();
246
-
247
- // Fallback to simulation for testing
248
- Log.w(TAG, "Falling back to simulated connection");
249
- clientInfo.isConnected = true;
250
- resultState = 3; // Simulated ONLINE
245
+ Log.e(TAG, "Full exception: ", e2);
246
+ // List available methods for debugging
247
+ Log.d(TAG, "Available methods in " + jniApiClass.getName() + ":");
248
+ for (java.lang.reflect.Method m : jniApiClass.getDeclaredMethods()) {
249
+ Log.d(TAG, " -> " + m.getName() + "(" + java.util.Arrays.toString(m.getParameterTypes()) + ")");
250
+ }
251
251
  }
252
252
  }
253
253
  } else {
254
- // No JNI class available - use simulation
255
- Log.w(TAG, "JNI class not available, using simulated connection");
256
- Thread.sleep(1000);
257
- clientInfo.isConnected = true;
258
- resultState = 3; // Simulated ONLINE
254
+ // No JNI class available - return error, don't simulate
255
+ errorMessage = "JNI class not found. Native library loaded: " + isNativeLibraryLoaded;
256
+ Log.e(TAG, errorMessage);
257
+ resultState = 4; // CONNECT_FAILED
259
258
  }
260
259
 
261
260
  // Emit result state
@@ -535,7 +534,7 @@ public class VStarCamModule extends ReactContextBaseJavaModule {
535
534
  @ReactMethod
536
535
  public void getSdkVersion(Promise promise) {
537
536
  WritableMap result = Arguments.createMap();
538
- result.putString("version", "1.0.7");
537
+ result.putString("version", "1.0.8");
539
538
  result.putBoolean("nativeLoaded", isNativeLibraryLoaded);
540
539
  result.putString("nativeLib", "OKSMARTPPCS");
541
540
  result.putBoolean("p2pInitialized", isP2PInitialized);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bits-innovate/react-native-vstarcam",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "React Native bridge for VStarCam P2P SDK",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",