TapTalk.io Documentation
  • Introduction
  • OneTalk Omnichannel Documentation
    • Getting Started with OneTalk
      • Team Members
      • Add Topic
      • Assign Agent to Topic
      • Paid Proactive Chat
    • Channel Integration
      • Telegram Integration
      • WhatsApp SME Integration
      • Instagram DM Integration
      • Facebook Messenger Integration
      • Live Chat Integration (iOS, Android, Web)
        • OneTalk Live Chat for Android
          • Get Started
          • Event Listener
          • Authentication
          • Case & Topic
          • Navigate Live Chat UI
          • Customize UI Appearance
        • OneTalk Live Chat for iOS
          • Get Started
          • Background Process in TapTalk.io Omnichannel iOS
          • Event Delegate
          • Authentication
          • Case & Topic
          • Navigate Live Chat UI
          • Customize UI Appearance
        • OneTalk Live Chat for Web
          • Get Started
          • Callback
          • Method
        • OneTalk Live Chat for React Native
          • Get Started - Android
          • Authentication - Android
          • Get Started - iOS
          • Authentication - iOS
        • OneTalk Live Chat for Flutter
          • Get Started - Android
          • Get Started - iOS
      • Google Business Messages Integration
      • Google Business Profile Integration
      • Tokopedia Integration
    • Integration API
      • Inbox API
      • User/Contact API
    • Live Chat Widget Callback Function
    • Social Channel Button
    • Custom Chatbot Integration
      • Get Started
      • Edit or Delete Chatbot
      • Development
    • QnA via API
    • Webhook
  • PowerTalk Chat SDK Documentation
    • Getting Started with PowerTalk
    • PowerTalk Android
      • Get Started
      • Enable Chat Features
      • Authentication
      • TapUI and TapCore
      • Background Process in TapTalk.io
      • Connection
      • Event Listener
      • Push Notification
      • General
      • User
      • Room List
        • Room List - TapUI
        • Room List - TapCore
      • Chat Room and Messages
        • Chat Room and Messages - TapUI
        • Chat Room and Messages - TapCore
      • Contact
      • Message Type
      • Customize UI Appearance
      • Customize Chat Features
      • Customize Chat Message Bubble
      • Customize Navigation Bar
      • Deep Linking
      • Error Codes
    • PowerTalk iOS
      • Get Started
      • TapUI and TapCore
      • Background Process in TapTalk.io
      • Implement Application Delegate
      • Authentication
      • Connection
      • Event Delegate
      • Push Notification
      • General
      • User
      • Room List
        • Room List - TapUI
        • Room List - TapCore
      • Chat Room and Messages
        • Chat Room and Messages - TapUI
        • Chat Room and Messages - TapCore
      • Contact
      • Message Type
      • Customize UI Appearance
      • Customize Chat Features
      • Customize Chat Message Bubble
      • Customize Navigation Bar
      • Deep Linking
      • Error Codes
    • PowerTalk React Native
      • Get Started - Android
      • Get Started - iOS
    • PowerTalk Flutter
      • Get Started - Android
      • Get Started - iOS
    • Javascript SDK
      • Get Started
      • Authentication
      • Connection
      • General
      • Event Listener
      • User
      • Room List
      • Chat Room
      • Messages
      • Contact
      • Message Type
    • Server API
      • Get Started
      • Base URL
      • Authentication
      • User
      • Contact
      • Message
      • Room
    • Webhook
      • Get Started
      • Webhook Payload
  • MeetTalk SDK Documentation
    • Getting Started with MeetTalk
    • MeetTalk Android
      • Get Started
      • Event Listener
    • MeetTalk iOS
      • Get Started
      • Implement Application Delegate
      • Event Delegate
  • SendTalk API Documentation
    • Introduction
    • Whatsapp Verification
Powered by GitBook
On this page
  • Add Permissions
  • Setup FileProvider in your application
  • Initialize Google Places API Key (Optional)
  • Enable Cleartext Traffic

Was this helpful?

  1. PowerTalk Chat SDK Documentation
  2. PowerTalk Android

Enable Chat Features

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"/>
    
    <uses-feature
        android:name="android.hardware.camera"
        android:required="false" />
    
    ...
    
</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.

AndroidManifest.xml
<application
    android:name=".YourApplication"
    ...>

    <provider
        android:name="android.support.v4.content.FileProvider"
        android:authorities="${applicationId}.fileprovider"
        android:exported="false"
        android:grantUriPermissions="true">
        <meta-data
            android:name="android.support.FILE_PROVIDER_PATHS"
            android:resource="@xml/file_paths" />
    </provider>

</application>

If your project already has defined paths, make sure the following paths exist in your paths xml file:

your_file_paths.xml
<paths>
    <files-path name="YourFilesPath" path="." />
    <external-path name="YourExternalPath" path="." />
    <cache-path name="YourCachePath" path="."/>
    <external-files-path name="YourExternalFilesPath" path="."/>
    <external-cache-path name="YourExternalCachePath" path="."/>
</paths>

Initialize Google Places API Key (Optional)

import io.taptalk.TapTalk.Helper.TapTalk;

TapTalk.initializeGooglePlacesApiKey(GOOGLE_PLACES_API_KEY);
import io.taptalk.TapTalk.Helper.TapTalk

TapTalk.initializeGooglePlacesApiKey(GOOGLE_PLACES_API_KEY)

Starting from version 2.16.0, chat room 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:

TapUI.getInstance().setLocationAttachmentEnabled(false);

Your key also needs to be defined in your application's AndroidManifest.xml file, under the <application> tag.

AndroidManifest.xml
<application
    android:name=".YourApplication"
    ...>

    <meta-data
        android:name="com.google.android.geo.API_KEY"
        android:value="GOOGLE_PLACES_API_KEY" />

</application>

Parameters GOOGLE_PLACES_API_KEY: (String) Google Places API Key

Enable Cleartext Traffic

To enable some network features, such as sending link preview in messages, please enable usesCleartextTraffic in AndroidManifest.xml file.

AndroidManifest.xml
<application
    android:name=".YourApplication"
    ...
    android:usesCleartextTraffic="true">

    ...

</application>
PreviousGet StartedNextAuthentication

Last updated 1 month ago

Was this helpful?

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 provided by Google. To initialize, insert your obtained key using the initializeGooglePlacesApiKey() method.

the documentation