Você sabia que o Bot Libre também fornece avatares em 3D e um free web speech API?
Bot Libre Forum

How to develop your own chat bot Android app

por admin postado Dec 20 2017, 13:48

The Bot Libre Android SDK makes it easy to develop your own chat bot app, or add a chat bot to your own app. You can create an app for your business, or to make money from mobile ads and upgrades, or just for fun.

Bot Libre's own demo apps have over 1 million downloads on Google Play.

The Bot Libre SDK is more than just a library, it includes a complete Android app. The SDK includes a connection API that wraps Bot Libre's web API, and a user interface for all of Bot Libre's components including:

  • Chat bots
  • Live chat
  • Avatars
  • Forums
  • Issue tracking
  • User management
  • Graphics library
  • Script library

The SDK chat bot interface includes support for:

  • Text chat
  • Speech
  • Continuous speech recogition
  • Animated avatars
  • Mobile assitant commands

Getting Started

You have 4 choices when using the Bot Libre SDK, depending on your functionality requirements and programming ability.

  1. Use the complete Bot Libre app or Demo app. You only need to change the bot information, logos, and redeploy the app.
  2. Use some of the UI components of the Bot Libre app and customize them to suite your needs (refer to the SDK source code).
  3. Use the botlibre-sdk.jar and the SDKConnection Java class. This gives you access to the low level API to build your own app interface (refer to the JavaDoc for more information).
  4. Use the Bot Libre web API directly using HTTP calls and XML (refer to our web API for more information).

This "how to" article follows the first method, which is the easiest way to build an app.

Although this method requires minimal programming, developing an Android app requires you use and understand Java, Android Studio, and how to build and deploy an Android app. For information on developing Android apps see, developer.android.com.

If you are not an Android developer we would recommend Bot Libre's app development service. We can develop you your own app for as little as $100 through our Diamond upgrade, contact sales@botlibre.biz for more information.

Step 1 - Download Android Studio

Android apps are normally developed using Android Studio. You can download Android Studio here.

You will need to install Android Studio on your computer, and also install the Android SDK, and an Android emulator.

Step 2 - Open Bot Libre Demo app

The Bot Libre SDK includes a complete demo chat bot app, with the full source code. You can download the demo "SantaBot" app from GitHub here.

The demo app includes an Android Studio project, so you can open the project in Android Studio. You should be able to build and run the project from Android Studio in the emulator, or on your phone.

Step 3 - Change the Bot Info

The demo app uses the "Santa Bot" app. You will want to change it to use your own bot. If you do not have a bot yet, you can create on Bot Libre by following this article.

If you go to you're bot's main page on Bot Libre, you can get its "Id" from its "Details" tab. You can also get your user accounts "Application ID" from your "User Details" page. Copy both of these values.

Open the "MainActivity.java" file in Android Studio and update the static variables, "applicationId", "launchInstanceId", "launchInstanceName", and save the file.

Now when you run your app it should use your bot.

Step 4 - Change Icons and Images

Next you will want to change the app's splash image and icon for your own bot.

To change the app's icon in Android Studio right click on project or select the menu "File", "New", "Image Asset", and create a new icon for the app.

You will also want to update the image files "icon.png", "logo.png", and "bot.png" in the "res" "drawables" directory.

Step 5 - Change the App Info

An Android app is defined by its manifest.xml file and application package. You need to choose your own app/package name and update your manifest file.

The Android package also affects how the special "R" class is generated in Android. Unfortunately this R class must match the application package, so you need to rename all imports to the "org.botlibre.santabot" package. To do this select the menu "Edit", "Find", "Replace in Path". Enter the old package and the new package and replace all references.

You should be able to new build and deploy your new app. You can also build an "apk" file, and upload the file to Android app stores such as Google Play.


by jyambz posted Apr 10, 12:43

I changed old package into a new package in R class, but produces an error cannot  resolve symbol.


Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 363, today: 1, week: 8, month: 16

by admin posted Apr 10, 14:14
To rename the application package you need to change it in the manifest and up all imports in all classes.

