pschroen / slack-api-android Goto Github PK
View Code? Open in Web Editor NEWAndroid client for the Slack Web API, Incoming Webhooks, Slackbot Remote Control and RTM (Real Time Messaging) API
License: MIT License
Android client for the Slack Web API, Incoming Webhooks, Slackbot Remote Control and RTM (Real Time Messaging) API
License: MIT License
Hi,
I am trying to post a message in the SlackBot using the postMessage(Im_Id,message,"slackbot",false) but I am getting the following warning.
{"ok":true,"channel":"D4Y1VP0G0","ts":"1501758978.758433","message":{"text":"hi","username":"slackbot","bot_id":"B5029JKK3","type":"message","subtype":"bot_message","ts":"1501758978.758433"},"warning":"superfluous_charset","response_metadata":{"warnings":["superfluous_charset"]}}
channel is the IM id of slackbot
let me if i have to use meMessage or postMessage to send the message in the slackbot.
hi, i receive "unexpected url " in my first try to integrate this library. where im wrong?
in response i see that "url" param is missing
SlackRealTimeMessagingClient realTimeMessagingClient = SlackClientFactory.createSlackRealTimeMessagingClient("xoxp-217261672642-217189604291-216729492609-b6760556b73e6bc61240f540e941f7d5");
realTimeMessagingClient.connect();
I/zygote64: Late-enabling -Xcheck:jni
W/Java7Support: Unable to load JDK7 types (annotations, java.nio.file.Path): no Java7 support added
D/OpenGLRenderer: HWUI GL Pipeline
I/Adreno: QUALCOMM build : 7142022, Ib5823dd10c
Build Date : 06/23/17
OpenGL ES Shader Compiler Version: EV031.18.00.00
Local Branch : O11A
Remote Branch :
Remote Branch :
Reconstruct Branch :
I/vndksupport: sphal namespace is not configured for this process. Loading /vendor/lib64/hw/gralloc.msm8994.so from the current namespace instead.
D/NetworkSecurityConfig: No Network Security Config specified, using platform default
I/Adreno: PFP: 0x00000000, ME: 0x00000000
I/OpenGLRenderer: Initialized EGL, version 1.4
D/OpenGLRenderer: Swap behavior 2
I/SlackClient: url : https://slack.com/api/rtm.start
I/vndksupport: sphal namespace is not configured for this process. Loading /vendor/lib64/hw/gralloc.msm8994.so from the current namespace instead.
W/View: dispatchProvideAutofillStructure(): not laid out, ignoring
W/View: dispatchProvideAutofillStructure(): not laid out, ignoring
I/AssistStructure: Flattened final assist data: 3056 bytes, containing 1 windows, 10 views
W/IInputConnectionWrapper: beginBatchEdit on inactive InputConnection
W/IInputConnectionWrapper: getTextBeforeCursor on inactive InputConnection
W/IInputConnectionWrapper: getTextAfterCursor on inactive InputConnection
W/IInputConnectionWrapper: getSelectedText on inactive InputConnection
W/IInputConnectionWrapper: endBatchEdit on inactive InputConnection
W/IInputConnectionWrapper: getExtractedText on inactive InputConnection
I/zygote64: Do partial code cache collection, code=28KB, data=29KB
I/zygote64: After code cache collection, code=28KB, data=29KB
I/zygote64: Increasing code cache capacity to 128KB
I/SlackClient: return : {"ok":true,"self":{"id":"U6D5KHS8K","name":"xan","prefs":{"user_colors":"","color_names_in_list":true,"tz":"Europe\/Amsterdam","email_alerts":"instant","email_alerts_sleep_until":0,"email_misc":false,"email_weekly":true,"welcome_message_hidden":false,"search_sort":"timestamp","expand_inline_imgs":true,"expand_internal_inline_imgs":true,"expand_snippets":false,"posts_formatting_guide":true,"seen_welcome_2":true,"seen_ssb_prompt":false,"spaces_new_xp_banner_dismissed":false,"search_only_my_channels":false,"search_only_current_team":false,"emoji_mode":"default","emoji_use":"","has_invited":false,"has_uploaded":false,"has_created_channel":false,"has_searched":false,"search_exclude_channels":"","messages_theme":"default","webapp_spellcheck":true,"no_joined_overlays":false,"no_created_overlays":false,"dropbox_enabled":false,"seen_domain_invite_reminder":false,"seen_member_invite_reminder":false,"mute_sounds":false,"arrow_history":false,"tab_ui_return_selects":true,"obey_inline_img_limit":true,"require_at":false,"ssb_space_window":"","mac_ssb_bounce":"","mac_ssb_bullet":true,"expand_non_media_attachments":true,"show_typing":true,"pagekeys_handled":true,"last_snippet_type":"","display_real_names_override":0,"display_display_names":true,"time24":false,"enter_is_special_in_tbt":false,"graphic_emoticons":false,"convert_emoticons":true,"ss_emojis":true,"seen_onboarding_start":true,"onboarding_cancelled":true,"seen_onboarding_slackbot_conversation":true,"seen_onboarding_channels":false,"seen_onboarding_direct_messages":false,"seen_onboarding_invites":false,"seen_onboarding_search":false,"seen_onboarding_recent_mentions":false,"seen_onboarding_starred_items":false,"seen_onboarding_private_groups":false,"onboarding_slackbot_conversation_step":10,"dnd_enabled":true,"dnd_start_hour":"22:00","dnd_end_hour":"8:00","sidebar_behavior":"","channel_sort":"default","separate_private_channels":false,"separate_shared_channels":true,"sidebar_theme":"default","sidebar_theme_custom_values":"","no_invites_widget_in_sidebar":false,"no_omnibox_in_channels":false,"k_key_omnibox_auto_hide_count":0,"use_react_sidebar":false,"mark_msgs_read_immediately":true,"start_scroll_at_oldest":true,"snippet_editor_wrap_long_lines":false,"ls_disabled":false,"f_key_search":false,"k_key_omnibox":true,"prompted_for_email_disabling":false,"full_text_extracts":false,"no_macelectron_banner":false,"no_macssb1_banner":false,"no_macssb2_banner":false,"no_winssb1_banner":false,"prev_next_btn":false,"hide_user_group_info_pane":false,"mentions_exclude_at_user_groups":false,"privacy_policy_seen":true,"enterprise_migration_seen":true,"last_tos_acknowledged":"tos_oct2016","search_exclude_bots":false,"load_lato_2":false,"fuller_timestamps":false,"last_seen_at_channel_warning":0,"msg_preview":false,"msg_preview_persistent":true,"emoji_autocomplete_big":false,"winssb_run_from_tray":true,"winssb_window_flash_behavior":"idle","two_factor_auth_enabled":false,"two_factor_type":null,"two_factor_backup_type":null,"hide_hex_swatch":false,"show_jumper_scores":false,"allow_calls_to_set_current_status":true,"enterprise_mdm_custom_msg":"","client_logs_pri":"","enhanced_debugging":false,"flannel_server_pool":"random","mentions_exclude_at_channels":true,"confirm_clear_all_unreads":true,"confirm_user_marked_away":true,"box_enabled":false,"seen_single_emoji_msg":false,"confirm_sh_call_start":true,"preferred_skin_tone":"","show_all_skin_tones":false,"whats_new_read":1500977660,"frecency_jumper":"","frecency_ent_jumper":"","jumbomoji":true,"newxp_seen_last_message":0,"show_memory_instrument":false,"enable_unread_view":false,"seen_unread_view_coachmark":false,"seen_calls_video_beta_coachmark":false,"seen_calls_video_ga_coachmark":false,"seen_calls_ss_main_coachmark":false,"seen_calls_ss_window_coachmark":false,"measure_css_usage":false,"enable_react_emoji_picker":true,"seen_replies_coachmark":false,"seen_custom_status_badge":false,"seen_custom_status_callout":false,"seen_guest_admin_slackbot_announcement":false,"seen_threads_notification_banner":false,"
I/SlackRtmClient: Slack RTM closing...
I/SlackRtmClient: Slack RTM closed.
E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #1
Process: com.zerounotribe.numina.dashboard.alice, PID: 21626
java.lang.RuntimeException: An error occurred while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:353)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:383)
at java.util.concurrent.FutureTask.setException(FutureTask.java:252)
at java.util.concurrent.FutureTask.run(FutureTask.java:271)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
Caused by: allbegray.slack.exception.SlackException: java.lang.IllegalArgumentException: unexpected url:
at allbegray.slack.rtm.SlackRealTimeMessagingClient.connect(SlackRealTimeMessagingClient.java:185)
at com.zerounotribe.numina.dashboard.activity.SplashActivity$1.doInBackground(SplashActivity.java:65)
at com.zerounotribe.numina.dashboard.activity.SplashActivity$1.doInBackground(SplashActivity.java:59)
at android.os.AsyncTask$2.call(AsyncTask.java:333)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
Caused by: java.lang.IllegalArgumentException: unexpected url:
at okhttp3.Request$Builder.url(Request.java:143)
at allbegray.slack.rtm.SlackRealTimeMessagingClient.connect(SlackRealTimeMessagingClient.java:116)
at com.zerounotribe.numina.dashboard.activity.SplashActivity$1.doInBackground(SplashActivity.java:65)
at com.zerounotribe.numina.dashboard.activity.SplashActivity$1.doInBackground(SplashActivity.java:59)
at android.os.AsyncTask$2.call(AsyncTask.java:333)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
I/Process: Sending signal. PID: 21626 SIG: 9
Please add these fields in class Bot.getInfo
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.