Fix SurveyMonkey Android SDK manifest #33
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello! According to the Google Play's target API level requirement,
Looking at the section Migrate from Android 11 (API level 30) to Android 12 (API level 31), there is a point about Intent filters.
I did explicitly declare the
android:exported
attribute for all the components of the app beforehand as it has been a best-practice for Android development and even recommended by Google in the documentation for long time.If you set the


targetSdkVersion
to31
then builds fail because ofreact-native-survey-monkey
. You will see a generic messageManifest merger failed with multiple errors, see logs
.Running Gradle with the
--info
flag helps as it logs the task and manifest merger steps.Here you go, the last one before a fail is
com.surveymonkey:surveymonkey-android-sdk:2.0.0
, specificallycom.surveymonkey.surveymonkeyandroidsdk.SMFeedbackActivity
.The problem with the abandoned SurveyMonkey Mobile SDK is that the
android:exported
attribute is not declared in the manifest and probably never will, thus we have to add it by ourselves. We don't have the source code of the SDK because it is distributed as an AAR (Android library), look at the surveymonkey-android-sdk repository.Luckily, we have an ability to manage Manifest files with build tools. All the manifest files are combined into one file. We can tweak the SurveyMonkey Android SDK manifest with the
merge
node marker to add the requiredandroid:exported
attribute.TLDR: I added the now required
android:exported
attribute to the SurveyMonkey Android SDK manifest.