Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
Simple-Sms
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhangchengbo
Simple-Sms
Commits
8fd79a0e
Commit
8fd79a0e
authored
Nov 20, 2025
by
zhangchengbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:长按桌面Icon[日志导出]功能
parent
9465b23a
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
80 additions
and
1 deletion
+80
-1
AndroidManifest.xml
app/src/main/AndroidManifest.xml
+5
-1
Constant.kt
app/src/main/kotlin/com/secspace/sms/helpers/Constant.kt
+2
-0
ShortCutActivity.kt
...main/kotlin/com/secspace/sms/shortcut/ShortCutActivity.kt
+36
-0
shortcut_dialpad_update.xml
app/src/main/res/drawable/shortcut_dialpad_update.xml
+16
-0
export_log.png
app/src/main/res/mipmap-xxhdpi/export_log.png
+0
-0
strings.xml
app/src/main/res/values-zh-rCN/strings.xml
+2
-0
strings.xml
app/src/main/res/values/strings.xml
+2
-0
shortcut.xml
app/src/main/res/xml/shortcut.xml
+17
-0
No files found.
app/src/main/AndroidManifest.xml
View file @
8fd79a0e
...
...
@@ -277,7 +277,11 @@
<action android:name="android.service.notification.NotificationListenerService" />
</intent-filter>
</service>-->
<activity
android:name=
".shortcut.ShortCutActivity"
android:excludeFromRecents=
"true"
android:resizeableActivity=
"true"
android:screenOrientation=
"portrait"
/>
</application>
</manifest>
app/src/main/kotlin/com/secspace/sms/helpers/Constant.kt
View file @
8fd79a0e
...
...
@@ -25,4 +25,6 @@ object Constant {
val
listThreadData
=
arrayListOf
<
String
>()
//记录被删除的消息包含[零宽度字符]的手机号
const
val
EXPORT_LOG
=
"com.dialer.export_log"
}
app/src/main/kotlin/com/secspace/sms/shortcut/ShortCutActivity.kt
0 → 100644
View file @
8fd79a0e
package
com.secspace.sms.shortcut
import
android.os.Bundle
import
androidx.appcompat.app.AppCompatActivity
import
com.secspace.log.Callback
import
com.secspace.log.Log
import
com.secspace.sms.helpers.Constant
import
com.simplemobiletools.commons.extensions.toast
/**
* Created by Gz on 2024/3/5.
*/
class
ShortCutActivity
:
AppCompatActivity
()
{
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
super
.
onCreate
(
savedInstanceState
)
val
intent
=
intent
Log
.
d
(
"ShortCutActivity"
,
"initData: action=${intent.action}"
)
when
(
intent
.
action
){
Constant
.
EXPORT_LOG
->{
Log
.
exportLogsAsync
(
getExternalFilesDir
(
"logs"
)
!!
.
absolutePath
,
object
:
Callback
{
override
fun
onSuccess
()
{
toast
(
"日志导出成功!"
)
finish
()
}
override
fun
onFailure
(
e
:
Exception
)
{
toast
(
"日志导出失败! exception=${e.message}"
)
finish
()
}
})
}
}
}
}
app/src/main/res/drawable/shortcut_dialpad_update.xml
0 → 100644
View file @
8fd79a0e
<?xml version="1.0" encoding="utf-8"?>
<layer-list
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:id=
"@+id/shortcut_update_background"
>
<shape
android:shape=
"oval"
>
<solid
android:color=
"@color/color_primary"
/>
</shape>
</item>
<item
android:drawable=
"@drawable/ic_article_vector"
android:bottom=
"@dimen/smaller_margin"
android:left=
"@dimen/smaller_margin"
android:right=
"@dimen/smaller_margin"
android:top=
"@dimen/smaller_margin"
/>
</layer-list>
app/src/main/res/mipmap-xxhdpi/export_log.png
0 → 100644
View file @
8fd79a0e
5.25 KB
app/src/main/res/values-zh-rCN/strings.xml
View file @
8fd79a0e
...
...
@@ -133,4 +133,6 @@
Haven't found some strings? There's more at
https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res
-->
<string
name=
"shortcuts_back_short_label"
>
日志导出
</string>
</resources>
app/src/main/res/values/strings.xml
View file @
8fd79a0e
...
...
@@ -135,6 +135,8 @@
<string
name=
"faq_3_text"
>
Yes, you can schedule messages to be sent in the future by long pressing the Send button and picking the desired date and time.
</string>
<string
name=
"new_tips_notif"
>
您收到一条新的消息!
</string>
<string
name=
"shortcuts_back_short_label"
>
日志导出
</string>
<!--
Haven't found some strings? There's more at
https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res
...
...
app/src/main/res/xml/shortcut.xml
0 → 100644
View file @
8fd79a0e
<?xml version="1.0" encoding="utf-8"?>
<shortcuts
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<shortcut
android:shortcutId=
"background_settings"
android:enabled=
"true"
android:icon=
"@mipmap/export_log"
android:shortcutShortLabel=
"@string/shortcuts_back_short_label"
>
<intent
android:action=
"com.mdmoffline.EXPORT_LOG"
android:targetPackage=
"com.secspace.sms"
android:targetClass=
"com.secspace.sms.shortcut.ShortCutActivity"
/>
<categories
android:name=
"android.app.shortcuts"
/>
</shortcut>
</shortcuts>
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