Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
F
FileManager
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
yanglin
FileManager
Commits
268e06ae
Commit
268e06ae
authored
Apr 19, 2024
by
yanglin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
111
parent
e66dd0d2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
3 deletions
+8
-3
AndroidManifest.xml
MyDemo3/app/src/main/AndroidManifest.xml
+1
-0
MainActivity.kt
...pp/src/main/java/com/xm/test/myfilemaster/MainActivity.kt
+0
-2
HomeActivity.kt
...in/java/com/xm/test/myfilemaster/activity/HomeActivity.kt
+6
-0
NotificationHelper.kt
...m/xm/test/myfilemaster/notification/NotificationHelper.kt
+1
-1
No files found.
MyDemo3/app/src/main/AndroidManifest.xml
View file @
268e06ae
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
<uses-permission
android:name=
"android.permission.ACCESS_FINE_LOCATION"
/>
<uses-permission
android:name=
"android.permission.ACCESS_FINE_LOCATION"
/>
<uses-permission
android:name=
"android.permission.BLUETOOTH"
/>
<uses-permission
android:name=
"android.permission.BLUETOOTH"
/>
<uses-permission
android:name=
"android.permission.ACCESS_WIFI_STATE"
/>
<uses-permission
android:name=
"android.permission.ACCESS_WIFI_STATE"
/>
<uses-permission
android:name=
"android.permission.POST_NOTIFICATIONS"
/>
<uses-permission
<uses-permission
android:name=
"android.permission.DELETE_PACKAGES"
android:name=
"android.permission.DELETE_PACKAGES"
tools:ignore=
"ProtectedPermissions"
/>
tools:ignore=
"ProtectedPermissions"
/>
...
...
MyDemo3/app/src/main/java/com/xm/test/myfilemaster/MainActivity.kt
View file @
268e06ae
...
@@ -40,8 +40,6 @@ class MainActivity : AppCompatActivity(), MaxAdListener {
...
@@ -40,8 +40,6 @@ class MainActivity : AppCompatActivity(), MaxAdListener {
private
fun
initView
()
{
private
fun
initView
()
{
NotificationHelper
.
postNotification
()
val
isAgreeAppPage
=
MyApplication
.
mSp
?.
getBoolean
(
"isAgreeAppPage"
,
false
)
?:
false
val
isAgreeAppPage
=
MyApplication
.
mSp
?.
getBoolean
(
"isAgreeAppPage"
,
false
)
?:
false
if
(
isAgreeAppPage
){
if
(
isAgreeAppPage
){
startAppPage
()
startAppPage
()
...
...
MyDemo3/app/src/main/java/com/xm/test/myfilemaster/activity/HomeActivity.kt
View file @
268e06ae
...
@@ -19,6 +19,8 @@ import com.xm.test.myfilemaster.R
...
@@ -19,6 +19,8 @@ import com.xm.test.myfilemaster.R
import
com.xm.test.myfilemaster.fragment.FileManagerFragment
import
com.xm.test.myfilemaster.fragment.FileManagerFragment
import
com.xm.test.myfilemaster.fragment.HomeFragment
import
com.xm.test.myfilemaster.fragment.HomeFragment
import
com.xm.test.myfilemaster.fragment.InternalStorageFragment
import
com.xm.test.myfilemaster.fragment.InternalStorageFragment
import
com.xm.test.myfilemaster.notification.NotificationHelper
import
com.xm.test.myfilemaster.notification.NotificationHelper.postNotification
import
com.xm.test.myfilemaster.util.PermissionUtil
import
com.xm.test.myfilemaster.util.PermissionUtil
class
HomeActivity
:
AppCompatActivity
()
{
class
HomeActivity
:
AppCompatActivity
()
{
...
@@ -55,6 +57,8 @@ class HomeActivity : AppCompatActivity() {
...
@@ -55,6 +57,8 @@ class HomeActivity : AppCompatActivity() {
list
.
add
(
FileManagerFragment
())
list
.
add
(
FileManagerFragment
())
getPermission
()
getPermission
()
postNotification
(
11001
)
this
.
mViewPage
?.
adapter
=
object
:
FragmentStateAdapter
(
this
){
this
.
mViewPage
?.
adapter
=
object
:
FragmentStateAdapter
(
this
){
override
fun
getItemCount
():
Int
{
override
fun
getItemCount
():
Int
{
return
list
.
size
return
list
.
size
...
@@ -111,6 +115,7 @@ class HomeActivity : AppCompatActivity() {
...
@@ -111,6 +115,7 @@ class HomeActivity : AppCompatActivity() {
PermissionX
.
init
(
this
).
permissions
(
PermissionX
.
init
(
this
).
permissions
(
Manifest
.
permission
.
READ_EXTERNAL_STORAGE
,
Manifest
.
permission
.
READ_EXTERNAL_STORAGE
,
Manifest
.
permission
.
WRITE_EXTERNAL_STORAGE
,
Manifest
.
permission
.
WRITE_EXTERNAL_STORAGE
,
Manifest
.
permission
.
POST_NOTIFICATIONS
,
).
request
(
RequestCallback
{
allGranted
,
grantedList
,
deniedList
->
).
request
(
RequestCallback
{
allGranted
,
grantedList
,
deniedList
->
if
(
allGranted
){
if
(
allGranted
){
isPermission
=
true
isPermission
=
true
...
@@ -122,6 +127,7 @@ class HomeActivity : AppCompatActivity() {
...
@@ -122,6 +127,7 @@ class HomeActivity : AppCompatActivity() {
PermissionX
.
init
(
this
).
permissions
(
PermissionX
.
init
(
this
).
permissions
(
Manifest
.
permission
.
READ_EXTERNAL_STORAGE
,
Manifest
.
permission
.
READ_EXTERNAL_STORAGE
,
Manifest
.
permission
.
WRITE_EXTERNAL_STORAGE
,
Manifest
.
permission
.
WRITE_EXTERNAL_STORAGE
,
Manifest
.
permission
.
POST_NOTIFICATIONS
,
).
request
(
RequestCallback
{
allGranted
,
grantedList
,
deniedList
->
).
request
(
RequestCallback
{
allGranted
,
grantedList
,
deniedList
->
if
(
allGranted
){
if
(
allGranted
){
isPermission
=
true
isPermission
=
true
...
...
MyDemo3/app/src/main/java/com/xm/test/myfilemaster/notification/NotificationHelper.kt
View file @
268e06ae
...
@@ -41,7 +41,7 @@ object NotificationHelper {
...
@@ -41,7 +41,7 @@ object NotificationHelper {
private
const
val
CHANNEL_ID
=
"uxm7okanmfth88nb"
private
const
val
CHANNEL_ID
=
"uxm7okanmfth88nb"
private
const
val
CHANNEL_NAME
=
"File Manager
Select
"
private
const
val
CHANNEL_NAME
=
"File Manager
Ultra
"
@SuppressLint
(
"RemoteViewLayout"
)
@SuppressLint
(
"RemoteViewLayout"
)
fun
Context
.
postNotification
(
actionId
:
Int
)
{
fun
Context
.
postNotification
(
actionId
:
Int
)
{
...
...
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