Re: [android-developers] Extending multiple classes

2010-07-30 Thread Priyank Maiya
Thanks guys for the quick response. Will try it out and let you know Thanks Priyank On Fri, Jul 30, 2010 at 12:38 PM, Mark Murphy mmur...@commonsware.comwrote: On Fri, Jul 30, 2010 at 1:29 PM, Priyank priyankvma...@gmail.com wrote: Can my class extend 2 or more classes at a time. No,

Re: [android-developers] Extending multiple classes

2010-07-30 Thread Shane Isbell
Just invoke Activity.getApplication() within your Activity.onCreate method, casting the Application to your specific class type. Then your can set whatever you need on your application instance and it will be accessible within other Activities through the same Activity.getApplication() method.

[android-developers] Extending multiple classes

2010-07-30 Thread Priyank
Hi, I had a basic question. Can my class extend 2 or more classes at a time. What is the syntax. I want to extend Activity as well as Application. Wont this create problems in the manifest file? Activity because, I need to do a couple of things during the onCreate() [binding a service]and

Re: [android-developers] Extending multiple classes

2010-07-30 Thread Mark Murphy
On Fri, Jul 30, 2010 at 1:29 PM, Priyank priyankvma...@gmail.com wrote: Can my class extend 2 or more classes at a time. No, sorry. I want to extend Activity as well as Application. Even if that were possible, I doubt this would be a good idea. Activity because, I need to do a couple of

Re: [android-developers] Extending multiple classes

2010-07-30 Thread Kostya Vasilyev
This is called multiple inheritance, and Java - the language - doesn't have this feature, regardless of the platform (Android or not). Break up your code logic into more fine-grained pieces. You can bind to the service from multiple activities, as many as necessary. Also, you don't need to

Re: [android-developers] Extending multiple classes

2010-07-30 Thread Priyank Maiya
Hi, I am facing some when running the code. I am using the getApplicationContext() to save the instance. Kindly have a look at my code and let me know where I am going wrong. VVMService is the class whose instance is created and got from the onServiceConnected() callback public class