Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6657451
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T01:46:10+00:00 2026-05-26T01:46:10+00:00

The project I am working on has two different apps, 1 is server and

  • 0

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 onStartCommand() 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 firstActivity class from which i am starting server service. Thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T01:46:11+00:00Added an answer on May 26, 2026 at 1:46 am

    Am I reading this incorrectly? Both your server app and your client app are both on the same Android device?

    In any case, take a look at the ApiDemos for code for notifications through a service.

    And since you’re probably going to be dealing with a remote server (and not a local one) and all the latency issues associated with the network, I think you better wrap your service in an AsyncTask.

    Also learn about Broadcast Receivers, registered Broadcast Receivers can be great way to trigger Services/Activities without the need to have your own Service polling in a loop indefinitely.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working in a project that has two main parts: a class library
The project I'm working on has two type of accounts, people and companies .
I've got a Windows Azure project I'm working on. It has two web roles
I am working on an existing project that has two areas that can be
We are working on an Asp.net project. It has two parts, first one is
I am working with two different web sites in asp.net. In the first project
I'm using codeigniter and the project i'm working on has to be in two
I'm working on a solution that has two projects: One ASP.NET web application, and
A project I was working on has finished, so I've been moved on to
The project I am working on has a rich text box that can have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.