Discourse as Android Application

(Tomo Vukasović) #1

Continuing the discussion from What can Discourse learn from Slack?:

@BCHK was extremely enthusiastic about discourse app so I mentioned it to my friend. In half an hour he created application just for him :smile:

It loads browser with discourse in it with all basic android functions. It has no connection with android through the notification system, but it lets you use Discourse as app. If you have an idea how to connect notifications please share. Google Cloud Messaging?



Test it here:



Decoded URL: http://goo.gl/NQjHw3

Tried it on my S3. Doesn’t run bad, but it’s just that, a down-sized browser. No native app feeling at all.

(Khoa Nguyen) #3

You can use API to read notification.

(Tomo Vukasović) #4

It is just that, app for all browser haters :smile:

Please don’t take this seriously. As I said it was build in 30 minutes. Discourse runs like app in browser. I am not sure why there is need for more :question:

@thangngoc89 Will look into it. If its possible with too much headache I see no reason why not.


That is not the way to go. Server polling drains phone battery, because the application (or it’s service) must always be running in memory (now imagine 10 such services polling servers 24/7). Discourse should notify application instead of application checking Discourse every now and then. Google Cloud Messaging sounds like it’s made for that, so 3rd party servers can notify application users through Google servers.

Yep, it’s nothing but that. But it isn’t meant to be anything but that (at least for now). This is just a proof of concept and will most likely be used only by myself as I don’t have a habit to use browser on my phone (I prefer applications).

Of course no one will use an application for each forum they visit, but I don’t see any harm providing even an application like this. Listing it on Google Play store may only bring new visitors to your forum :slight_smile:

(Sam Saffron) #6

The correct solution is a plugin that “pushes” notifications to google cloud, it is doable but not trivial. Perhaps long term we should add all sorts of web hooks. (eg. this endpoint is called when condition X is met)

(Khoa Nguyen) #7

Take a look at this.
I have some solutions for push notification


Something like that would be awesome! If anyone is interested in implementing this, here’s where they should start: Google Cloud Messaging: Overview  |  Cloud Messaging  |  Google Developers

Unfortunately I have zero experience with Ruby and almost none with Discourse :frowning:



How can I make one for me?

(Bcguy) #10

I’m going to be hiring a developer to write an Android app for me - that will make my discussion forum accessible from an app. I’m also interested in working from an implementation that has already been created - as I know that a number of different people on the META forum have mentioned that they’ve developed an Android Discourse APP (and IOS app) already - but they don’t seem to be supported or maintained at any reasonable level and currently don’t seem to work.

My quick estimate from one developer was $10K for a professionally done new implementation.

I’m thinking that I’ll probably go fully Native Android - not WebView - which is more of a hassle technically since Discourse doesn’t really have a firm/fully documented and supported REST API.

My solution will be that I’ll have to freeze my Discourse server code at a given release level - and then do independent compatibility testing on a different server before I upgrade my production Discourse server.

Because this investment is coming out of my own pocket - unfortunately I won’t be able to share the code freely with the community. But - if a few other people want to kick in a few thousand dollars towards the development effort (of course I’m also open to ongoing input regarding design considerations) - I would be willing to sublicense the App code to those few other people who want to put some significant money up towards the app.

(Bcguy) #11

Folks - can someone comment on this?

It seems like a Native application that works via the REST API is going to be much faster than the Mobile Web implementation on Android - is that corrrect, from your understanding of the Android Browser issue?

(Khoa Nguyen) #12

Yes. A native application is much better than web browser.

(Michael Downey) #13

Interesting logic. I think a lot of software projects have found otherwise (especially with respect to maintenance and sustainable growth) which is why you see things like .NET becoming open source despite the investments of the projects’ progenitors.

I hope the investment pays off for you; it will be interesting to see how your project goes. I’m not sure you’ll find a lot of sub-licencees for a proprietary interface to an open source webapp, but it could work.

Good luck! :smiley:


Works for Reddit / Mobile reddit clients, I guess. But yeah, Discourse is really really small in comparison still.


That sounds interesting and optimistic, given the fact that, as you said: “Discourse doesn’t really have a firm/fully documented and supported REST API”.

With a bit of Java/Android knowledge anyone can do it easily :slight_smile: but as mentioned before, this is just a web browser packed in an application. It’s fine for me though :smiley:

(Bcguy) #16

Well - it sounds like the REST API might be usable - but we’ll see how optimistic it is. You can read the responses on this topic from the Discourse Team here:

(Jeff Atwood) #17

There is some movement on the underlying Chrome/Android V8 bugs that cause the 3x-5x perf penalty, and the Ember.js team is also looking at it in some detail for future versions. I’m optimistic a year from now the picture will be more in line with iOS perf which is amazing, near-desktop.

But yes, the native app is most defensible on Android today, particularly if you have an older device (2012 or earlier).

The problem is that the functionality will diverge as we build more features into the webapp that are not reflected in the forked native version. There’s already one legacy Android Discourse app out there in the play store and I’m not sure it even works today? But to be fair that was developed about a year ago before we even hit V1.

(Michael Downey) #18

The obvious solution to that divergence problem is making such an Android app open source, in hopes that the Discourse community can rally around making one great client code base, and keep it more or less up to date. Unfortunately it sounds like so far no one is interested in doing the right thing. :wink:

(Jeff Atwood) #19

It’d still be two totally different code bases, one in Java, one in Ruby/JavaScript. The only thing they would have in common is the API calls. It is a massive effort. If we had millions in funding, sure, we could perhaps hire a few devs and have them go at it.

Wood needs to go behind one arrowhead.

(Michael Downey) #20

Agreed; which is all the more rationale for a community volunteer-maintained app, if one exists at all. :wink: