Open anirban-baisya opened 2 years ago
@anirban-baisya I am having the same problem with react-native 0.69. I am not getting any information in debug mode. did you find a solution or at least what was the problem? Thanks.
After debugging RNWhatsAppStickersModule.java, i found that the following activity was failing:
ResolveInfo should = activity.getPackageManager().resolveActivity(intent, 0);
The problem happens if you are targeting android 11 (API 30 or higher) which is the default settings for ReactNative 0.69.
Android 11 introduces new changes related to package visibility, which will require adding some intent in "android/app/src/main/AndroidManifest.xml"
I solved the problem by adding the following intent before the "<application" markup
<queries>
<intent>
<action android:name="android.intent.action.MAIN" />
</intent>
</queries>
Rememebr "
I am using the following gradle recent versions:
gradle plugin: 7.2.1 add to "android/build.gradle" classpath("com.android.tools.build:gradle:7.2.1")
gradle: 7.3.3 add to "android/gradle/wrapper/gradle-wrapper.properties" distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip
@Jobeso, you may want to update the install section for Android to have the new intent i mentioned earlier.
1st go to :- node_modules > react-native-whatsapp-stickers > android > src> main > java > com > jobeso > RNWhatsAppStickers >RNWhatsAppStickersModule.java
2nd :- comment out below lines from @ReactMethod public void send(String identifier, String stickerPackName, Promise promise) { ... } section