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 6206567
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T05:28:25+00:00 2026-05-24T05:28:25+00:00

I develop an GPS app. my app have a service that responsible to send

  • 0

I develop an GPS app. my app have a service that responsible to send GPS to server through server….

Service -----> AysncTask(sendServer)
// then in service i broadcast some variable

myFilteredResponse = new Intent(GPS_FILTER);
        myFilteredResponse.putExtra("latitude",      Double.valueOf(twoFormat.format(location.getLatitude())));
        myFilteredResponse.putExtra("longitude", Double.valueOf(twoFormat.format(location.getLongitude())));
        myFilteredResponse.putExtra("network", MyGPS.cur_network_status);

then in my Activity I create a broadcast receiver to receive all these variable n it works fine, my UI then will change when we have new lat n lon

in my AysncTask when send to server i will get the location identify by server so i want to update my UI interface so i 1 2 use broadcast as well but it’s not work !

structure

                                  broadcast
service ( on location changed ) ------------->   UI interface

            broadcast??
AsyncTask ------------->   UI interface

i can’t use sendBroadcast in my AsyncTask since my AsyncTask is not activity any Idea?

  • 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-24T05:28:26+00:00Added an answer on May 24, 2026 at 5:28 am

    i guess you problem is to get the data from the service.

    you can bind the service to the UI and call the service from within the activity.

    here is an opensource project. Link.

    this is the service code. Link.

    this is the UI. Link

    EDIT:
    if you want to do UI updates using AsyncTask then you can use onPostExecute which runs in UI thread.

    EDIT:
    Here you go. AsyncTask Example. Link.

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

Sidebar

Related Questions

I have a requirement to develop an app that is capable of receiving pushed
i have questions that i am really need some help on it: i develop
We develop Win32 application that access to SQL 2005 database through Linq to SQL.
I develop a variety of applications and have 3-4 miscellaneous libraries that I reuse
I develop a client-server application and I have log in the server, so I
I'm trying to develop an application that will simulate a route through Google's Navigation
want to develop an app that can automatically respond to a received text, include
I'm trying to develop a photo geotagging app. How do I extract GPS information
I develop an app using PhoneGap. I got a service which is in background
I just wanted to develop location based app which is using GPS. So i

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.