sanyaade-g2g-repos / chatter-bot-api

Automatically exported from code.google.com/p/chatter-bot-api
0 stars 0 forks source link

Android support #11

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. create an android project :)
2. try using think function with cleverbot (did not try with other bots)

What is the expected output? What do you see instead?
i expect cleverbot to think :D but it throws exception

What version of the product are you using? On what operating system?
1.3 chatter-bot jar, win8.1 android api19 (4.4 KitKat)

Please provide any additional information below.
first, there is a problem with Pandorabots. in line 42, you are using UID from 
java.rmi.server.UID, and it is not supported in android.
secondly, cleverbot is having a hard time chatting too. utils class, line 67. 
the problem is that the you can't start network process on main thread. it 
throws NetworkOnMainThreadException. the cure to this is using asynctask. i'm 
trying to make it work, but i have no success yet. if i do, i will send it to 
you :)

have a nice day

Original issue reported on code.google.com by sirgy...@gmail.com on 24 Sep 2014 at 6:04

GoogleCodeExporter commented 9 years ago
Thank you for your feedback!

For your first point (about java.rmi.server.UID), I will look at what I can do 
to replace this call with something more standard (and compatible with android).

For the second point, this lib is meant to be synchronous (and not multi 
threaded). So indeed you should not call the lib on the main thread :) I will 
not fix this in the code as they are many ways to make async call depending on 
the platform.

Original comment by pierredavidbelanger@gmail.com on 24 Sep 2014 at 6:27

GoogleCodeExporter commented 9 years ago
hi

you are right, i have not thought on calling it async. i'll give it a try, 
thanks :)

Original comment by sirgy...@gmail.com on 24 Sep 2014 at 7:06

GoogleCodeExporter commented 9 years ago
I fixed your first point.

You can have a look at this commit:
https://code.google.com/p/chatter-bot-api/source/detail?r=44

I will release this on Maven Central today.

Original comment by pierredavidbelanger@gmail.com on 24 Sep 2014 at 7:28

GoogleCodeExporter commented 9 years ago
Java version is now released to Maven Central.

Original comment by pierredavidbelanger@gmail.com on 24 Sep 2014 at 8:06

GoogleCodeExporter commented 9 years ago
thanks :)

Original comment by sirgy...@gmail.com on 24 Sep 2014 at 8:36