Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
D
Data Recovery White
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
Data Recovery White
Commits
0401a829
Commit
0401a829
authored
Jul 12, 2024
by
leichao.gao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update push
parent
683ee99c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
96 additions
and
3 deletions
+96
-3
NotificationUtil.kt
...c/main/java/com/base/datarecovery/fcm/NotificationUtil.kt
+6
-3
CleanJunkStringResourceManager.java
...se/datarecovery/utils/CleanJunkStringResourceManager.java
+33
-0
DuplicatePhotoStringResourceManager.java
...tarecovery/utils/DuplicatePhotoStringResourceManager.java
+29
-0
ScreenshotCleanupStringManager.java
...se/datarecovery/utils/ScreenshotCleanupStringManager.java
+28
-0
No files found.
app/src/main/java/com/base/datarecovery/fcm/NotificationUtil.kt
View file @
0401a829
...
@@ -23,6 +23,9 @@ import com.base.datarecovery.bean.ConstObject.ID_RECOVERY_VIDEOS
...
@@ -23,6 +23,9 @@ import com.base.datarecovery.bean.ConstObject.ID_RECOVERY_VIDEOS
import
com.base.datarecovery.bean.ConstObject.ID_SCREENSHOT_CLEAN
import
com.base.datarecovery.bean.ConstObject.ID_SCREENSHOT_CLEAN
import
com.base.datarecovery.bean.ConstObject.ID_SIMILAR_IMAGE
import
com.base.datarecovery.bean.ConstObject.ID_SIMILAR_IMAGE
import
com.base.datarecovery.utils.AppPreferences
import
com.base.datarecovery.utils.AppPreferences
import
com.base.datarecovery.utils.CleanJunkStringResourceManager
import
com.base.datarecovery.utils.DuplicatePhotoStringResourceManager
import
com.base.datarecovery.utils.ScreenshotCleanupStringManager
import
java.util.Random
import
java.util.Random
/**
/**
...
@@ -44,19 +47,19 @@ object NotificationUtil {
...
@@ -44,19 +47,19 @@ object NotificationUtil {
when
(
actionId
)
{
when
(
actionId
)
{
ID_JUNK_CLEAN_PUSH
->
{
ID_JUNK_CLEAN_PUSH
->
{
icon
=
R
.
mipmap
.
cleanjunk_ss
icon
=
R
.
mipmap
.
cleanjunk_ss
desc
=
"Free up space on your phone! Clean unwanted junk files now."
desc
=
CleanJunkStringResourceManager
.
getNextStringResource
()
btn
=
"Clean Up Space"
btn
=
"Clean Up Space"
}
}
ID_SIMILAR_IMAGE
->
{
ID_SIMILAR_IMAGE
->
{
icon
=
R
.
mipmap
.
h_similar
icon
=
R
.
mipmap
.
h_similar
desc
=
"Check similar photos to release more space"
desc
=
DuplicatePhotoStringResourceManager
.
getNextCopy
()
btn
=
"Clean up"
btn
=
"Clean up"
}
}
ID_SCREENSHOT_CLEAN
->
{
ID_SCREENSHOT_CLEAN
->
{
// icon = R.mipmap.similar
// icon = R.mipmap.similar
desc
=
"Streamline your photo album! Remove old and unnecessary screenshots."
desc
=
ScreenshotCleanupStringManager
.
getNextCleanupCopy
()
btn
=
"Remove Screenshots"
btn
=
"Remove Screenshots"
}
}
...
...
app/src/main/java/com/base/datarecovery/utils/CleanJunkStringResourceManager.java
0 → 100644
View file @
0401a829
package
com
.
base
.
datarecovery
.
utils
;
import
java.util.ArrayList
;
import
java.util.List
;
public
class
CleanJunkStringResourceManager
{
private
static
final
List
<
String
>
stringResources
=
new
ArrayList
<>();
private
static
int
currentResourceIndex
=
0
;
static
{
// 添加新的文案资源
stringResources
.
add
(
"Find and delete phone junk files."
);
stringResources
.
add
(
"Clear remaining trash for more space."
);
stringResources
.
add
(
"Scan and remove mobile junk files."
);
stringResources
.
add
(
"Clean up and free storage space."
);
stringResources
.
add
(
"Save space by cleaning junk files."
);
stringResources
.
add
(
"Remove phone junk files easily."
);
stringResources
.
add
(
"Clear trash and free up space."
);
stringResources
.
add
(
"Scan and delete mobile junk files."
);
stringResources
.
add
(
"Clean up for more storage space."
);
stringResources
.
add
(
"Save storage, clean junk files!"
);
stringResources
.
add
(
"You haven't cleaned your device in a long time"
);
}
public
static
String
getNextStringResource
()
{
if
(
stringResources
==
null
||
stringResources
.
isEmpty
())
{
return
null
;
// 或者根据您的需要处理错误情况
}
String
resource
=
stringResources
.
get
(
currentResourceIndex
);
currentResourceIndex
=
(
currentResourceIndex
+
1
)
%
stringResources
.
size
();
return
resource
;
}
}
\ No newline at end of file
app/src/main/java/com/base/datarecovery/utils/DuplicatePhotoStringResourceManager.java
0 → 100644
View file @
0401a829
package
com
.
base
.
datarecovery
.
utils
;
import
java.util.ArrayList
;
import
java.util.List
;
public
class
DuplicatePhotoStringResourceManager
{
private
static
final
List
<
String
>
duplicatePhotoCopyList
=
new
ArrayList
<>();
private
static
int
currentCopyIndex
=
0
;
static
{
// 添加推送文案到列表
duplicatePhotoCopyList
.
add
(
"Discover duplicate photos and free up space on your device."
);
duplicatePhotoCopyList
.
add
(
"Neat trick: Find and remove duplicate photos to instantly gain more storage."
);
duplicatePhotoCopyList
.
add
(
"Twin photos taking up space? Identify and delete them easily with our app."
);
duplicatePhotoCopyList
.
add
(
"Clear the clutter: Spot and remove look-alike photos to free up your phone."
);
duplicatePhotoCopyList
.
add
(
"Don't let duplicates drain your storage. Clean up similar photos now."
);
duplicatePhotoCopyList
.
add
(
"Double trouble? Find and delete duplicate photos to reclaim your space."
);
}
public
static
String
getNextCopy
()
{
if
(
duplicatePhotoCopyList
.
isEmpty
())
{
return
null
;
// 或者抛出一个异常,根据您的错误处理策略
}
String
copy
=
duplicatePhotoCopyList
.
get
(
currentCopyIndex
);
currentCopyIndex
=
(
currentCopyIndex
+
1
)
%
duplicatePhotoCopyList
.
size
();
return
copy
;
}
}
app/src/main/java/com/base/datarecovery/utils/ScreenshotCleanupStringManager.java
0 → 100644
View file @
0401a829
package
com
.
base
.
datarecovery
.
utils
;
import
java.util.ArrayList
;
import
java.util.List
;
public
class
ScreenshotCleanupStringManager
{
private
static
final
List
<
String
>
screenshotCleanupCopies
=
new
ArrayList
<>();
private
static
int
currentCleanupIndex
=
0
;
static
{
// 添加截图清理功能的推送文案到列表
screenshotCleanupCopies
.
add
(
"Declutter your gallery: It's time to remove those old screenshots!"
);
screenshotCleanupCopies
.
add
(
"Clean up your phone's memory: Delete unwanted screenshots now!"
);
screenshotCleanupCopies
.
add
(
"Free up space with ease: Get rid of unnecessary screenshots."
);
screenshotCleanupCopies
.
add
(
"Regain control over your storage: Clear out old screenshots today."
);
screenshotCleanupCopies
.
add
(
"A tidy phone is a happy phone: Remove excess screenshots and save space."
);
}
public
static
String
getNextCleanupCopy
()
{
if
(
screenshotCleanupCopies
.
isEmpty
())
{
return
null
;
// 或者根据您的需要处理错误情况
}
String
copy
=
screenshotCleanupCopies
.
get
(
currentCleanupIndex
);
currentCleanupIndex
=
(
currentCleanupIndex
+
1
)
%
screenshotCleanupCopies
.
size
();
return
copy
;
}
}
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