Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
A
appzxhy
Project
Project
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wanglei
appzxhy
Commits
cf5b475c
Commit
cf5b475c
authored
Dec 16, 2024
by
wanglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
...通知intent
parent
2ed3614b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
IntentUtils.kt
app/src/main/java/com/base/appzxhy/utils/IntentUtils.kt
+10
-2
No files found.
app/src/main/java/com/base/appzxhy/utils/IntentUtils.kt
View file @
cf5b475c
...
...
@@ -3,6 +3,7 @@ package com.base.appzxhy.utils
import
android.content.Context
import
android.content.Intent
import
android.net.Uri
import
android.os.Build
import
android.provider.Settings
object
IntentUtils
{
...
...
@@ -14,9 +15,16 @@ object IntentUtils {
return
intent
}
fun
intentLocationSetting
():
Intent
{
val
intent
:
Intent
=
Intent
(
Settings
.
ACTION_LOCATION_SOURCE_SETTINGS
)
fun
intentNotificationSettings
(
context
:
Context
):
Intent
{
val
intent
=
Intent
()
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
O
)
{
intent
.
action
=
Settings
.
ACTION_APP_NOTIFICATION_SETTINGS
intent
.
putExtra
(
Settings
.
EXTRA_APP_PACKAGE
,
context
.
packageName
)
}
else
{
intent
.
action
=
"android.settings.APP_NOTIFICATION_SETTINGS"
intent
.
putExtra
(
"app_package"
,
context
.
packageName
)
}
return
intent
}
}
\ No newline at end of file
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