Cordova Slack Digest

Tue, 09 Nov 2021 08:26:22 GMT

User count: 4674

Join the conversation at slack.cordova.io

Channel #cordova-android (10 messages)


Mon, 08 Nov 2021 19:10:36 GMT

@daviesd says

question about cordova-android 10.1.1. Do I need to specify <preference name="AndroidXEnabled" value="true" /> anymore? and do i need cordova-plugin-androidx anymore?

Mon, 08 Nov 2021 19:19:53 GMT

@norman137 says

AndroidXEnabled preference is essentially forcefully enabled in cordova-android@10.

Not sure what cordova-plugin-androidx is suppose to do. Plugins that uses old/legacy support libraries (e.g. android.support packages) will not work as is. cordova-plugin-androidx-adapter is a common solution for plugin authors that doesn't have the capacity or refuses to to update their plugins to use the androidx libraries.

Mon, 08 Nov 2021 19:23:04 GMT

@daviesd says

Sorry, I meant cordova-plugin-androidx-adapter (typo). I removed both and things seem to be working. My coworker is having trouble launching in the emulator (warning about android.useAndroidX). It's running fine for me. So I guess my plugins are androidx compliant? I have a not so fuzzy warm feeling about that. Wonder if I should throw it in for good measure

Mon, 08 Nov 2021 19:28:17 GMT

@norman137 says

not sure -- hard to really provide any advice without knowing exactly what the warning is.

Mon, 08 Nov 2021 19:28:41 GMT

@norman137 says

legacy android support libraries and androidx will not compile together though so it should be pretty obvious if you have plugins using legacy support libraries

Mon, 08 Nov 2021 19:30:15 GMT

@daviesd says

oh, so I wouldn't even compile... ok

Mon, 08 Nov 2021 19:32:20 GMT

@daviesd says

our app has been lying dormant for 18 months. this is our first upgrade since cordova-android@9. it's been painful. but I think I finally have it working again.

Mon, 08 Nov 2021 19:35:15 GMT

@daviesd says

This kind of freaked me out <preference name="AndroidInsecureFileModeEnabled" value="true" /> I thought I needed it initially. But I was discouraged because then Android started marking it as a bad app and asking to remove it. Turns out I didn't need that flag (whew). But I imagine this is gonna bite a few people

Mon, 08 Nov 2021 19:58:57 GMT

@norman137 says

Depends, it mostly bites people who used a lot of file system paths in their DOM, something I personally kinda consider bad practice... if you want to interact with the file system, use the appropriate FS APIs, but that's just my personal opinion 😄

Mon, 08 Nov 2021 21:42:27 GMT

@jcesarmobile says

The only problems with no using file are:

  1. Data loss if you are updating an app. Browser storage (localStorage, websql) is tied to the url, so switching to http/https makes the app to lose the stored information. Is not really lost, just not reachable. There are plugins for moving the data.
  2. CORS. When loading from file there are no CORS restrictions, but you are restricted if using http/https. But you are already restricted on iOS, so should be able to handle it too At least those are the two that I remember