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
1c7336c3
Commit
1c7336c3
authored
Sep 22, 2021
by
霍志良
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:
parent
54289d1a
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
28 additions
and
10 deletions
+28
-10
build.gradle
app/build.gradle
+1
-1
DemoAppLifecycles.kt
app/src/main/java/com/ydl/component/base/DemoAppLifecycles.kt
+6
-1
config.gradle
config.gradle
+3
-3
build.gradle
m-im/build.gradle
+1
-1
BaseFlutterActivity.kt
ydl-flutter-base/src/main/java/com/channel/ydl_flutter_base/base/BaseFlutterActivity.kt
+1
-1
Flutter.java
ydl-flutter-base/src/main/java/com/channel/ydl_flutter_base/base/Flutter.java
+1
-1
PlayService.kt
ydl-media/src/main/java/com/ydl/media/audio/PlayService.kt
+13
-0
build.gradle
ydl-platform/build.gradle
+1
-1
build.gradle
ydl-webview/build.gradle
+1
-1
No files found.
app/build.gradle
View file @
1c7336c3
...
...
@@ -37,7 +37,7 @@ android {
multiDexEnabled
true
ndk
{
abiFilters
"arm
eabi-v7
a"
// 指定要ndk需要兼容的架构(这样其他依赖包里mips,x86,armeabi,arm-v8之类的so会被过滤掉)
abiFilters
"arm
64-v8
a"
// 指定要ndk需要兼容的架构(这样其他依赖包里mips,x86,armeabi,arm-v8之类的so会被过滤掉)
}
}
...
...
app/src/main/java/com/ydl/component/base/DemoAppLifecycles.kt
View file @
1c7336c3
...
...
@@ -78,7 +78,12 @@ class DemoAppLifecycles : IAppLifecycles {
// flutterEngine.getLocalizationChannel().channel.setMethodCallHandler(plugin);
val
intent
=
Intent
(
application
,
PlayService
::
class
.
java
)
application
.
startService
(
intent
)
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
O
)
{
application
.
startForegroundService
(
intent
)
}
else
{
application
.
startService
(
intent
)
}
// application.registerActivityLifecycleCallbacks(new CoursePlayLifecycle());
Stetho
.
initializeWithDefaults
(
application
)
...
...
config.gradle
View file @
1c7336c3
...
...
@@ -40,7 +40,7 @@ ext {
"ydl-media"
:
"0.0.21.10"
,
"ydl-pay"
:
"0.0.18.19"
,
"m-audioim"
:
"0.0.49.29.41"
,
"ydl-flutter-base"
:
"0.0.14.
29
"
,
"ydl-flutter-base"
:
"0.0.14.
31
"
,
//以下 几乎不会动
"router"
:
"0.0.1"
,
...
...
@@ -122,7 +122,7 @@ ext {
"ydl-media"
:
"0.0.21.10"
,
"ydl-pay"
:
"0.0.18.19"
,
"m-audioim"
:
"0.0.49.29.41"
,
"ydl-flutter-base"
:
"0.0.14.
29
"
,
"ydl-flutter-base"
:
"0.0.14.
31
"
,
//以下 几乎不会动
"router"
:
"0.0.1"
,
...
...
@@ -271,7 +271,7 @@ ext {
//flutter功能组件升级===>发布ydl-flutter组件===>引用flutter相关的业务模块
"ydl-flutter-base"
:
"com.ydl:ydl-flutter-base:${ydlCompileVersion["
ydl
-
flutter
-
base
"]}"
,
//组件化项目中的flutter base模块
"ydl-flutter"
:
"com.ydl:ydl-flutter:0.0.3
3
@aar"
,
//flutter aar
"ydl-flutter"
:
"com.ydl:ydl-flutter:0.0.3
7
@aar"
,
//flutter aar
// "ydl-flutter-sp" : "com.ydl:ydl-flutter-sp:0.0.2@aar", //flutter 缓存 aar
//基础组件 <<--- 先发这个,发完改这里的版本号
...
...
m-im/build.gradle
View file @
1c7336c3
...
...
@@ -38,7 +38,7 @@ android {
flavorDimensions
"versionCode"
//Flavor 维度信息
ndk
{
abiFilters
"arm
eabi-v7
a"
abiFilters
"arm
64-v8
a"
}
}
...
...
ydl-flutter-base/src/main/java/com/channel/ydl_flutter_base/base/BaseFlutterActivity.kt
View file @
1c7336c3
...
...
@@ -52,7 +52,7 @@ abstract class BaseFlutterActivity : FlutterActivity() {
public
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
super
.
onCreate
(
savedInstanceState
)
GeneratedPluginRegistrant
.
registerWith
(
this
)
//
GeneratedPluginRegistrant.registerWith(this)
/**
* 获取统一路由传递过来的参数并初始化交互通道
...
...
ydl-flutter-base/src/main/java/com/channel/ydl_flutter_base/base/Flutter.java
View file @
1c7336c3
...
...
@@ -97,7 +97,7 @@ public final class Flutter {
arguments
.
bundlePath
=
FlutterMain
.
findAppBundlePath
(
activity
.
getApplicationContext
());
arguments
.
entrypoint
=
"main"
;
flutterView
.
runFromBundle
(
arguments
);
GeneratedPluginRegistrant
.
registerWith
(
flutterView
.
getPluginRegistry
());
//
GeneratedPluginRegistrant.registerWith(flutterView.getPluginRegistry());
}
@OnLifecycleEvent
(
Lifecycle
.
Event
.
ON_START
)
...
...
ydl-media/src/main/java/com/ydl/media/audio/PlayService.kt
View file @
1c7336c3
package
com.ydl.media.audio
import
android.app.NotificationChannel
import
android.app.NotificationManager
import
android.app.Service
import
android.content.Context
import
android.content.Intent
import
android.os.Binder
import
android.os.Build
import
android.os.IBinder
import
android.util.Log
import
androidx.core.app.NotificationCompat
import
com.ydl.media.audio.constants.Extras
import
com.ydl.media.audio.manager.MediaSessionManager
import
com.ydl.media.audio.manager.NotifyManager
...
...
@@ -23,6 +27,15 @@ class PlayService : Service() {
override
fun
onCreate
()
{
super
.
onCreate
()
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
O
){
var
nm
=
getSystemService
(
NOTIFICATION_SERVICE
)
as
NotificationManager
;
//数字是随便写的“40”,
nm
.
createNotificationChannel
(
NotificationChannel
(
"40"
,
"App Service"
,
NotificationManager
.
IMPORTANCE_DEFAULT
));
var
builder
=
new
NotificationCompat
.
Builder
(
this
,
"40"
);
//其中的2,是也随便写的,正式项目也是随便写
startForeground
(
2
,
builder
.
build
());
}
Log
.
i
(
TAG
,
"onCreate: "
+
javaClass
.
simpleName
)
AudioPlayer
.
get
().
init
(
this
)
MediaSessionManager
.
get
().
init
(
this
)
...
...
ydl-platform/build.gradle
View file @
1c7336c3
...
...
@@ -23,7 +23,7 @@ android {
flavorDimensions
"versionCode"
ndk
{
abiFilters
"arm
eabi-v7
a"
abiFilters
"arm
64-v8
a"
}
vectorDrawables
.
useSupportLibrary
=
true
}
...
...
ydl-webview/build.gradle
View file @
1c7336c3
...
...
@@ -26,7 +26,7 @@ android {
}
ndk
{
abiFilters
"arm
eabi
"
abiFilters
"arm
64-v8a
"
}
}
...
...
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