From 8ce419213f76ec4c30c4df9fdc46c92dbcfff9dd Mon Sep 17 00:00:00 2001
From: Varun Sendilraj
+
+
+ Revolutionizing the Future of Hydroponics
+
+
+
+
+
Agro-Q
+
+
+
+
This source code is licensed under the MIT license found in the LICENSE file in the root
+ * directory of this source tree.
+ */
+package com.agroq;
+
+import android.content.Context;
+import com.facebook.flipper.android.AndroidFlipperClient;
+import com.facebook.flipper.android.utils.FlipperUtils;
+import com.facebook.flipper.core.FlipperClient;
+import com.facebook.flipper.plugins.crashreporter.CrashReporterPlugin;
+import com.facebook.flipper.plugins.databases.DatabasesFlipperPlugin;
+import com.facebook.flipper.plugins.fresco.FrescoFlipperPlugin;
+import com.facebook.flipper.plugins.inspector.DescriptorMapping;
+import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin;
+import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor;
+import com.facebook.flipper.plugins.network.NetworkFlipperPlugin;
+import com.facebook.flipper.plugins.react.ReactFlipperPlugin;
+import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin;
+import com.facebook.react.ReactInstanceManager;
+import com.facebook.react.bridge.ReactContext;
+import com.facebook.react.modules.network.NetworkingModule;
+import okhttp3.OkHttpClient;
+
+public class ReactNativeFlipper {
+ public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) {
+ if (FlipperUtils.shouldEnableFlipper(context)) {
+ final FlipperClient client = AndroidFlipperClient.getInstance(context);
+
+ client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults()));
+ client.addPlugin(new ReactFlipperPlugin());
+ client.addPlugin(new DatabasesFlipperPlugin(context));
+ client.addPlugin(new SharedPreferencesFlipperPlugin(context));
+ client.addPlugin(CrashReporterPlugin.getInstance());
+
+ NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin();
+ NetworkingModule.setCustomClientBuilder(
+ new NetworkingModule.CustomClientBuilder() {
+ @Override
+ public void apply(OkHttpClient.Builder builder) {
+ builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin));
+ }
+ });
+ client.addPlugin(networkFlipperPlugin);
+ client.start();
+
+ // Fresco Plugin needs to ensure that ImagePipelineFactory is initialized
+ // Hence we run if after all native modules have been initialized
+ ReactContext reactContext = reactInstanceManager.getCurrentReactContext();
+ if (reactContext == null) {
+ reactInstanceManager.addReactInstanceEventListener(
+ new ReactInstanceManager.ReactInstanceEventListener() {
+ @Override
+ public void onReactContextInitialized(ReactContext reactContext) {
+ reactInstanceManager.removeReactInstanceEventListener(this);
+ reactContext.runOnNativeModulesQueueThread(
+ new Runnable() {
+ @Override
+ public void run() {
+ client.addPlugin(new FrescoFlipperPlugin());
+ }
+ });
+ }
+ });
+ } else {
+ client.addPlugin(new FrescoFlipperPlugin());
+ }
+ }
+ }
+}
diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..9057cc4
--- /dev/null
+++ b/android/app/src/main/AndroidManifest.xml
@@ -0,0 +1,35 @@
+
z6=Jc^Y|56Fk1CHrVddlnNAA!B;1tQiJB}o|IGH@E1TF3xgV_F;CMQxO9uRW$8wcA(
zjOi)-yA*doGj2r7SB`i;Klb2rBkMW)FzYF&z_m!ZujC|(wE6-)99)jn{Cr0aY`V1_
z0%u9nQu9wx_nRL@x43 9po(mC;xgZJxI5gC)~i
zA_?`YC3URStH`&FuG8pa*WBu!WL;gdr+Ti-H8(veSzk~4-;&m#(xT1o6V0sG|7rMR
zg0NX-DHAeJWs!*hq6?}@q0(fPCuejTsxll*!(Am8 !@4xTi
zM|L_nl~iKoPT4bsjcvlEcoun_)>8MP)FS!`_hOF{^FW3#^5<@cOY|(FOF8C26}wAN
zQ0Ira&*7sq8L(&n3C%wK2OE05%z(XpdRag@td~g(8Q04a%9VQA0NrF-FGHLOj!*lh
z8NBFHy=(z*Iu5uqi8M%+h$y9%87v R0AMv>n9kBSrZWQv
zj8gze2D43>%1lq=EoEYKXnJNcW0)Apj%Q300}~mniO~t`cy@Yp@8}R8Su?eG2E#oz
zY#1FM%pQ@b ?
zc;&&bU6#J=hRZ&B*)x~#xcv2(f8g@ZUy;3{dBuHKJa@$_R}NiyzOjr9qJ1n2en@-h*gG(U36b5ezocLsCNM$FT5Vzj97L$l_}of%
z&^($sP;($Vp4~S&aDcGi*uY@!HZ2zdy|8hkVQT-;iHvP}AUima)qfz@Ms3|IG>>Nn
zGxA|Vh11G3mN`~{;c#YjFe~--uU(USTdQy75A+`C7g}#EOVOdtm_BH{3^*K}88;jo
z86BBX1~VgI5;Ml($Yjeoa3UcbBku|}h@qw!eddlTu2gA*T|_--@bJk)%yRcc++
zdSZEc`5Tr$x8j-=Cs(|@a?Q${S3b7#nU#MxIWl?Yls@(JbaMLm^yAY%ow;)6gEP;r
z;#W