Thankyou for the feedback, but as there were some points made on each side it's still not clear what I should recommend to the other team.
MapActivity inheritance complications are not relevant in our particular case - it's just an Activity. In our case: The CordovaActivity already has all the well-tested lifecycle implementations we need like onPause/onResume/onDestroy which are correctly calling appView.handleXXX methods as required. They are also using splashscreen logic etc. A) If they cut/paste they end up with a heap of code they don't fully understand (essentially the implementations of all those methods above), and they also have to be careful of any future CordovaActivity changes in case it overlaps code they previously cut. Actually, failing to call a handlePause method correctly was where they came to grief in the first place. B) If they extend CordovaActivity then they get a lot of that for free and might have avoided the situation they are in. Yes, they have to override a bunch of other methods for initialization/layouts etc but I'm guessing they probably had to implement some of those anyway. -- I understand cringing over extending some huge class; seeing large slabs of CordovaActivity Java code duplicated in user code is also cringe-worthy. Anyway, I have the impression that you recommend that we should not extend CordovaActivity. Is it a fair summary? Thanks. -----Original Message----- From: Joe Bowser [mailto:bows...@gmail.com] Sent: Monday, 22 July 2013 12:11 PM To: dev Subject: Re: Embedding Cordova WebView on Android On Jul 21, 2013 6:59 PM, "Anis KADRI" <anis.ka...@gmail.com> wrote: > > On Sun, Jul 21, 2013 at 6:48 PM, Joe Bowser <bows...@gmail.com> wrote: > > > Because there are things CordovaActivity does that you may not want, > > > Such as ? Initializing a WebView, creating layouts in code, handling intents, everything that CordovaActivity does for the user by default. > > > also > > there is no such thing as dual inheritance in Java. > > > > For example if you have a MapActivity you can implement a CordovaInterface, > > but not extend a CordovaActivity. > > > > As far as I understand the multiple inheritance is somewhat solved by > implementing multiple interfaces but that is not really the issue here. > It is, since CordovaWebView was created partly so it could be used as a component inside of a MapActivity. > Extending a class is easier for developers than implementing an > interface because one can override methods instead of implementing them. > > True, but you can't extend a MapActivity and a CordovaActivity at the same time. People have to extended CordovaActivity, but when I see that it still makes me cringe given how huge CordovaActivity still is.