Request: Remove final declaration on JuceAppActivity.java


#1

Hi Jules,

In order to keep up with changes in the JNI stuff, I want to subclass the JuceAppActivity. But in order to do that I need that class not to be final, same goes for the onCreate function which needs to be overridden. That's about it

/Rob

 


#2

That's a pretty fair request, I'll remove it..


#3

You forgot to remove the final on onCreate method :)

 


#4

Drat, thought I did that.. Will do it when I get a sec.


#5

As an extra request here, it would be great to be able to subclass the generated / copied activity class without having to alter the AndroidManifest.xml file each time. Its a little cumbersome to have to keep the activity or manifest in source control and check it out each time the Introjucer project is saved. I'm happy to suggest a change for this. Should be as simple as an extra field that populates 

<activity android:name="SubClassedActivity" ...> ... </activity>

if not empty. 

A nice touch would be to create the file if it does not exist with the override scaffolding in place.


#6

Hi Adamski, Not sure but doesn't the "Android Activity Class Name" property in the Introjucer do exactly that? 


#7

Hi Fabian, thats what I assumed it would do, but that property defines the name given to the activity class copied from JuceAppActivity.java - i.e. whenever its changed a new file is created and the AndroidManifest.xml is updated with the new filename. 

I think it would be better if the file was always called JuceAppActivity.java, and then allow developers to subclass it and define the name in the "Android Activity Class Name" property. 


#8

OK. I've added this to the latest tip. Can you check that this works for you? Thanks!

Fabian


#9

Works perfectly. Thank you very much.