Hey everybody,

i'm currently developing a new maintained Braintree Plugin. As the latest 
mobile SDK of them requires AndroidX, i searched for Issues and found this one: 
https://github.com/apache/cordova-android/issues/841

As it is mentioned correctly it is nearly enough to change the base class of 
the CordovaActivity from android.app.Activity to 
androidx.appcompat.app.AppCompatActivity. 

I forked cordova-android and tested it out. Changing three Java Classes, the 
AndroidManifest.xml and adjust the  build.gradle Script and it works 😃 

Like i comment in the Ticket i thing make the changes based on the 
AndroidXEnabled Preference should be a good solution, but the question how. 

Adjusting the Gradle File is easy:dependencies {
    if (project.hasProperty('android.useAndroidX')) {
        implementation 'androidx.appcompat:appcompat:1.2.0'
    }
}

But how to continue with the other Files? Also the Change in the 
AndroidManifest.xml is just on Line:
Change the android:theme to @style/Theme.AppCompat.NoActionBar - this can be 
easy performed in the prepare Script?

But what about the Changes in the Java Files? What is the best way to make this 
possible? I think changing the single Lines in the prepare Script is not the 
best solution?

Please give me some hints, so i can create the PR.

Greetings,
Hans

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org
For additional commands, e-mail: dev-h...@cordova.apache.org

Reply via email to