How to create service which will pinging remote $http and download remote file if it was setted up on remote API even if my app was closed. Run as service on background.
up the question.
Is there any solution ?
I solved this problem :
Thank you for response
It is when the app is in background… But how to run any function even when the app is closed?
For now there is no ways to make this happen.
But I think we need look deeper at
@cybernatic Thankyou for your response… Actually I’m trying to do a upload of the photo and some information to server like the way of uploading a photo in facebook…but while uploading ,if the app is closed it is failed. I want that functionality to achieve this need
Nope @antonfire. We need to write our own service and we have to do through that it seems. But i didn’t got a perfect solution. For now I kept it a side will update you if I found any. Please let me know if you find it .
See… https://github.com/katzer/cordova-plugin-background-mode/issues/146 to see what I’m trying to do, I think it’s similar to you.
@antonfire That background plugin start works only when the app goes to background, If we start uploading where can we keep our code . Here the ambiguity arises. With the info I got, we need to write a android service in which the upload code should be present in that service. When we click a button the upload should move into that service, Its kind of a plugin we need to write on our own. I tried cordova background plugin but it wont work for our requirement.