Automate sending an IRC message on Android
September 7, 2016 1:43 AM   Subscribe

I want to put a button on my (Android) phone that, when pressed, logs into an IRC channel and sends a pre-defined /msg to a user there. How can I do this?

In a perfect world, it'd be a widget that sits on the home screen that I can configure once (server, channel, username and password) and then just press when I needed it. But e.g. an actual app with a big, friendly button would be fine too. For bonus points, being distributable as a standalone file (as opposed to, say, a Tasker script which also requires Tasker to be installed) would be handy.

This is intended as part of a system we're making in our hackspace, so it doesn't need to be particularly polished; it's a small number of users who understand that it's just a hobby project.

I know a bit of C++ and a tiny bit of Python. I find the Tasker scripting language weird, but might be able to muddle through if an IRC plugin exists that I've missed in my searching.

I started looking at Android Studio, whose tutorials want me to learn best practices for building much more complex apps. Fair enough, but I'd rather not spend hours learning stuff that, for the moment, is far beyond the scope of what I need.

I think that Processing lets you compile sketches to run on Android, which might be useful, particularly if I can find a decent library, or reasonably well-commented example code. Does anyone have a sense for how easy it generally is to adapt Processing scripts to compile for Android?

So: Does anyone have advice on the best route for an amateur programmer to make a very simple app along those lines?
posted by metaBugs to Computers & Internet (2 answers total)
 
It should be quite easy to find a guide online for writing a python function to send a message to a user via irc. Searching python irc gives loads of results(I launched a python irc bot for a channel I mod last week).

The android/gui side is a little harder, I had a ton of success using Kivy to make simple UIs (I did a drawing app for an fpga videowall for the hackerspace).

I didn't build out the drawing app for android, but only because I only have FreeBSD machines and no linux boxes around. I looked at the android workflow and it seemed really straight forward.
posted by adventureloop at 4:38 AM on September 7, 2016


Quick google suggests https://play.google.com/store/apps/details?id=com.idlegandalf.httprequestwidget&hl=en_GB which allows you to create a widget that performs an http request when tapped.

Then you need the python function that performs the IRC event in response to the http request. Should be doable from tutorials.
posted by Leon at 6:19 AM on September 7, 2016


« Older How to send two e-invitations to the same event?   |   Is my boyfriend cheating? Newer »
This thread is closed to new comments.