title: How to show notification from background service?
body: <p>The project I am working on has two different apps, 1 is server and other is client. Server app has 1 service class, which initiates server thread in <code>onStartCommand()</code> function. Class for server thread is defined in service class itself. Whenever server receives any data from client it stores in the database. So problem is, I want to notify user that new data has been arrived through notification or toast message whichever possible. Also tell me where should I write code for notification, whether I should write in service class or thread class or <code>firstActivity</code> class from which i am starting server service. Thank you.</p>