Please follow the following steps to enable TapTalk.io's chat features, such as contact sync and sending media, document, and location messages.
Add Permissions
Some of TapTalk.io's chat feature may require permissions to be added to your app. To do so, open AndroidManifest.xml file in your project and add the following permissions under the <manifest> tag if they are not yet present:
AndroidManifest.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="your.package.name">
<!--Permission for contact sync-->
<uses-permission android:name="android.permission.READ_CONTACTS" />
<!--Permission for media messages-->
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />
<uses-permission android:name="android.permission.READ_MEDIA_AUDIO" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<!--Permission for location messages-->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<!--Permission for voice messages-->
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
...
</manifest>
Setup FileProvider in your application
To enable file transfer through chat messages, you need to define FileProvider in your application's AndroidManifest.xml file, under the <application> tag.
To enable location search result preview while sending location message, a Google Places API Key is required. To obtain the API key for your application, you can check the documentation provided by Google. To initialize, insert your obtained key using the initializeGooglePlacesApiKey() method.
Starting from version 2.16.0, location attachment will be enabled by default even when Google Places API Key is not provided, but location search will be hidden.
To disable location attachment, you may call: