Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
abook_check
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abook_android
abook_check
Commits
a17455e7
Commit
a17455e7
authored
Mar 05, 2025
by
Kim Jinsung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#64361 Android14対応
parent
da08b453
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
4 deletions
+31
-4
ABVJE_Launcher_Android/AndroidManifest.xml
+4
-1
ABVJE_UI_Android/AndroidManifest.xml
+1
-1
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/appinfo/AppDefType.java
+1
-0
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/helper/ABookPermissionHelper.java
+25
-2
No files found.
ABVJE_Launcher_Android/AndroidManifest.xml
View file @
a17455e7
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
<uses-permission
android:name=
"android.permission.ACCESS_NETWORK_STATE"
/>
<uses-permission
android:name=
"android.permission.ACCESS_NETWORK_STATE"
/>
<uses-permission
android:name=
"android.permission.ACCESS_WIFI_STATE"
/>
<uses-permission
android:name=
"android.permission.ACCESS_WIFI_STATE"
/>
<uses-permission
android:name=
"android.permission.READ_EXTERNAL_STORAGE"
/>
<uses-permission
android:name=
"android.permission.READ_EXTERNAL_STORAGE"
android:maxSdkVersion=
"28"
/>
<uses-permission
android:name=
"android.permission.WRITE_EXTERNAL_STORAGE"
/>
<uses-permission
android:name=
"android.permission.WRITE_EXTERNAL_STORAGE"
/>
<uses-permission
android:name=
"android.permission.INTERNET"
/>
<uses-permission
android:name=
"android.permission.INTERNET"
/>
<uses-permission
android:name=
"android.permission.ACCESS_NETWORK_STATE"
/>
<uses-permission
android:name=
"android.permission.ACCESS_NETWORK_STATE"
/>
...
@@ -40,9 +40,12 @@
...
@@ -40,9 +40,12 @@
<permission
<permission
android:name=
"${applicationId}.permission.C2D_MESSAGE"
android:name=
"${applicationId}.permission.C2D_MESSAGE"
android:protectionLevel=
"signature"
/>
android:protectionLevel=
"signature"
/>
<!-- Android13 -->
<uses-permission
android:name=
"android.permission.READ_MEDIA_VIDEO"
/>
<uses-permission
android:name=
"android.permission.READ_MEDIA_VIDEO"
/>
<uses-permission
android:name=
"android.permission.READ_MEDIA_IMAGES"
/>
<uses-permission
android:name=
"android.permission.READ_MEDIA_IMAGES"
/>
<uses-permission
android:name=
"android.permission.POST_NOTIFICATIONS"
/>
<uses-permission
android:name=
"android.permission.POST_NOTIFICATIONS"
/>
<!-- Android14 -->
<uses-permission
android:name=
"android.permission.READ_MEDIA_VISUAL_USER_SELECTED"
/>
<supports-screens
android:anyDensity=
"true"
android:xlargeScreens=
"true"
android:largeScreens=
"true"
android:normalScreens=
"true"
android:smallScreens=
"false"
/>
<supports-screens
android:anyDensity=
"true"
android:xlargeScreens=
"true"
android:largeScreens=
"true"
android:normalScreens=
"true"
android:smallScreens=
"false"
/>
...
...
ABVJE_UI_Android/AndroidManifest.xml
View file @
a17455e7
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
<uses-permission
android:name=
"android.permission.BLUETOOTH_ADMIN"
/>
<uses-permission
android:name=
"android.permission.BLUETOOTH_ADMIN"
/>
<uses-permission
android:name=
"android.permission.GET_ACCOUNTS"
/>
<uses-permission
android:name=
"android.permission.GET_ACCOUNTS"
/>
<uses-permission
android:name=
"android.permission.WRITE_EXTERNAL_STORAGE"
/>
<uses-permission
android:name=
"android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion=
"28"
/>
<uses-permission
android:name=
"android.permission.READ_EXTERNAL_STORAGE"
/>
<uses-permission
android:name=
"android.permission.READ_EXTERNAL_STORAGE"
/>
<!-- Wifi使用権限 -->
<!-- Wifi使用権限 -->
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/appinfo/AppDefType.java
View file @
a17455e7
...
@@ -90,6 +90,7 @@ public interface AppDefType {
...
@@ -90,6 +90,7 @@ public interface AppDefType {
//Android13から追加した権限追加
//Android13から追加した権限追加
String
ANDROID_13_NOTIFICATION_PERMISSION_CHECK
=
"android13NotificationPermissionCheck"
;
String
ANDROID_13_NOTIFICATION_PERMISSION_CHECK
=
"android13NotificationPermissionCheck"
;
String
ANDROID_13_IMAGE_VIDEO_CHECK_PERMISSION_CHECK
=
"android13ImageVideoPermissionCheck"
;
String
ANDROID_13_IMAGE_VIDEO_CHECK_PERMISSION_CHECK
=
"android13ImageVideoPermissionCheck"
;
String
ANDROID_14_PERMISSION_CHECK
=
"android14PermissionCheck"
;
}
}
interface
SubMenuType
{
interface
SubMenuType
{
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/helper/ABookPermissionHelper.java
View file @
a17455e7
...
@@ -78,6 +78,19 @@ public class ABookPermissionHelper {
...
@@ -78,6 +78,19 @@ public class ABookPermissionHelper {
}
}
}
}
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
UPSIDE_DOWN_CAKE
)
{
//Android14以上
boolean
android14PermissionCheckFlg
=
PreferenceUtil
.
getUserPref
(
mContext
,
AppDefType
.
UserPrefKey
.
ANDROID_14_PERMISSION_CHECK
,
true
);
if
(
android14PermissionCheckFlg
)
{
if
(
ContextCompat
.
checkSelfPermission
(
mContext
,
android
.
Manifest
.
permission
.
READ_MEDIA_VISUAL_USER_SELECTED
)
!=
PackageManager
.
PERMISSION_GRANTED
)
{
reqPermissions
.
add
(
android
.
Manifest
.
permission
.
READ_MEDIA_VIDEO
);
reqPermissions
.
add
(
android
.
Manifest
.
permission
.
READ_MEDIA_IMAGES
);
reqPermissions
.
add
(
android
.
Manifest
.
permission
.
READ_MEDIA_VISUAL_USER_SELECTED
);
}
PreferenceUtil
.
putUserPref
(
mContext
,
AppDefType
.
UserPrefKey
.
ANDROID_14_PERMISSION_CHECK
,
false
);
}
}
return
reqPermissions
;
return
reqPermissions
;
}
}
public
ArrayList
<
String
>
checkMultiPermissions
()
{
public
ArrayList
<
String
>
checkMultiPermissions
()
{
...
@@ -107,12 +120,18 @@ public class ABookPermissionHelper {
...
@@ -107,12 +120,18 @@ public class ABookPermissionHelper {
reqPermissions
.
add
(
android
.
Manifest
.
permission
.
READ_MEDIA_IMAGES
);
reqPermissions
.
add
(
android
.
Manifest
.
permission
.
READ_MEDIA_IMAGES
);
PreferenceUtil
.
putUserPref
(
mContext
,
AppDefType
.
UserPrefKey
.
ANDROID_13_IMAGE_VIDEO_CHECK_PERMISSION_CHECK
,
false
);
PreferenceUtil
.
putUserPref
(
mContext
,
AppDefType
.
UserPrefKey
.
ANDROID_13_IMAGE_VIDEO_CHECK_PERMISSION_CHECK
,
false
);
}
}
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
UPSIDE_DOWN_CAKE
)
{
//Android14以上
if
(
ContextCompat
.
checkSelfPermission
(
mContext
,
android
.
Manifest
.
permission
.
READ_MEDIA_VISUAL_USER_SELECTED
)
!=
PackageManager
.
PERMISSION_GRANTED
)
{
reqPermissions
.
add
(
android
.
Manifest
.
permission
.
READ_MEDIA_VISUAL_USER_SELECTED
);
PreferenceUtil
.
putUserPref
(
mContext
,
AppDefType
.
UserPrefKey
.
ANDROID_14_PERMISSION_CHECK
,
false
);
}
}
if
(
ContextCompat
.
checkSelfPermission
(
mContext
,
if
(
ContextCompat
.
checkSelfPermission
(
mContext
,
android
.
Manifest
.
permission
.
POST_NOTIFICATIONS
)
!=
PackageManager
.
PERMISSION_GRANTED
)
{
android
.
Manifest
.
permission
.
POST_NOTIFICATIONS
)
!=
PackageManager
.
PERMISSION_GRANTED
)
{
reqPermissions
.
add
(
android
.
Manifest
.
permission
.
POST_NOTIFICATIONS
);
reqPermissions
.
add
(
android
.
Manifest
.
permission
.
POST_NOTIFICATIONS
);
PreferenceUtil
.
putUserPref
(
mContext
,
AppDefType
.
UserPrefKey
.
ANDROID_13_NOTIFICATION_PERMISSION_CHECK
,
false
);
PreferenceUtil
.
putUserPref
(
mContext
,
AppDefType
.
UserPrefKey
.
ANDROID_13_NOTIFICATION_PERMISSION_CHECK
,
false
);
}
}
}
else
{
}
else
{
// ストレージ
// ストレージ
if
(
ContextCompat
.
checkSelfPermission
(
mContext
,
if
(
ContextCompat
.
checkSelfPermission
(
mContext
,
...
@@ -160,7 +179,11 @@ public class ABookPermissionHelper {
...
@@ -160,7 +179,11 @@ public class ABookPermissionHelper {
switch
(
mPermitionType
)
{
switch
(
mPermitionType
)
{
case
Constant
.
ABookPermissionType
.
ReadExternalStorage
:
case
Constant
.
ABookPermissionType
.
ReadExternalStorage
:
boolean
permissionGranted
=
true
;
boolean
permissionGranted
=
true
;
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
TIRAMISU
)
{
//Android13以上
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
UPSIDE_DOWN_CAKE
)
{
//Android14以上
if
(
ContextCompat
.
checkSelfPermission
(
mContext
,
android
.
Manifest
.
permission
.
READ_MEDIA_VISUAL_USER_SELECTED
)
!=
PERMISSION_GRANTED
)
{
permissionGranted
=
false
;
}
}
else
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
TIRAMISU
)
{
//Android13以上
if
(
ContextCompat
.
checkSelfPermission
(
mContext
,
android
.
Manifest
.
permission
.
READ_MEDIA_IMAGES
)
!=
PERMISSION_GRANTED
)
{
if
(
ContextCompat
.
checkSelfPermission
(
mContext
,
android
.
Manifest
.
permission
.
READ_MEDIA_IMAGES
)
!=
PERMISSION_GRANTED
)
{
permissionGranted
=
false
;
permissionGranted
=
false
;
}
}
...
...
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