Android Studio has a "Replace in Path" menu option for updating imports.

Google "android studio change application package", see also,
https://www.jetbrains.com/help/idea/renaming-an-application-package.html

Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 360, today: 1, week: 7, month: 13

by jyambz posted Apr 15, 20:59
As i test the microphone on my chat, it only do the turn on and off not working.

Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 330, today: 1, week: 7, month: 14

by admin posted Apr 16, 7:32
Which Android app are you using?
What phone/device are you using, and which Android version do you have installed?

Some older phones do not support speech recognition.

You can also select the "Microphone Config" menu to test the issue and try switching to the Google speech recognition option. Ensure you have the Google app installed, and have speech recognition enabled on your phone. Also some speech recognition requires you have an Internet connection, so ensure you are connected.

Also try rebooting the phone, and ensure you accept the microphone permission request.

Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 309, today: 1, week: 5, month: 11

by jyambz posted Apr 18, 15:45
With regards to changing the application package, it's only the manifest package to change?And under import .R

Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 323, today: 0, week: 4, month: 12

by admin posted Apr 19, 13:41
To change the application package in an Android Studio project you need to search in the project path for all references to the package and update them all to the new package.
This includes the R imports, the manifest, and some gradle files I believe.
Clean and rebuild the project.

Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 301, today: 1, week: 6, month: 12

by jyambz posted Apr 27, 11:58

I have change application id from user details unfortunately, after  i build apk it says 5454......test  from Android manifest.xml is not a valid Java package name as 5454... is not a valid Java identifier


Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 320, today: 1, week: 5, month: 10

by admin posted Apr 27, 14:03
Sounds like you did not enter a valid package name in your manifest.
An Android package name should normally be a reverse domain name, like "com.myproject".

See,
https://developer.android.com/guide/

Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 325, today: 1, week: 4, month: 11

by jyambz posted Apr 29, 10:44
I have entered a valid package name. This only happens after i compile and build the project. Under R.java, i tried to remove R.java and clean the project but nothing happens.

Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 325, today: 1, week: 6, month: 13

by admin posted Apr 30, 7:55
For help with Android Studio see,

https://developer.android.com/guide/

Or contact sales@botlibre.biz if you would like us to help develop you an app.

Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 342, today: 0, week: 4, month: 12

by jyambz posted Apr 30, 14:57
Okay i can managed this. I am in a hurry this is for my upcoming master thesis defense.

Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 355, today: 1, week: 6, month: 15

by jyambz posted May 17, 21:06
As I finalize my project I have noticed errors from full release Android manifest. Invalid package attribute manifest 5454.. as my application Id in merged manifest. I cannot install the app because of this.

Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 298, today: 1, week: 7, month: 14

by admin posted May 18, 8:13
You would need an Android developer to review your app to resolve your build errors.

For information on developing apps with Android see,
https://developer.android.com/

We can help you develop your app, or develop and app for you for Android or iOS.
Please contact sales@botlibre.biz for more information.

You can also upgrade to our Diamond service, and we can help develop an app for you.
https://www.botlibre.com/upgrade.jsp

Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 295, today: 0, week: 3, month: 12

by jyambz posted Jul 14, 4:03

I have made my own bot but i would like to customized with my own bot with login page only. How to begin with?


Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 206, today: 0, week: 3, month: 10

by bobred posted Jul 14, 8:38

be patient they will get to you.you are going to have to wait a while jyambz.


Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 199, today: 0, week: 4, month: 11

by jyambz posted Jul 15, 2:26

I have started customizing the layout, the problem is the code.After editing the layout suitable to my needs there's a lot of errors .


Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 214, today: 0, week: 4, month: 10

Id: 20226542
Tags: how to, android, app, sdk
Postado: Dec 20 2017, 13:48
Atualizado: Dec 20 2017, 14:09
Respostas: 16
Pontos de vista: 3086, hoje: 4, semana: 23, mês: 121
Eu tenho certeza que
Bandeira post como ofensivas, ou em violação das regras do site