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

  • Home
  • SEARCH
  • 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 3425468
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T06:35:51+00:00 2026-05-18T06:35:51+00:00

I have a Weather app with four Activities. The main/launcher activity is ‘invisible’ using…

  • 0

I have a Weather app with four Activities. The main/launcher activity is ‘invisible’ using…

android:theme=”@android:style/Theme.Translucent.NoTitleBar”`

…and is simply used to do a few checks (whether this is a new install, whether a network connection is available etc) before firing off one of the other Activities. The other Activities are UI-oriented – two simply display weather data pulled from a website and the third to provide a location ‘picker’ so the user can choose which area to show the weather for.

However, all four activities make use of a WeatherHelper object which basically does everything from checking for available SD card storage to maintaining preferences and pulling/formatting website pages.

So, my question(s)…what is the best way to have one instance of WeatherHelper which can be used by multiple activities and where/how are best to create it in my case?

I’ve been an OO programmer for a lot of years but I’m very new to Android and the design concepts – I’ve read a lot on the Android Developers site over the past weeks but I’ve stalled trying to decide on this.

Any ideas gratefully received.

  • 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-18T06:35:52+00:00Added an answer on May 18, 2026 at 6:35 am

    I would store shared information in you Application object. Subclass this and add any extra initialization and data there. You can get your application using getApplication() from your activity, which you can cast to your specialized version and access the shared data.

    I would also avoid launching the special startup activity if possible and do the work in your Application’s onCreate() override.

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

Sidebar

Related Questions

I'm making an android app - where I need to have weather-information. I've found
I have created an app for weather reports by using this http://www.google.com/ig/api?weather=paris . It
im developing an iphone app using yahoo weather service ( i have a key
I have created the yahoo weather API app using ASP.Net MVC 3 and when
in my app I want to have a searchbar like in the weather app
I am working on a weather app, and have everything working perfectly ...Except the
I was given an assignment to develop a very simple weather app in Android
I have a universal iPhone/iPad app. On the main menu I have a UIImage
I have created an app widget in Android and want to add some gesture-based
I'm developing a weather app, but I have a problem when displaying an optionsMenu

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.