Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
P
PDF Viewer Scanner 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
PDF Viewer Scanner White
Commits
e285469a
Commit
e285469a
authored
Oct 17, 2024
by
wanglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
...
parent
bf55de0f
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
60 additions
and
6 deletions
+60
-6
StayNotificationService.kt
.../pdfviewerscannerwhite/service/StayNotificationService.kt
+16
-0
MainActivity.kt
...va/com/base/pdfviewerscannerwhite/ui/main/MainActivity.kt
+14
-6
SplashActivity.kt
...om/base/pdfviewerscannerwhite/ui/splash/SplashActivity.kt
+2
-0
stay_notification_big.xml
app/src/main/res/layout/stay_notification_big.xml
+28
-0
imagepdf_notifi.png
app/src/main/res/mipmap-xxhdpi/imagepdf_notifi.png
+0
-0
No files found.
app/src/main/java/com/base/pdfviewerscannerwhite/service/StayNotificationService.kt
View file @
e285469a
...
@@ -110,12 +110,28 @@ class StayNotificationService : Service() {
...
@@ -110,12 +110,28 @@ class StayNotificationService : Service() {
contentView
.
setOnClickPendingIntent
(
R
.
id
.
ll_3
,
pendingIntent3
)
contentView
.
setOnClickPendingIntent
(
R
.
id
.
ll_3
,
pendingIntent3
)
expendView
.
setOnClickPendingIntent
(
R
.
id
.
ll_3
,
pendingIntent3
)
expendView
.
setOnClickPendingIntent
(
R
.
id
.
ll_3
,
pendingIntent3
)
val
requestCode4
=
Random
.
nextInt
(
1800
)
val
intent4
=
Intent
(
context
,
SplashActivity
::
class
.
java
).
apply
{
putExtra
(
"actionId"
,
ConstObject
.
NOTIFICATION_ACTION_NEW_IMAGE_PDF
)
}
val
pendingIntent4
=
PendingIntent
.
getActivity
(
context
,
requestCode4
,
intent4
,
PendingIntent
.
FLAG_IMMUTABLE
)
contentView
.
setOnClickPendingIntent
(
R
.
id
.
ll_4
,
pendingIntent4
)
expendView
.
setOnClickPendingIntent
(
R
.
id
.
ll_4
,
pendingIntent4
)
val
builder
=
NotificationCompat
.
Builder
(
context
,
channelId
)
val
builder
=
NotificationCompat
.
Builder
(
context
,
channelId
)
val
smallIcon
=
IconCompat
.
createFromIcon
(
val
smallIcon
=
IconCompat
.
createFromIcon
(
context
,
Icon
.
createWithResource
(
context
,
Icon
.
createWithResource
(
MyApplication
.
context
,
R
.
mipmap
.
logo
MyApplication
.
context
,
R
.
mipmap
.
logo
)
)
)
)
smallIcon
?.
let
{
smallIcon
?.
let
{
builder
.
setSmallIcon
(
smallIcon
)
//设置状态栏内的小图标
builder
.
setSmallIcon
(
smallIcon
)
//设置状态栏内的小图标
}
}
...
...
app/src/main/java/com/base/pdfviewerscannerwhite/ui/main/MainActivity.kt
View file @
e285469a
...
@@ -17,6 +17,7 @@ import com.base.pdfviewerscannerwhite.bean.ConstObject.BOOKMARK_DATA_TYPE
...
@@ -17,6 +17,7 @@ import com.base.pdfviewerscannerwhite.bean.ConstObject.BOOKMARK_DATA_TYPE
import
com.base.pdfviewerscannerwhite.bean.ConstObject.DOCUMENT_DATA_TYPE
import
com.base.pdfviewerscannerwhite.bean.ConstObject.DOCUMENT_DATA_TYPE
import
com.base.pdfviewerscannerwhite.bean.ConstObject.NOTIFICATION_ACTION_BOOKMARK
import
com.base.pdfviewerscannerwhite.bean.ConstObject.NOTIFICATION_ACTION_BOOKMARK
import
com.base.pdfviewerscannerwhite.bean.ConstObject.NOTIFICATION_ACTION_DOCUMENT
import
com.base.pdfviewerscannerwhite.bean.ConstObject.NOTIFICATION_ACTION_DOCUMENT
import
com.base.pdfviewerscannerwhite.bean.ConstObject.NOTIFICATION_ACTION_NEW_IMAGE_PDF
import
com.base.pdfviewerscannerwhite.bean.ConstObject.RECENT_DATA_TYPE
import
com.base.pdfviewerscannerwhite.bean.ConstObject.RECENT_DATA_TYPE
import
com.base.pdfviewerscannerwhite.bean.ConstObject.SHORTCUT_MERGE_PDF
import
com.base.pdfviewerscannerwhite.bean.ConstObject.SHORTCUT_MERGE_PDF
import
com.base.pdfviewerscannerwhite.bean.ConstObject.SHORTCUT_SCAN_PDF
import
com.base.pdfviewerscannerwhite.bean.ConstObject.SHORTCUT_SCAN_PDF
...
@@ -104,23 +105,30 @@ class MainActivity : BaseActivity<ActivityMain2Binding>(), MainView {
...
@@ -104,23 +105,30 @@ class MainActivity : BaseActivity<ActivityMain2Binding>(), MainView {
private
fun
actionIdOperation
()
{
private
fun
actionIdOperation
()
{
if
(
actionId
==
SHORTCUT_SCAN_PDF
)
{
if
(
actionId
==
SHORTCUT_SCAN_PDF
)
{
mainPresenter
.
starAdGmsScan
(
this
)
useGmsScanFunction
(
)
}
}
if
(
actionId
==
SHORTCUT_SPLIT_PDF
)
{
if
(
actionId
==
SHORTCUT_SPLIT_PDF
)
{
startActivity
(
Intent
(
this
,
PdfSelectActivity
::
class
.
java
).
apply
{
startActivity
(
Intent
(
this
,
PdfSelectActivity
::
class
.
java
).
apply
{
putExtra
(
"doWhat"
,
ConstObject
.
DO_SPLIT_PDF
)
putExtra
(
"doWhat"
,
ConstObject
.
DO_SPLIT_PDF
)
})
})
return
}
}
if
(
actionId
==
SHORTCUT_MERGE_PDF
)
{
if
(
actionId
==
SHORTCUT_MERGE_PDF
)
{
startActivity
(
Intent
(
this
,
PdfSelectActivity
::
class
.
java
).
apply
{
startActivity
(
Intent
(
this
,
PdfSelectActivity
::
class
.
java
).
apply
{
putExtra
(
"doWhat"
,
ConstObject
.
DO_MERGE_PDF
)
putExtra
(
"doWhat"
,
ConstObject
.
DO_MERGE_PDF
)
})
})
return
}
}
if
(
actionId
==
NOTIFICATION_ACTION_DOCUMENT
)
{
if
(
actionId
==
NOTIFICATION_ACTION_DOCUMENT
)
{
binding
.
llDocument
.
callOnClick
()
binding
.
llDocument
.
callOnClick
()
return
}
}
if
(
actionId
==
NOTIFICATION_ACTION_BOOKMARK
)
{
if
(
actionId
==
NOTIFICATION_ACTION_BOOKMARK
)
{
binding
.
llBookmark
.
callOnClick
()
binding
.
llBookmark
.
callOnClick
()
return
}
if
(
actionId
==
NOTIFICATION_ACTION_NEW_IMAGE_PDF
)
{
useGmsScanFunction
()
}
}
}
}
...
@@ -179,11 +187,11 @@ class MainActivity : BaseActivity<ActivityMain2Binding>(), MainView {
...
@@ -179,11 +187,11 @@ class MainActivity : BaseActivity<ActivityMain2Binding>(), MainView {
return
return
}
}
val
restUmpCount
=
AppPreferences
.
getInstance
().
getString
(
"restUmpCount"
,
"50"
).
toInt
()
//
val restUmpCount = AppPreferences.getInstance().getString("restUmpCount", "50").toInt()
//ump请求重置
//
//ump请求重置
if
(
mainStartTimes
%
restUmpCount
==
0
)
{
//
if (mainStartTimes % restUmpCount == 0) {
UmpUtils
.
umpCalled
=
false
//
UmpUtils.umpCalled = false
}
//
}
mainPresenter
.
initAllDocumentData
()
mainPresenter
.
initAllDocumentData
()
...
...
app/src/main/java/com/base/pdfviewerscannerwhite/ui/splash/SplashActivity.kt
View file @
e285469a
...
@@ -16,6 +16,7 @@ import com.base.pdfviewerscannerwhite.bean.ConstObject.isFirstStart
...
@@ -16,6 +16,7 @@ import com.base.pdfviewerscannerwhite.bean.ConstObject.isFirstStart
import
com.base.pdfviewerscannerwhite.databinding.ActivitySplash2Binding
import
com.base.pdfviewerscannerwhite.databinding.ActivitySplash2Binding
import
com.base.pdfviewerscannerwhite.fcm.NotificationHoverUtils
import
com.base.pdfviewerscannerwhite.fcm.NotificationHoverUtils
import
com.base.pdfviewerscannerwhite.helper.BaseActivity
import
com.base.pdfviewerscannerwhite.helper.BaseActivity
import
com.base.pdfviewerscannerwhite.helper.EventUtils
import
com.base.pdfviewerscannerwhite.helper.MyApplication
import
com.base.pdfviewerscannerwhite.helper.MyApplication
import
com.base.pdfviewerscannerwhite.service.StayNotificationService.Companion.startStayNotification
import
com.base.pdfviewerscannerwhite.service.StayNotificationService.Companion.startStayNotification
import
com.base.pdfviewerscannerwhite.ui.main.MainActivity
import
com.base.pdfviewerscannerwhite.ui.main.MainActivity
...
@@ -118,6 +119,7 @@ class SplashActivity : BaseActivity<ActivitySplash2Binding>(), SplashView {
...
@@ -118,6 +119,7 @@ class SplashActivity : BaseActivity<ActivitySplash2Binding>(), SplashView {
LogEx
.
logDebug
(
TAG
,
"UmpUtils.callback $it"
)
LogEx
.
logDebug
(
TAG
,
"UmpUtils.callback $it"
)
(
application
as
MyApplication
).
initSolarEngine
(
it
)
(
application
as
MyApplication
).
initSolarEngine
(
it
)
agreePrivacy
()
agreePrivacy
()
EventUtils
.
event
(
"ump"
,
"umpCanAd=$umpCanAd"
)
}
}
requestUMP
(
this
)
requestUMP
(
this
)
}
else
{
}
else
{
...
...
app/src/main/res/layout/stay_notification_big.xml
View file @
e285469a
...
@@ -80,4 +80,32 @@
...
@@ -80,4 +80,32 @@
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id=
"@+id/ll_4"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:orientation=
"vertical"
tools:ignore=
"UseCompoundDrawables"
>
<ImageView
android:layout_width=
"30dp"
android:layout_height=
"30dp"
android:layout_gravity=
"center_horizontal"
android:src=
"@mipmap/imagepdf_notifi"
tools:ignore=
"ContentDescription"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:layout_marginTop=
"2dp"
android:includeFontPadding=
"false"
android:text=
"Image PDF"
android:textColor=
"@color/black"
android:textSize=
"14sp"
tools:ignore=
"HardcodedText"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
app/src/main/res/mipmap-xxhdpi/imagepdf_notifi.png
0 → 100644
View file @
e285469a
2.75 KB
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