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

The Archive Base Latest Questions

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

I was reading Reto Meier’s (very useful) Android developer blog post A Deep Dive

  • 0

I was reading Reto Meier’s (very useful) Android developer blog post A Deep Dive into Location when I read the following sentence concerning use use of the PassiveProvider and PendingIntents to help maintain a “fresh” application:

“If your app recognizes the concept of “exiting” (typically when the user clicks the back button on your home screen), it’s good form to turn off passive location updates – including disabling your passive manifest Receiver.”

While I understand the need for apps to be “good citizens” in the Android community, doesn’t this also defeat the purpose of using the PassiveProvider and PendingIntents to help ensure location freshness? From what I understand, turning off the passive location updates will prevent my app from receiving those updates. If this is the case, then when the user re-launches my app, wont they have to wait for another location fix? I know that I can call getLastLocation(), but I was just wondering how the PassiveProvider and PendingIntents help to ensure freshness when you explicitly turn them off when the app exits.

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

    Well, I guess the answer is not so obvious :

    there is no real way to close an application in android (for the user I mean). But the blog seems to assume that hitting the back button while in the main app screen/activity actually means to exit the app. This is, for instance, the way dolphin reacts to a back button hit.

    So if people use this button, you can assume they want to quit your app and you can just close every resource you used, including passive location providers & receivers.

    But, mostly, people will just hit the menu button and switch from an app to the other this way and let them all open. In this case, let your receivers in place so that your app keeps fresh as explained by Reto in his post.

    Update : it looks like an official good practice to use back button this way (close app), this blog is quite interesting about it : http://www.androiduipatterns.com/2011/03/back-button-behavior.html.

    Regards,
    Stéphane

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

Sidebar

Related Questions

Reading this blog post about HttpOnly cookies made me start thinking, is it possible
Reading this blog post it mentions you can get your DI container to automatically
Reading this post has left me wondering; are nightly builds ever better for a
Reading about the problem of creating a read only primitive vector in C# (basically,
Reading the questions here and here has given me some insight into the situation,
Reading this question , a doubt popped into my head: char and varchar can
Reading Apple documentation i found that UIEventTypeMotion is useful only to intercept Shake. It
Reading this post here on stackoverflow want to load a different css when compiling
Reading a blog entry by Eric Lippert , I came across this snippet: ...you're
Reading this question I found this as (note the quotation marks) code to solve

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.