> > I think you're looking for the Application class: > http://developer.android.com/reference/android/app/Application.html > You have to write a class that extends Application, add a name field in the > manifest.xml file, then you can access an instance of your Application > sub-class from any activity of your app with Activity.getApplication(). >
Except that Dianne Hackborne, one of the Android Framework engineers, has consistently argued that you usually are better off just using a Singleton because it gives you all of the same benefits but has more flexibility. Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware On Mon, Apr 30, 2012 at 8:57 AM, Paul v <[email protected]> wrote: > I think you're looking for the Application class: > http://developer.android.com/reference/android/app/Application.html > > You have to write a class that extends Application, add a name field in > the manifest.xml file, then you can access an instance of your Application > sub-class from any activity of your app with Activity.getApplication(). > > > On Monday, April 30, 2012 9:33:30 AM UTC-5, baturanija1 wrote: >> >> hey people, i am trying to make "mute" button on my app,that could >> sound-off\on sounds in app-such as ,sound of click,could of some >> prezentation.. is there any option that i can declare public variable- >> such as int,and to be seen in other class in my other activity.When i >> open new item,i what to information of that variable can be seen in >> othet itents...Any ides,,,i tried to google but did not >> manage...Thanks for share :) > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

