Skip to main content

Pataa Set delivery location SDK Implementation Guide




Step 1. Download Pataa_autofill_sdk.arr file from the git repository

Step 2. Put pataa_autofill_sdk.aar in your project lib folder

Step 3. Add below line in app level build.gradle

implementation fileTree(dir: "libs", include: ["*.aar"])

Step 4. Add Metadata in manifest

android:value="@string/PATAA_API_KEY" />

android:value="true" />

android:value="false" />

Step 5. Add view on xml(Don't change the id)

app:addressLinePreText="Ship To"
app:editTextColor = "@color/white"
app:textColor="@color/white" />

addressLineBackColor : Set color for address line back color default color will be while

addressLinePreText : Set prefix text for address line by default it will be "ship to"

addressLineTextColor : Set text color for address line default will be black

backgroundColor : Set background color of button default will be black

editTextColor : Set Button text color default will be white

cardCornerRadius : Set button corner radius

keepLastSessionData : Set True for manage last session data

sessionKey : For save last address data put your unique key here

showAddressLine : For hide/show bottom address line

textColor : Set Buton text color default will be white

Step 6. Set properties and listener(Only for JAVA),

.setCountryCode("##PUT COUNTRY CODE WITH +##(IN INDIA +19)").setMobileNo("## PUT LOGIN USER MOBILE NO ##")
//to get the result of create pataa
.setAddressCallBack(new OnAddressGet() {//to get the click events
public void onNetworkIsNotAvailable() {
Toast.makeText(MainActivity.this, "onNetworkIsNotAvailable", Toast.LENGTH_SHORT).show();

public void onPataaFound(User user, Pataa response) {
Log.e("TAG", "onManualAddressFound: " + response);

public void onManualAddressFoound(JSONObject jsonObject) {
Log.e("TAG", "onManualAddressFound: " + jsonObject);


public void onError(int statusCode, String message) {
Toast.makeText(MainActivity.this, statusCode + " : " + message, Toast.LENGTH_SHORT).show();

Step 7. Set properties and listener(Only for Kotlin),

   (findViewById<View>( as PataaAddressSdk).setCurrentActivity(this)
.setCountryCode("##PUT COUNTRY CODE WITH +##(IN INDIA +19)")
.setMobileNo("## PUT LOGIN USER MOBILE NO ##") //to get the result of create pataa
.setAddressCallBack(object : OnAddressGet {
//to get the click events
override fun onNetworkIsNotAvailable() {
Toast.makeText(this@MainActivity, "onNetworkIsNotAvailable", Toast.LENGTH_SHORT)
override fun onPataaFound(user: User, response: Pataa) {
Log.e("TAG", "onManualAddressFound: $response")

override fun onManualAddressFoound(jsonObject: JSONObject) {
Log.e("TAG", "onManualAddressFound: $jsonObject")

override fun onError(statusCode: Int, message: String) {
Toast.makeText(this@MainActivity, "$statusCode : $message", Toast.LENGTH_SHORT)

In Pataa found response you will found Pataa Object you can use it as you required

You will found following details in Pataa object:

pataa_code, address1, address2, address3, address4, zipcode, city_name, state_code, state_name, country_code, country_name, qr_code, lati, logi,

Step 9. Add PATAA api key on string.xml.

<string name="PATAA_API_KEY"></string>

In case of errors

  E/PATAA_SDK_LOGS: {"msg":"Invalid App key","status":600}
E/PATAA_SDK_LOGS: Invalid App key

Solution : Enable logs from manifest metadata and copy the SHA1 key. Put it on pataa developer console, and then try again you will got the results

  E/PATAA_SDK_LOGS: {"msg":"Your key is deavtivated please generate new","status":200}
E/PATAA_SDK_LOGS: Invalid App key

Solution : Enable the key for use on Pataa developer console or Create new key.

 E/PATAA_SDK_LOGS: {"msg":"Pataa Code not found","status":204}
E/PATAA_SDK_LOGS: Pataa Code not found

Solution : Try to search with valid pataa code like - KUMAR100, SINGH221, Because your searched pataa code is not created on pataa platform yet.

   E/PATAA_SDK_LOGS: {"msg":"Pataa Search Limit Over","status":400}
E/PATAA_SDK_LOGS: Pataa Search Limit Over
E/PATAA_SDK_LOGS: {"msg":"Invalid API key or App key,you are not authorized.Please provide a valid key","status":400}
E/PATAA_SDK_LOGS: Invalid API key or App key,you are not authorized.Please provide a valid key