શું તમે જાણો છો બોટ કાવ્ય પણ પૂરી પાડે છે મફત હોસ્ટ લાઈવ ચેટ માટે તમારી પોતાની વેબસાઇટ અથવા મોબાઇલ એપ્લિકેશન?
Bot Libre Forum

SdkConnection browse(BrowseConfig config) API is not working properly.

દ્વારા shahin0690 પોસ્ટ May 1 2016, 22:52

I am trying to create a java application using Bot Libre library. Facing problem on browsing bot/avatar API. My code is given below:

import java.util.List;

import org.botlibre.sdk.config.BrowseConfig;
import org.botlibre.sdk.config.WebMediumConfig;

public class BrowseAvater {

  public static void main(String[] args) {
    BrowseAvater test = new BrowseAvater();
    test.getAvatarList();
  }

  public void getAvatarList() {
    // Get bot list
    BrowseConfig browse = new BrowseConfig();
    browse.type = "Bot";
    browse.category = "Entertainment";
    browse.typeFilter = "Public";
    browse.tag = "cool";
    browse.sort = "name";
    System.out.println("Started to load avatar list");
    List<WebMediumConfig> bots = BotLibreSdk.getConnection().browse(browse);
    System.out.println("Bot list found : " + bots);
  }
}

 

Sometimes it working nice but average time found no response from POST (String url, String xml) API. This post API is called from browse(BrowseConfig config) API.

No error throws in this scenario. Additionally in android I found it's working nice.

Thanks in advance for your support.


by admin posted May 2 2016, 8:33
You can enable debugging using,

connection.setDebug(true);

This will output the XML calls and responses.

Make sure you are setting your API key, otherwise requests will be rejected.

Also, make sure you are not using the UI threads, in Android you must execute all external calls using an AsyncTask class (look at our actions package for samples).

Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 1543, today: 2, week: 3, month: 3

ને: 12663161
પોસ્ટ: May 1 2016, 22:52
જવાબો: 1
જોવાઈ: 1820, આજે: 3, સપ્તાહ: 3, મહિને: 3
0 0 0.0/5