Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/sorydima/REChain-
Browse files Browse the repository at this point in the history
  • Loading branch information
sorydima committed Nov 10, 2023
2 parents 795132a + 44e99ae commit 6a214b7
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 31 deletions.
58 changes: 29 additions & 29 deletions android/app/src/main/kotlin/com/rechain/online/FcmPushService.kt
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
package com.rechain.online
// package com.rechain.online

import com.famedly.fcm_shared_isolate.FcmSharedIsolateService
// import com.famedly.fcm_shared_isolate.FcmSharedIsolateService

import com.rechain.online.MainActivity
// import com.rechain.online.MainActivity

import io.flutter.embedding.android.FlutterActivity
import io.flutter.embedding.engine.FlutterEngine
import io.flutter.view.FlutterMain
import io.flutter.embedding.engine.dart.DartExecutor.DartEntrypoint
// import io.flutter.embedding.android.FlutterActivity
// import io.flutter.embedding.engine.FlutterEngine
// import io.flutter.view.FlutterMain
// import io.flutter.embedding.engine.dart.DartExecutor.DartEntrypoint

import android.content.Context
import android.os.Bundle
import android.util.Log
import android.view.WindowManager
// import android.content.Context
// import android.os.Bundle
// import android.util.Log
// import android.view.WindowManager

class FcmPushService : FcmSharedIsolateService() {
override fun getEngine(): FlutterEngine {
return provideEngine(getApplicationContext())
}
// class FcmPushService : FcmSharedIsolateService() {
// override fun getEngine(): FlutterEngine {
// return provideEngine(getApplicationContext())
// }

companion object {
fun provideEngine(context: Context): FlutterEngine {
var engine = MainActivity.engine
if (engine == null) {
engine = MainActivity.provideEngine(context)
engine.getLocalizationPlugin().sendLocalesToFlutter(
context.getResources().getConfiguration())
engine.getDartExecutor().executeDartEntrypoint(
DartEntrypoint.createDefault())
}
return engine
}
}
}
// companion object {
// fun provideEngine(context: Context): FlutterEngine {
// var engine = MainActivity.engine
// if (engine == null) {
// engine = MainActivity.provideEngine(context)
// engine.getLocalizationPlugin().sendLocalesToFlutter(
// context.getResources().getConfiguration())
// engine.getDartExecutor().executeDartEntrypoint(
// DartEntrypoint.createDefault())
// }
// return engine
// }
// }
// }
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ import android.content.Context
import androidx.multidex.MultiDex

class MainActivity : FlutterActivity() {

override fun attachBaseContext(base: Context) {
super.attachBaseContext(base)
MultiDex.install(this)
}


override fun provideFlutterEngine(context: Context): FlutterEngine? {
return provideEngine(this)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ class UnifiedPushReceiver : UnifiedPushReceiver() {
}
return engine
}
}
}
2 changes: 1 addition & 1 deletion codemagic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ workflows:

# Configuration related to TestFlight (optional)
# Note: This action is performed during post-processing.
submit_to_testflight: false
submit_to_testflight: true
beta_groups: # Specify the names of beta tester groups that will get access to the build once it has passed beta review.
- group name 1
- group name 2
Expand Down

0 comments on commit 6a214b7

Please sign in to comment.