Skip to content

wip(android): add Android SDK and FlexHybridApp-Android #25

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 3, 2025

Conversation

KevinGrafstrom
Copy link
Collaborator

ChatKitty's Chat UI should be easily usable in other people's Android apps. To make it easier, we are making an Android library so that other developers can simply add the Chat UI component to their app. This pull request adds an Android Studio project which contains the Android Chat UI component. This pull request also adds the FlexHybridApp-Android library since its repository has not been updated in years. For that reason, we want to include it in our repository so that we can maintain it. FlexHybridApp-Android is a library which allows for communication between a Web View and the native Android device. It is used in the Android Chat UI component to deliver notifications from the Phoenix app in the Web View to the Android device.

Copy link
Member

@aerovulpe aerovulpe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@KevinGrafstrom let's separate the example from the library project and move it into example.

}

android {
namespace = "com.chatkitty.chatkittyui"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's change the namespace (including subpackages) from com.chatkitty.chatkittyui to com.chatkitty.ui.

}

defaultConfig {
applicationId = "com.chatkitty.chatkittyui"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

android:name=".MainActivity"
android:exported="true"
android:label="@string/app_name"
android:theme="@style/Theme.ChatKittyUI">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's rename the theme to ChatUi

@@ -0,0 +1,62 @@
package com.chatkitty.chatkittyui
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be under examples/android

@@ -0,0 +1,3 @@
<resources>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"ChatUi Example"

publishing {
publications {
create<MavenPublication>("mavenJava") {
groupId = "com.chatkitty.uie"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uie -> ui


override fun <T : Any> onMessage(id: String?, type: FlexStompXEventType, payload: T) {
flexWebView.evalFlexFunc("onMessage", messageToBase64(FlexStompXMessage(id, type.value, payload)))
Log.i("gnw", "onMessage finished with a payload: ${payload}")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's remove these logs.

} else {
"standalone"
}
val connection = "shared"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert this

@aerovulpe aerovulpe merged commit 2d4b5b3 into main Apr 3, 2025
@aerovulpe aerovulpe deleted the fix-android-sdk branch April 3, 2025 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants