Hi, how to do a server with never close? I need a service with never close.
You should write more to your problem (what exactly are you trying to do) .
What do you mean with "a server" (real server = web service)?
What do you mean with "a service that never close"?
Then - maybe - somebody can help you...
@AndersonNoleto First you should post this question in the Android section, cause it seems like a specific Android problems. And then some code of your service should be shared if you want us to peek at it and give it a shot!
Still... I dont know if...
1) You want to create a background service in Android that never closes ? (wich is impossible... It WILL close at some point, if Android decides that resources are so scarce and need to reclaim them, your sercice will go down... You have to be prepared to this event! But you can make it sticky in order for Android to restart it)
2) Or you need to know how to close a service on Android
Hey there @AndersonNoleto , by message do you mean notifications ? Like facebook does when you set the settings to allow notification ?
If so, receiving notification when app is closed is what you want to achieve, you need two things, a service and use the Notification API. This is a topic in itself, better start with the start I think. Read about notification here
Official docs : https://developer.android.com/guide/topics/ui/notifiers/notifications.html
Notification ServiceListener : https://developer.xamarin.com/api/type/Android.Service.Notification.NotificationListenerService/
Notification concepts with Xamarin.Android : https://developer.xamarin.com/guides/android/application_fundamentals/notifications/
If you want to read about doing this kinda stuff using Java, easily adaptable : stackoverflow.com/questions/13741875/how-to-get-android-notifications-when-app-was-closed
Xamarin Inc., as a wholly-owned Microsoft subsidiary acting as a separate legal entity, adheres to the Microsoft Privacy Statement: Privacy & cookies