Closed SomnathKadam closed 3 years ago
solution : Need to add below lines in AndroidManifest
......
</application>
<queries>
<intent>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="vnd.android.cursor.dir/contact" />
</intent>
</queries>
</manifest>
For any future visitors to this issue - The underlying reference is this -
this should be added to Documentation
i added this line
<queries>
<intent>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="vnd.android.cursor.dir/contact" />
</intent>
</queries>
but it's still not working. it's closing the app without any error
i added this line
<queries> <intent> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <data android:mimeType="vnd.android.cursor.dir/contact" /> </intent> </queries>
but it's still not working. it's closing the app without any error
yes, I still facing this issue on android 11, anyone can help?
Late answer but I've encountered the same problem:
If you don't really know, how AndroidManifest works (as example, I don't), make sure that you don't mix intent blocks
<intent>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="vnd.android.cursor.dir/contact" />
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="https"/>
</intent>
^ This will NOT work ^
<intent>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="https"/>
</intent>
<intent>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="vnd.android.cursor.dir/contact" />
</intent>
^ This is correct ^
A bit dumb situation, but it's better to save other beginners from spending hours on this :)
Hi Team,
facing issue in Android 11 Contact picker not open, with below code
import { selectContactPhone } from 'react-native-select-contact';
solution : Need to add below lines in AndroidManifest