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
b5391f55
Commit
b5391f55
authored
Jun 01, 2020
by
System Administrator
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
create branch develop
parent
56700e47
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
99 additions
and
70 deletions
+99
-70
src/android/onservice/HandleService.java
+6
-2
src/android/onservice/NotificationService.java
+93
-68
No files found.
src/android/onservice/HandleService.java
View file @
b5391f55
...
@@ -38,11 +38,15 @@ public class HandleService extends IntentService {
...
@@ -38,11 +38,15 @@ public class HandleService extends IntentService {
@Override
@Override
public
int
onStartCommand
(
@Nullable
Intent
intent
,
int
flags
,
int
startId
)
{
public
int
onStartCommand
(
@Nullable
Intent
intent
,
int
flags
,
int
startId
)
{
NotificationService
.
cordovaPlugin
.
getActivity
().
startActivity
(
new
Intent
(
NotificationService
.
cordovaPlugin
.
getContext
(),
MainActivity
.
class
));
// NotificationService.cordovaPlugin.getActivity().startActivity(new Intent(NotificationService.cordovaPlugin.getContext(), MainActivity.class));
Intent
i
=
new
Intent
(
getApplicationContext
(),
MainActivity
.
class
);
i
.
setFlags
(
Intent
.
FLAG_ACTIVITY_NEW_TASK
);
getApplicationContext
().
startActivity
(
i
);
NotificationService
.
cordovaPlugin
.
getActivity
().
runOnUiThread
(
new
Runnable
()
{
NotificationService
.
cordovaPlugin
.
getActivity
().
runOnUiThread
(
new
Runnable
()
{
@Override
@Override
public
void
run
()
{
public
void
run
()
{
//
NotificationService.webView.loadUrl("javascript:cordova.plugins.notification.badge.decrease(1)");
NotificationService
.
webView
.
loadUrl
(
"javascript:cordova.plugins.notification.badge.decrease(1)"
);
}
}
});
});
// Log.e(TAG, "onStartCommand: userId "+ intent.getStringExtra("userId"));
// Log.e(TAG, "onStartCommand: userId "+ intent.getStringExtra("userId"));
...
...
src/android/onservice/NotificationService.java
View file @
b5391f55
This diff is collapsed.
Click to expand it.
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