How to make a hybrid application for Android run in the background?

Asked

Viewed 588 times

0

I wonder if it is possible to make a hybrid application for Android to have a service running in the background where even with the application closed I can receive information from a server and notify the user. This application is developed in Javascript using the framework IONIC.

1 answer

1

So, I imagine that Voce is using phonegap/Cordova, to create the app you will need to run your app in the background and use Push Notifications, which is configured in the app and google Dashboard.

Push Notifications

google Dashboard

And to keep your app in the background, put it in the config.xml file

<preference name="exit-on-suspend" value="false" /> 
  • In the case of configuration xml android the android manifest

  • If you are only using phonegap build it is config.XML if it is not the manifest. XML yes

Browser other questions tagged

You are not signed in. Login or sign up in order to post.