MessengerBot
  • Overview
  • API1
    • 작성 예정입니다.
  • API2
    • App
    • Bot
    • BotManager
    • Broadcast
    • Database
    • Event
    • Http
    • SessionManager
    • Security
  • 팁
    • ADB를 사용할 때
    • 소켓 통신
Powered by GitBook
On this page

Was this helpful?

  1. API2

SessionManager

PreviousHttpNextSecurity

Last updated 4 years ago

Was this helpful?

SessionManager는 의 리스너에 전달되는 인자로, 채팅방 세션을 메신저봇 앱에 수동으로 등록할 수 있게 해주어 메신저봇이 공식적으로 지원하지 않는 메신저 앱을 사용할 때 활용할 수 있습니다.

Public methods

Boolean

bindSession(packageName: String, room: String, action: Notification.Action = null)

packageName이라는 메신저 앱의 room채팅방에 대해 메시지 전송 액션인 action을 할당합니다.

이렇게 하면 , 등을 사용할 수 있게 됩니다.

action이 null일 경우 메신저봇이 자동 분석한 답장 액션을 사용합니다.

action이 null이고, 메신저봇이 자동 분석한 답장 액션 또한 null일 경우 false를 반환하며, 그 외에는 true를 반환합니다.

Boolean

bindSession(room: String, action: Notification.Action = null)

위 메서드와 동작 방식은 같지만, packageName을 메신저봇이 자동 분석합니다.

Event.NOTIFICATION_POSTED
Bot#send
msg#reply