1. Are you ready for the Galaxy S20? Here is everything we know so far!

[Q] App Development: Starting Location Listeners in Activity A passing values to B

Discussion in 'Android Development' started by RedSpyder, Sep 21, 2011.

  1. RedSpyder

    RedSpyder Lurker
    Thread Starter

    Hi guys!

    Im developing an app which will locate the users position. GPS being slow I would like to start listening to the GPS listener in Activity A (once the app launches), but I will use the coords in Activity B.

    Is there like a way to create a "global" listener so I can access it anywhere from the app? If thats not possible, is better off an AsyncTask or a service?

    Thanks in advance!



Share This Page