Giter Club home page Giter Club logo

Comments (8)

EinfachHans avatar EinfachHans commented on July 17, 2024

https://github.com/HansKrywaa/cordova-plugin-advanced-background-mode/blob/master/README.md#recent-task-list - have you tried this?

from cordova-plugin-advanced-background-mode.

BaukaKZ avatar BaukaKZ commented on July 17, 2024

@HansKrywaa Yes that's right

from cordova-plugin-advanced-background-mode.

EinfachHans avatar EinfachHans commented on July 17, 2024

Works?

from cordova-plugin-advanced-background-mode.

BaukaKZ avatar BaukaKZ commented on July 17, 2024

@HansKrywaa
No, one function that I need to receive messages on a socket does not work.

Here is a chain of actions.
1 Launching the application.
2. I completely close it. (Even from the list of tasks).
And here I need to ensure that the application does not turn off and continues to work in the background mode.

Background mode work if you do not close it from the task manager.
I need the same option when the application is completely turned off.

Please help.
Thks

from cordova-plugin-advanced-background-mode.

EinfachHans avatar EinfachHans commented on July 17, 2024

That is clearly impossible. You cannot run your Code when the Application is completely closed. Your Javascript Code runs in a Web-View, which is not accessible when the App is killed...

from cordova-plugin-advanced-background-mode.

azim-creat avatar azim-creat commented on July 17, 2024

@HansKrywaa Hello there, I'm @BaukaKZ co-worker.
We are developing a social network. We are all set. Chat problems. We use a web socket to receive messages and notify users. Your plugin works while the application is running.
Our goal is to notify the phone regardless of the application, even if the application is not running (your background does not help, it closes if you clear the task manager (close all applications)).

The real examples are Instagrams, Facebook, WhatsApp, and Telegrams. These applications send notifications regardless of the state of the application.

Are there any solutions for this.
If there are no ready-made solutions, maybe you can decide how to implement it. And could you advise us.
Possible options for cooperation.
My number is +77074218438 (WhatsApp and Telegrams)
Thank you for attention

from cordova-plugin-advanced-background-mode.

EinfachHans avatar EinfachHans commented on July 17, 2024

So what you want is not possible like this. The User will always be able to close the App. You can't change this, as the OS (Android, iOS) don't allow you too, because the User have to have the power. In the Moment when you completely close the App, the Web-socket will be killed and it can't run again while the App is killed. So you have to rethink your App a bit.

I'm (sadly) not working for Instagram, Facebook, etc. so i don't know how they do this, but why you don't send classic Push Notifications to the User who's App is killed?

Our App is not a Chat App, but at some Point you can also Chat and the Communication is handled by Web-Sockets too. If someone closes the App, the Backend knows this, as the Web-socket closed and if then appears new Messages it send Push instead of Web-socket and temporary saved the Message. In the Second the User connects to the Socket again (because he opens the App again) the Backend send all the saved Messages via Socket.

Maybe this could be a Solution for you?

from cordova-plugin-advanced-background-mode.

EinfachHans avatar EinfachHans commented on July 17, 2024

Closed as no Converation

from cordova-plugin-advanced-background-mode.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.