Currently I'm using twilio to make calls in android in my application but they don't support arm64 phones yet, my application keeps crashing as it doesn't find the appropriate libtwilio-native.so file.
Is there a way to disable this service only for an architecture? Is there a way to disable the service by default and enable it in runtime?
Additional info:
My manifest.xml file has this:
<service
android:name="com.twilio.client.TwilioClientService"
android:exported="false" />
The bools.xml trick doesn't work for me as arm64 phones and others phones can have the same android version.
Add
android:enabled="false"
to the<service>
in the manifest. Then, at runtime, you can usePackageManager
and the awkwardly-namedsetComponentEnabledSetting()
method to enable it, if desired.True, though if you are using product flavors in Android Studio for handling your CPU architecture splits, you should be able to use
resConfig
in the product flavor definitions in Gradle in lieu of the actualbools.xml
files to define the boolean resource, and use that inandroid:enabled
. Note that I have not tried this, YMMV, do not taunt Happy Fun Ball, etc.