Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
SmartCloudAppNotificationService
Overview
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
baijinqiu
SmartCloudAppNotificationService
Commits
bb31de6b
Commit
bb31de6b
authored
May 25, 2020
by
TakeItEasyJQ
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
是通知的获取满足app已经在打开状态或者点击通知进入app的情况
parent
977ef7d5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
+11
-0
src/android/ONService.java
+5
-0
www/ONService.js
+6
-0
No files found.
src/android/ONService.java
View file @
bb31de6b
...
@@ -51,6 +51,11 @@ public class ONService extends CordovaPlugin {
...
@@ -51,6 +51,11 @@ public class ONService extends CordovaPlugin {
this
.
coolMethod
(
message
,
callbackContext
);
this
.
coolMethod
(
message
,
callbackContext
);
return
true
;
return
true
;
}
}
if
(
action
.
endsWith
(
"getMessage"
))
{
callbackContext
.
success
(
NotificationService
.
getOfflineAll
());
NotificationService
.
cleanOfflineBean
();
return
true
;
}
// 开启并绑定服务并5秒间隔调取getHistory()
// 开启并绑定服务并5秒间隔调取getHistory()
if
(
action
.
equals
(
"bindService"
))
{
if
(
action
.
equals
(
"bindService"
))
{
Intent
intent
=
new
Intent
(
cordova
.
getActivity
(),
NotificationService
.
class
);
Intent
intent
=
new
Intent
(
cordova
.
getActivity
(),
NotificationService
.
class
);
...
...
www/ONService.js
View file @
bb31de6b
...
@@ -38,4 +38,10 @@ ONService.unbindService = function () {
...
@@ -38,4 +38,10 @@ ONService.unbindService = function () {
});
});
}
}
ONService
.
getMessage
=
function
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
exec
(
resolve
,
reject
,
PLUGIN_NAME
,
"getMessage"
,
[...
arguments
]);
});
}
module
.
exports
=
ONService
;
module
.
exports
=
ONService
;
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