Discourse as Android Application

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?

http://revolucionar.com/uploads/default/_optimized/551/d0d/5c8d6eafb3_300x500.png

http://revolucionar.com/uploads/default/_optimized/3f5/8a2/34adb994cb_300x500.png


Test it here:

http://revolucionar.com/uploads/default/466/d0a2976b423a6d01.png

6 Likes

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.

3 Likes

You can use API to read notification.

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.

2 Likes

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:

7 Likes

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)

10 Likes

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: https://developer.android.com/google/gcm/index.html

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

2 Likes

This is FANTASTIC

How can I make one for me?

1 Like

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.

1 Like

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?

https://meta.discourse.org/t/why-is-discourse-so-slow-on-android/8823/

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

2 Likes

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:

2 Likes

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:

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:

1 Like

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.

5 Likes

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:

1 Like

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.

4 Likes

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