Skip to content

Commit e7bfa58

Browse files
Merge pull request #708 from TakayukiHoshi1984/feature_libmedia_multi_surface_and_host_plugin
Feature libmedia multi surface and host plugin
2 parents ad27490 + 0c27b20 commit e7bfa58

412 files changed

Lines changed: 30454 additions & 10134 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

dConnectDevicePlugin/dConnectDeviceHost/app/build.gradle

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
apply plugin: 'com.android.library'
2+
23
// Create github.properties in root project folder file with
34
// gpr.usr=GITHUB_USER_ID
45
// gpr.key=PERSONAL_ACCESS_TOKEN
@@ -10,7 +11,7 @@ if (githubPropertiesFile.exists()) {
1011
def DEMO_ZIP_NAME = "demo.zip"
1112

1213
android {
13-
compileSdkVersion 29
14+
compileSdkVersion 30
1415

1516
def getVersionName = { ->
1617
def version
@@ -51,6 +52,10 @@ android {
5152
}
5253
}
5354

55+
dataBinding {
56+
enabled = true
57+
}
58+
5459
productFlavors {
5560
}
5661

@@ -69,6 +74,7 @@ android {
6974
tasks.withType(JavaCompile) {
7075
options.encoding = 'UTF-8'
7176
}
77+
7278
repositories {
7379
maven {
7480
name = "DeviceConnect-Android"
@@ -84,12 +90,23 @@ android {
8490

8591
dependencies {
8692
implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
87-
implementation "androidx.preference:preference:1.1.0"
88-
implementation 'com.github.pedroSG94.rtmp-rtsp-stream-client-java:rtplibrary:1.9.1'
93+
implementation 'androidx.appcompat:appcompat:1.2.0'
94+
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
95+
implementation "androidx.navigation:navigation-fragment:2.3.3"
96+
implementation "androidx.navigation:navigation-ui:2.3.3"
97+
implementation "androidx.navigation:navigation-fragment-ktx:2.3.3"
98+
implementation "androidx.navigation:navigation-ui-ktx:2.3.3"
99+
implementation "androidx.preference:preference:1.1.1"
100+
implementation 'androidx.lifecycle:lifecycle-viewmodel:2.2.0'
101+
implementation 'androidx.lifecycle:lifecycle-livedata:2.2.0'
102+
implementation "androidx.lifecycle:lifecycle-extensions:2.2.0"
103+
implementation 'com.github.pedroSG94.rtmp-rtsp-stream-client-java:rtplibrary:1.9.7'
89104
implementation 'org.deviceconnect:dconnect-device-plugin-sdk:2.8.6'
90-
implementation 'org.deviceconnect:libmedia:1.1.2'
91-
implementation 'org.deviceconnect:libsrt:1.1.2'
92105
implementation 'org.deviceconnect:dconnect-demo-lib:1.0.1'
106+
implementation 'org.deviceconnect:libmedia:1.2.0'
107+
implementation 'org.deviceconnect:libsrt:1.2.0'
108+
// implementation project(':libmedia')
109+
// implementation project(':libsrt')
93110
}
94111

95112
task zipDemo(type:Zip) {

dConnectDevicePlugin/dConnectDeviceHost/app/src/main/AndroidManifest.xml

Lines changed: 86 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:tools="http://schemas.android.com/tools"
34
package="org.deviceconnect.android.deviceplugin.host">
45

56
<uses-permission android:name="android.permission.BLUETOOTH" />
@@ -23,56 +24,27 @@
2324
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
2425
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
2526
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
26-
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
2727
<uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />
2828
<uses-permission android:name="com.android.launcher.permission.UNINSTALL_SHORTCUT" />
2929
<uses-permission android:name="android.permission.ACCESS_NOTIFICATION_POLICY" />
30-
31-
<uses-feature android:name="android.hardware.camera" android:required="false"/>
32-
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false"/>
33-
<uses-feature android:name="android.hardware.camera.flash" android:required="false"/>
30+
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
31+
<uses-permission
32+
android:name="android.permission.PACKAGE_USAGE_STATS"
33+
tools:ignore="ProtectedPermissions" />
34+
35+
<uses-feature
36+
android:name="android.hardware.camera"
37+
android:required="false" />
38+
<uses-feature
39+
android:name="android.hardware.camera.autofocus"
40+
android:required="false" />
41+
<uses-feature
42+
android:name="android.hardware.camera.flash"
43+
android:required="false" />
3444

3545
<application android:allowBackup="false">
36-
<activity
37-
android:name="org.deviceconnect.android.deviceplugin.host.setting.HostSettingActivity"
38-
android:launchMode="singleTask"
39-
android:theme="@style/AppCompatTheme" />
40-
41-
<activity
42-
android:name="org.deviceconnect.android.deviceplugin.host.setting.HostGpsSettingActivity"
43-
android:exported="false"
44-
android:launchMode="singleTask"
45-
android:theme="@style/AppCompatTheme" />
4646

47-
<activity
48-
android:name="org.deviceconnect.android.deviceplugin.host.setting.HostRecorderSettingActivity"
49-
android:exported="false"
50-
android:launchMode="singleTask"
51-
android:theme="@style/AppCompatTheme" />
52-
53-
<activity
54-
android:name="org.deviceconnect.android.deviceplugin.host.setting.HostRecorderAudioSettingActivity"
55-
android:exported="false"
56-
android:launchMode="singleTask"
57-
android:theme="@style/AppCompatTheme" />
58-
59-
<activity
60-
android:name="org.deviceconnect.android.deviceplugin.host.setting.HostRecorderSRTSettingActivity"
61-
android:exported="false"
62-
android:launchMode="singleTask"
63-
android:theme="@style/AppCompatTheme" />
64-
65-
<activity
66-
android:name="org.deviceconnect.android.deviceplugin.host.setting.HostDemoSettingActivity"
67-
android:exported="false"
68-
android:launchMode="singleTask"
69-
android:theme="@style/AppCompatTheme" />
70-
71-
<activity
72-
android:name="org.deviceconnect.android.deviceplugin.host.activity.BluetoothManageActivity"
73-
android:excludeFromRecents="true"
74-
android:exported="false"
75-
android:theme="@android:style/Theme.Translucent.NoTitleBar" />
47+
<!-- 各プロファイルで表示画面 -->
7648

7749
<activity
7850
android:name="org.deviceconnect.android.deviceplugin.host.mediaplayer.VideoPlayer"
@@ -84,7 +56,7 @@
8456
android:theme="@style/AppCompatTheme" />
8557

8658
<activity
87-
android:name="org.deviceconnect.android.deviceplugin.host.activity.CanvasProfileActivity"
59+
android:name="org.deviceconnect.android.deviceplugin.host.activity.profile.CanvasProfileActivity"
8860
android:configChanges="orientation|keyboardHidden|screenSize"
8961
android:excludeFromRecents="true"
9062
android:exported="false"
@@ -93,46 +65,104 @@
9365
android:theme="@style/AppCompatTheme" />
9466

9567
<activity
96-
android:name="org.deviceconnect.android.deviceplugin.host.activity.TouchProfileActivity"
68+
android:name="org.deviceconnect.android.deviceplugin.host.activity.profile.TouchProfileActivity"
9769
android:excludeFromRecents="true"
9870
android:exported="false"
9971
android:launchMode="singleInstance"
10072
android:taskAffinity=".touch"
10173
android:theme="@style/AppCompatTheme" />
10274

10375
<activity
104-
android:name="org.deviceconnect.android.deviceplugin.host.activity.KeyEventProfileActivity"
76+
android:name="org.deviceconnect.android.deviceplugin.host.activity.profile.KeyEventProfileActivity"
10577
android:excludeFromRecents="true"
10678
android:exported="false"
10779
android:launchMode="singleInstance"
10880
android:taskAffinity=".keyevent"
10981
android:theme="@style/AppCompatTheme" />
11082

83+
<!-- パーミッション要求画面 -->
84+
11185
<activity
112-
android:name="org.deviceconnect.android.deviceplugin.host.recorder.screen.PermissionReceiverActivity"
86+
android:name=".recorder.util.OverlayPermissionActivity"
11387
android:configChanges="orientation|screenSize"
11488
android:exported="false"
115-
android:theme="@android:style/Theme.Translucent" />
89+
android:theme="@style/AppCompatTheme.Translucent" />
11690

11791
<activity
118-
android:name=".recorder.util.OverlayPermissionActivity"
92+
android:name=".recorder.util.PermissionReceiverActivity"
11993
android:configChanges="orientation|screenSize"
12094
android:exported="false"
121-
android:theme="@style/AppTheme.Translucent" />
95+
android:theme="@style/AppCompatTheme.Translucent" />
96+
97+
<activity
98+
android:name="org.deviceconnect.android.deviceplugin.host.activity.BluetoothManageActivity"
99+
android:excludeFromRecents="true"
100+
android:exported="false"
101+
android:theme="@style/AppCompatTheme.Translucent" />
122102

123103
<activity
124104
android:name="org.deviceconnect.android.deviceplugin.host.activity.GeolocationAlertDialogActivity"
125105
android:excludeFromRecents="true"
106+
android:exported="false"
126107
android:launchMode="singleInstance"
127-
android:theme="@style/AppTheme.Translucent" />
108+
android:theme="@style/AppCompatTheme.Translucent" />
128109

129-
<!-- パーミッション要求画面 -->
110+
<!-- プラグイン設定画面用の Activity -->
130111
<activity
131-
android:name="org.deviceconnect.android.activity.PermissionRequestActivity"
112+
android:name="org.deviceconnect.android.deviceplugin.host.setting.HostSettingActivity"
113+
android:exported="false"
114+
android:launchMode="singleTask"
115+
android:theme="@style/AppCompatTheme" />
116+
117+
<!-- レコーダー設定画面用の Activity -->
118+
<activity
119+
android:name=".activity.recorder.settings.SettingsActivity"
120+
android:configChanges="keyboardHidden|orientation|screenSize"
132121
android:exported="false"
133-
android:taskAffinity=".permission"
134-
android:theme="@style/Theme.Dialog.Transparent" />
122+
android:theme="@style/AppCompatTheme" />
135123

124+
<!-- プラグイン本体サービス -->
125+
<service
126+
android:name=".HostDevicePlugin"
127+
android:exported="true">
128+
<meta-data
129+
android:name="org.deviceconnect.android.deviceplugin"
130+
android:resource="@xml/org_deviceconnect_android_deviceplugin_host" />
131+
132+
<meta-data
133+
android:name="org.deviceconnect.android.deviceplugin.name"
134+
android:value="@string/app_name_host" />
135+
136+
<meta-data
137+
android:name="org.deviceconnect.android.deviceplugin.icon"
138+
android:resource="@drawable/dconnect_icon" />
139+
</service>
140+
141+
<!-- Device Connect API リクエストのレシーバー -->
142+
<!--
143+
NOTE: 下記のレシーバーは、旧仕様のDevice Connect Managerとの互換性、
144+
およびDevice Connect Managerのアンインストール検知のために残しています.
145+
-->
146+
<receiver
147+
android:name=".HostDevicePluginProvider"
148+
android:enabled="true"
149+
android:exported="true">
150+
<meta-data
151+
android:name="org.deviceconnect.android.deviceplugin"
152+
android:resource="@xml/org_deviceconnect_android_deviceplugin_host" />
153+
<intent-filter>
154+
<action android:name="org.deviceconnect.action.GET" />
155+
<action android:name="org.deviceconnect.action.PUT" />
156+
<action android:name="org.deviceconnect.action.POST" />
157+
<action android:name="org.deviceconnect.action.DELETE" />
158+
159+
<!-- uninstall notification -->
160+
<action android:name="android.intent.action.PACKAGE_FULLY_REMOVED" />
161+
<data android:scheme="package" />
162+
</intent-filter>
163+
</receiver>
164+
165+
<!-- Device Connect ファイル管理用の Provider -->
136166
<provider
137167
android:name="org.deviceconnect.android.deviceplugin.host.file.HostFileProvider"
138168
android:authorities="org.deviceconnect.android.deviceplugin.host.provider.included"

0 commit comments

Comments
 (0)