Commit b5391f55 by System Administrator

create branch develop

parent 56700e47
...@@ -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"));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment