Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YDL-Component-Medical
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杨凯
YDL-Component-Medical
Commits
8261cbe7
Commit
8261cbe7
authored
Nov 21, 2019
by
徐健
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
backup
parent
759c4e7c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
2 deletions
+22
-2
DemoAppLifecycles.java
app/src/main/java/com/ydl/component/base/DemoAppLifecycles.java
+19
-2
YDLCommonPlugin.kt
ydl-flutter-base/src/main/java/com/channel/ydl_flutter_base/plugin/YDLCommonPlugin.kt
+3
-0
No files found.
app/src/main/java/com/ydl/component/base/DemoAppLifecycles.java
View file @
8261cbe7
...
...
@@ -4,7 +4,10 @@ package com.ydl.component.base;
import
android.app.Application
;
import
android.content.Context
;
import
android.content.Intent
;
import
android.os.Handler
;
import
com.channel.ydl_flutter_base.base.BaseFlutterActivity
;
import
com.channel.ydl_flutter_base.plugin.YDLCommonPlugin
;
import
com.ydl.devicesidlib.DeviceIDHelper
;
import
com.ydl.media.audio.PlayService
;
import
com.ydl.ydlcommon.base.delegate.IAppLifecycles
;
...
...
@@ -13,7 +16,17 @@ import com.yidianling.course.lifeCallback.CoursePlayLifecycle;
import
org.jetbrains.annotations.NotNull
;
import
java.util.concurrent.TimeUnit
;
import
io.flutter.app.FlutterActivityDelegate
;
import
io.flutter.embedding.engine.FlutterEngine
;
import
io.flutter.embedding.engine.dart.DartExecutor
;
import
io.flutter.plugin.common.MethodChannel
;
import
io.flutter.plugins.GeneratedPluginRegistrant
;
import
io.flutter.view.FlutterMain
;
import
io.reactivex.Observable
;
import
io.reactivex.android.schedulers.AndroidSchedulers
;
import
io.reactivex.schedulers.Schedulers
;
/**
* Created by haorui on 2019-09-02.
...
...
@@ -36,6 +49,12 @@ public class DemoAppLifecycles implements IAppLifecycles {
//Flutter 初始化需要在主线程中执行
FlutterMain
.
startInitialization
(
application
);
// FlutterMain.ensureInitializationComplete(application, null);
//
// FlutterEngine flutterEngine = new FlutterEngine(application);
// flutterEngine.getDartExecutor().executeDartEntrypoint(DartExecutor.DartEntrypoint.createDefault());
// YDLCommonPlugin plugin = new YDLCommonPlugin();
// flutterEngine.getLocalizationChannel().channel.setMethodCallHandler(plugin);
Intent
intent
=
new
Intent
(
application
,
PlayService
.
class
);
application
.
startService
(
intent
);
...
...
@@ -45,6 +64,5 @@ public class DemoAppLifecycles implements IAppLifecycles {
@Override
public
void
onTerminate
(
@NotNull
Application
application
)
{
}
}
\ No newline at end of file
ydl-flutter-base/src/main/java/com/channel/ydl_flutter_base/plugin/YDLCommonPlugin.kt
View file @
8261cbe7
...
...
@@ -8,6 +8,7 @@ import com.ydl.ydlcommon.data.PlatformDataManager
import
com.ydl.ydlcommon.modular.ModularServiceManager
import
com.yidianling.common.tools.RxDeviceTool
import
io.flutter.app.FlutterActivity
import
io.flutter.embedding.engine.FlutterEngine
import
io.flutter.plugin.common.MethodCall
import
io.flutter.plugin.common.MethodChannel
import
io.flutter.view.FlutterView
...
...
@@ -17,6 +18,8 @@ import io.flutter.view.FlutterView
*/
class
YDLCommonPlugin
:
MethodChannel
.
MethodCallHandler
{
constructor
()
private
var
mActivity
:
FlutterActivity
?
=
null
private
constructor
(
activity
:
FlutterActivity
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment