added start and stop recording code

This commit is contained in:
Sayed Owais Ali
2023-09-11 19:01:59 +05:30
parent 033df22b92
commit e3ae160ffd
5 changed files with 17 additions and 7 deletions

View File

@@ -264,7 +264,7 @@ android {
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.navi.medici:alfred:navi_v1.0.0-20230908.112959-9"
implementation 'com.navi.medici:alfred:navi_v1.0.0-20230911.101354-15'
//noinspection GradleDynamicVersion
implementation "com.facebook.react:react-native:+" // From node_modules
@@ -328,3 +328,4 @@ def isNewArchitectureEnabled() {
}
apply plugin: 'com.google.gms.google-services'

View File

@@ -82,7 +82,7 @@ public class DeviceUtilsModule extends ReactContextBaseJavaModule implements Act
}
@ReactMethod
public void startRecording(View rootView) {
AlfredManager.INSTANCE.startRecording(RNContext, rootView, "", "", null);
public void startRecording() {
// AlfredManager.INSTANCE.startRecording(RNContext, rootView, "", "", null);
}
}

View File

@@ -28,9 +28,18 @@ public class MainActivity extends ReactActivity {
@Override
protected void onResume() {
super.onResume();
AlfredManager.INSTANCE.startRecording(getApplicationContext(), getWindow().getDecorView().getRootView(), "", "", null);
AlfredManager.config.setEnableRecordingStatus(true);
AlfredManager.config.setAlfredStatus(true);
AlfredManager.INSTANCE.startRecording(this, getWindow().getDecorView().getRootView(), "cosmos", "cosmos", null);
}
@Override
protected void onStop() {
super.onStop();
AlfredManager.INSTANCE.stopRecording(this.getWindow().getDecorView().getRootView());
}
/**
* Returns the instance of the {@link ReactActivityDelegate}. There the RootView is created and
* you can specify the renderer you wish to use - the new renderer (Fabric) or the old renderer

View File

@@ -73,7 +73,7 @@ public class MainApplication extends Application implements ReactApplication {
SoLoader.init(this, /* native exopackage */ false);
initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
AlfredConfig alfredConfig = new AlfredConfig();
AlfredConfig alfredConfig = new AlfredConfig("Cosmos", "336", "4.0.0","qa");
AlfredManager.INSTANCE.init(alfredConfig, getApplicationContext());
// https://github.com/rt2zz/redux-persist/issues/284#issuecomment-1011214066

View File

@@ -62,11 +62,11 @@ const AuthRouter = () => {
useFCM();
return isLoggedIn ? (
<TrackingComponent>
// <TrackingComponent>
<BlockerScreen>
<ProtectedRouter />
</BlockerScreen>
</TrackingComponent>
// </TrackingComponent>
) : (
<UnProtectedRouter />
);