You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This code shows how you can embed TalkJS into a WebView using Android.
5
-
The app itself is a minimal WhatsApp clone with a hardcoded contact list.
3
+
This code shows how you can embed TalkJS into a WebView using Android. The app itself is a minimal WhatsApp clone with a hardcoded contact list.
6
4
7
5
It shows off three use cases:
8
6
- Show a conversation list (the "inbox")
@@ -13,3 +11,6 @@ How it works, in brief:
13
11
1. When the Inbox (`InboxTab`) is opened, a webview is created which runs the JS code in `asserts/chat.js`, which is generic for all three use cases
14
12
2. The JS code calls back into the app via `JavascriptCallbacks.getOptions` to determine what to do (open an inbox, start a chat with somebody, etc). Then, it calls TalkJS SDK methods as described in the [TalkJS docs](https://talkjs.com/docs).
15
13
3. When a user clicks on a conversation in the inbox, an intent is generated to navigate to the `ChatboxActivity`, which reuses the code above to display a chatbox of a single conversation, instead of a conversation list.
14
+
15
+
> [!TIP]
16
+
> [Download this example project as a zip file](https://github.com/talkjs/talkjs-examples/releases/latest/download/android.basic-example.zip)
Copy file name to clipboardExpand all lines: android/file-upload-example/README.md
+5-2Lines changed: 5 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,17 +1,20 @@
1
-
# TalkJS Android File Upload Example
1
+
# Android file upload example
2
2
3
3
This code shows how to implement file upload support in Android's WebView.
4
4
Despite TalkJS already supporting uploading of files, the default Android WebView implementation
5
5
does not implement file uploads. The code also shows how to upload rich content
6
6
to TalkJS via the [unified API](https://developer.android.com/develop/ui/views/receive-rich-content)
7
7
This enables users to upload images and videos from the clipboard, keyboard or through drag and drop.
8
8
9
+
> [!TIP]
10
+
> [Download this example project as a zip file](https://github.com/talkjs/talkjs-examples/releases/latest/download/android.file-upload-example.zip)
11
+
9
12
## Getting Started
10
13
11
14
It is recommended to open this project in Android Studio so that Gradle sync is handled
12
15
automatically for you.
13
16
14
-
Before running the app, don’t forget to replace the string, YOUR_APP_ID, with your TalkJS app ID from the dashboard.
17
+
Before running the app, don’t forget to replace the string, `YOUR_APP_ID`, with your app ID from the [TalkJS dashboard](https://talkjs.com/dashboard/).
15
18
16
19
This code sample was used as part of two tutorials:
Copy file name to clipboardExpand all lines: angular/angular-chat-app/README.md
+4-1Lines changed: 4 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,9 @@
2
2
3
3
This is an example project for TalkJS's tutorial on [how to build a chat into an Angular app with TalkJS](https://talkjs.com/resources/angular-chat-app/).
4
4
5
+
> [!TIP]
6
+
> [Download this example project as a zip file](https://github.com/talkjs/talkjs-examples/releases/latest/download/angular.angular-chat-app.zip)
7
+
5
8
## Prerequisites
6
9
7
10
To run this tutorial, you will need:
@@ -13,7 +16,7 @@ To run this tutorial, you will need:
13
16
14
17
## How to run the tutorial
15
18
16
-
1. Clone or download the project.
19
+
1. Clone or [download this project](https://github.com/talkjs/talkjs-examples/releases/latest/download/angular.angular-chat-app.zip).
17
20
2. Replace `YOUR_APP_ID_HERE` in `src/app/talk.service.ts` with your own app ID. You can find your app ID on the **Settings** page of your [TalkJS dashboard](https://talkjs.com/dashboard/).
Copy file name to clipboardExpand all lines: angular/angular-getting-started/README.md
+4-1Lines changed: 4 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,9 @@
2
2
3
3
This is the example code for the [Angular getting started guide](https://talkjs.com/docs/Getting_Started/Frameworks/Angular/).
4
4
5
+
> [!TIP]
6
+
> [Download this example project as a zip file](https://github.com/talkjs/talkjs-examples/releases/latest/download/angular.angular-getting-started.zip)
7
+
5
8
## Prerequisites
6
9
7
10
To run this tutorial, you will need:
@@ -12,7 +15,7 @@ To run this tutorial, you will need:
12
15
13
16
## How to run the tutorial
14
17
15
-
1. Clone or download the project.
18
+
1. Clone or [download this project](https://github.com/talkjs/talkjs-examples/releases/latest/download/angular.angular-getting-started.zip).
16
19
2. Replace `<APP_ID>` in `src/app/talkjs-chat/talkjs-chat.component.ts` with the value found in the **Settings** tab of your [TalkJS dashboard](https://talkjs.com/dashboard/login).
Copy file name to clipboardExpand all lines: chatbot-integration/anthropic-claude/README.md
+6-1Lines changed: 6 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,10 @@
1
+
# How to integrate Claude into your TalkJS chat with the Anthropic API
2
+
1
3
This is an example project for TalkJS's tutorial on [How to integrate Claude into your TalkJS chat with the Anthropic API](https://talkjs.com/resources/how-to-integrate-claude-into-your-talkjs-chat-with-the-anthropic-api/). The project uses TalkJS webhooks to listen for new message events from the TalkJS server, calls the Anthropic API to generate a message reply, and then adds the reply to the conversation with the TalkJS API.
2
4
5
+
> [!TIP]
6
+
> [Download this example project as a zip file](https://github.com/talkjs/talkjs-examples/releases/latest/download/chatbot-integration.anthropic-claude.zip)
7
+
3
8
## Prerequisites
4
9
5
10
To run this tutorial, you will need:
@@ -12,7 +17,7 @@ To run this tutorial, you will need:
12
17
13
18
## How to run the tutorial
14
19
15
-
1. Clone or download the project.
20
+
1. Clone or [download this project](https://github.com/talkjs/talkjs-examples/releases/latest/download/chatbot-integration.anthropic-claude.zip).
16
21
2. Replace `<APP_ID>` and `<TALKJS_SECRET_KEY>` in `index.html` and `server.js` with the values found in your [TalkJS dashboard](https://talkjs.com/dashboard/login).
17
22
3. Replace `<ANTHROPIC_SECRET_KEY>` with your Anthropic API key
18
23
4. Enable the `message.sent` option in the **Webhooks** section of the TalkJS dashboard.
Copy file name to clipboardExpand all lines: chatbot-integration/google-gemini/README.md
+6-1Lines changed: 6 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,10 @@
1
+
# How to integrate Google's Gemini into your TalkJS chat
2
+
1
3
This is an example project for TalkJS's tutorial on [How to integrate Google's Gemini into your TalkJS chat](https://talkjs.com/resources/create-a-chatbot-with-talkjs-and-gemini/). The project uses TalkJS webhooks to listen for new message events from the TalkJS server, calls the Gemini API to generate a message reply, and then adds the reply to the conversation with the TalkJS API.
2
4
5
+
> [!TIP]
6
+
> [Download this example project as a zip file](https://github.com/talkjs/talkjs-examples/releases/latest/download/chatbot-integration.google-gemini.zip)
7
+
3
8
## Prerequisites
4
9
5
10
To run this tutorial, you will need:
@@ -12,7 +17,7 @@ To run this tutorial, you will need:
12
17
13
18
## How to run the tutorial
14
19
15
-
1. Clone or download the project.
20
+
1. Clone or [download this project](https://github.com/talkjs/talkjs-examples/releases/latest/download/chatbot-integration.google-gemini.zip).
16
21
2. Replace `<APP_ID>` and `<TALKJS_SECRET_KEY>` in `index.html` and `server.js` with the values found in your [TalkJS dashboard](https://talkjs.com/dashboard/login).
17
22
3. Replace `<GEMINI_SECRET_KEY>` with your Anthropic API key
18
23
4. Enable the `message.sent` option in the **Webhooks** section of the TalkJS dashboard.
Copy file name to clipboardExpand all lines: chatbot-integration/openai-chatgpt/README.md
+6-1Lines changed: 6 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,12 @@
1
+
# How to integrate a chatbot into your TalkJS chat with the OpenAI API
2
+
1
3
This is an example project for TalkJS's tutorial on [How to integrate a chatbot into your TalkJS chat with the OpenAI API](https://talkjs.com/resources/how-to-make-a-customizable-chatbot-frontend-with-talkjs-and-the-openai-api/).
2
4
3
5
The project uses TalkJS webhooks to listen for new message events from the TalkJS server, calls the OpenAI API to generate a message reply, and then adds the reply to the conversation with the TalkJS API.
4
6
7
+
> [!TIP]
8
+
> [Download this example project as a zip file](https://github.com/talkjs/talkjs-examples/releases/latest/download/chatbot-integration.openai-chatgpt.zip)
9
+
5
10
## Prerequisites
6
11
7
12
To run this tutorial, you will need:
@@ -14,7 +19,7 @@ To run this tutorial, you will need:
14
19
15
20
## How to run the tutorial
16
21
17
-
1. Clone or download the project.
22
+
1. Clone or [download this project](https://github.com/talkjs/talkjs-examples/releases/latest/download/chatbot-integration.openai-chatgpt.zip).
18
23
2. Replace `<APP_ID>` and `<TALKJS_SECRET_KEY>` in `index.html` and `server.js` with the values found in your [TalkJS dashboard](https://talkjs.com/dashboard/login).
19
24
3. Replace `<OPENAI_SECRET_KEY>` with your OpenAI API key
20
25
4. Enable the `message.sent` option in the **Webhooks** section of the TalkJS dashboard.
This is an example project for TalkJS's tutorial on [how to integrate TalkJS with a Blazor app](https://talkjs.com/resources/how-to-add-chat-to-a-blazor-web-app-with-talkjs/).
4
4
5
5
This example demonstrates how to integrate TalkJS with a Blazor web application. There is one project present inside the repo:
6
6
7
7
- The `Blazor Web App` Interactive Server project which uses TalkJS's [JavaScript SDK](https://talkjs.com/docs/Getting_Started/JavaScript_SDK) to create a one on one chat.
8
8
9
+
> [!TIP]
10
+
> [Download this example project as a zip file](https://github.com/talkjs/talkjs-examples/releases/latest/download/csharp.blazor_talkjs.zip)
11
+
9
12
## Prerequisites
10
13
11
14
To run this tutorial project, you will need:
@@ -14,7 +17,7 @@ To run this tutorial project, you will need:
- A code editor like [Visual Studio Code](https://code.visualstudio.com/download) or IDE like [Visual Studio](https://visualstudio.microsoft.com/vs/community/)
16
19
17
-
1. Clone or download the project.
20
+
1. Clone or [download this project](https://github.com/talkjs/talkjs-examples/releases/latest/download/csharp.blazor_talkjs.zip).
18
21
1. Open the project in your code editor or IDE.
19
22
1. In the `Home.razor` page, replace `<APP_ID>` in the `AppId` string property with your App Id which can be found in the **Settings** tab of your [TalkJS dashboard](https://talkjs.com/dashboard/login).
20
23
1. From the `blazor_talkjs` directory, run the command `dotnet watch` to render your project on the browser.
Copy file name to clipboardExpand all lines: django/django_talkjs/README.md
+4-1Lines changed: 4 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,9 @@
2
2
3
3
This is an example project for TalkJS's tutorial on [how to build a Django chat app with TalkJS](https://talkjs.com/resources/how-to-build-a-django-chat-app-with-talkjs/). This example demonstrates how to integrate TalkJS with a Python application that uses the Django framework.
4
4
5
+
> [!TIP]
6
+
> [Download this example project as a zip file](https://github.com/talkjs/talkjs-examples/releases/latest/download/django.django_talkjs.zip)
7
+
5
8
## Prerequisites
6
9
7
10
To run this tutorial, you will need:
@@ -11,7 +14,7 @@ To run this tutorial, you will need:
11
14
12
15
## How to run the tutorial
13
16
14
-
1. Clone or download the project.
17
+
1. Clone or [download this project](https://github.com/talkjs/talkjs-examples/releases/latest/download/django.django_talkjs.zip).
15
18
2. Replace `<APP_ID>` in `talkjs/templates/talkjs/chat.html` with the value found in the **Settings** tab of your [TalkJS dashboard](https://talkjs.com/dashboard/login).
This directory contains two games chat applications: one with and one without TalkJS integrated.
5
4
6
5
The application without chat functionality serves as a start application for the TalkJS implementation tutorial, in which chat functionalities are being added within a project. The final product of the tutorial is the games chat application with chat functionality.
7
6
8
-
## First things first
7
+
You can find additional information in the tutorial [How to add chat to a Django app with TalkJS](https://talkjs.com/tutorials/article/how-to-add-direct-messaging-to-a-discussion-forum-with-django-and-talkjs/).
9
8
10
-
### Python version
11
-
Make sure you're working with Python 3.7.4 or above.
12
-
You can download it from [here](https://www.python.org/).
9
+
> [!TIP]
10
+
> [Download this example project as a zip file](https://github.com/talkjs/talkjs-examples/releases/latest/download/django.gameschat.zip)
13
11
14
-
Make sure you tick the box that says 'Add Python to PATH'.
12
+
## Prerequisites
15
13
16
-
### PostgreSQL version
17
-
Make sure you're working with PostgreSQL 11.6 or above.
18
-
You can download it from [here](https://www.enterprisedb.com/downloads/postgres-postgresql-downloads).
19
-
20
-
Through the installation you will be asked to enter a password for your database. In this example the password `gameschat` is used, but you can write whatever you want, just make sure to remember it because you will need it later.
14
+
-**Python version:** Make sure you're working with Python 3.7.4 or above. You can download it from [here](https://www.python.org/). Make sure you tick the box that says 'Add Python to PATH'.
15
+
-**PostgreSQL version:** Make sure you're working with PostgreSQL 11.6 or above. You can download it from [here](https://www.enterprisedb.com/downloads/postgres-postgresql-downloads). You'll be asked to enter a password for your database. In this example the password `gameschat` is used, but you can write whatever you want. Just make sure to remember your password because you'll need it later.
21
16
22
17
## Getting started
18
+
23
19
The following steps should be executed in either the ```gameschat-with-talkjs``` or ```gameschat-without-talkjs``` directory.
24
20
25
21
- After the installation of PostgreSQL is done, start the `pgAdmin` which will open the database in your browser. Enter the password you chose during the installation. Expand the Servers section from the `Browser` on the right (if asked enter the same password again). Right click on `Databases->Create->Database...`, then enter the name you want and click `Save`.
@@ -39,7 +35,8 @@ The following steps should be executed in either the ```gameschat-with-talkjs```
39
35
40
36
- After you've cloned/downloaded the repository, open the terminal in the project's directory and write `pip install -r requirements.txt`. After the installation is done, write `python manage.py migrate`. Lastly, write `python manage.py runserver`, this will start the server on port 8000. Go ahead and write the following in your browser `http://localhost:8000`.
41
37
42
-
Good job! Additional information can be found in the [tutorial](https://talkjs.com/tutorials/article/how-to-add-direct-messaging-to-a-discussion-forum-with-django-and-talkjs/) of this application.
38
+
Good job!
43
39
44
40
## Documentation
41
+
45
42
For more information on how to integrate TalkJS into your projects, check out our [documentation](https://talkjs.com/docs/?ref=gh-example-readme).
0 commit comments