File tree Expand file tree Collapse file tree 3 files changed +29
-0
lines changed
java/com/github/quarck/calnotify Expand file tree Collapse file tree 3 files changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -71,6 +71,15 @@ dependencies {
7171 implementation " com.facebook.react:react-android"
7272 implementation " com.facebook.react:hermes-android"
7373 implementation ' com.google.android.material:material:1.0.0-rc01'
74+
75+ debugImplementation ' com.facebook.flipper:flipper:0.226.0'
76+ debugImplementation ' com.facebook.soloader:soloader:0.10.5'
77+
78+ releaseImplementation ' com.facebook.flipper:flipper-noop:0.226.0'
79+ }
80+ // https://reactnative.dev/docs/react-native-gradle-plugin
81+ react {
82+ entryFile = file(" ../../index.tsx" )
7483}
7584
7685apply from : file(" ../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle" ); applyNativeModulesAppBuildGradle(project)
Original file line number Diff line number Diff line change 143143 android : label =" @string/app_name"
144144 android : theme =" @style/Theme.AppCompat.Light.NoActionBar" >
145145 </activity >
146+ <activity android : name =" com.facebook.flipper.android.diagnostics.FlipperDiagnosticActivity"
147+ android : exported =" true" />
146148
147149 <provider
148150 android : name =" androidx.core.content.FileProvider"
Original file line number Diff line number Diff line change @@ -21,11 +21,29 @@ package com.github.quarck.calnotify
2121import android.app.Application;
2222import android.content.Context
2323
24+ import com.facebook.flipper.android.AndroidFlipperClient
25+ import com.facebook.flipper.android.utils.FlipperUtils
26+ import com.facebook.flipper.core.FlipperClient
27+ import com.facebook.flipper.plugins.inspector.DescriptorMapping
28+ import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin
29+ import com.facebook.soloader.SoLoader
30+
2431// This storage is wiped every time app is restarted. Only keep variables
2532// that are instance-specific here
2633class GlobalState : Application () {
2734 var lastNotificationRePost: Long = 0
2835 var lastTimerBroadcastReceived: Long = 0
36+
37+ override fun onCreate () {
38+ super .onCreate()
39+ SoLoader .init (this , false )
40+
41+ if (BuildConfig .DEBUG && FlipperUtils .shouldEnableFlipper(this )) {
42+ val client = AndroidFlipperClient .getInstance(this )
43+ client.addPlugin(InspectorFlipperPlugin (this , DescriptorMapping .withDefaults()))
44+ client.start()
45+ }
46+ }
2947}
3048
3149val Context .globalState: GlobalState ?
You can’t perform that action at this time.
0 commit comments