SSRCG Android Application

(Sam Connolly) #1

Hey everyone,

About The App
I made an Android application for SSRCG because I like to be able to access the forum from my home screen, and I thought I’d share the link up here. It really is the same as what you can do in the browser on your phone, but without the clunky browser UI getting in the way, and you can have an icon for it on your home screen.

To clarify, this was made by me, so if you want something fixed message me / leave a post on this thread, don’t bother messaging forum admins because they don’t have the source for this yet.

Download Link

Technical stuff
I built this in Android studio using using a webview inside an activity. It really is nothing fancy, but it works. It starts up the webview in the main activity, redirects to SSRCG, and it works. You can use the back button on your phone to come back out of a thread you’ve gone into as well.

Things I Want To Improve (Open to suggestions)
The start up time is a bit slow. This is due to JavaScript being enabled in the webview. I imagine that it is down to Chrome’s v8 engine being loaded and started up. I’m not sure what I can really do to improve this, unless the webview is always JavaScript enabled, at the moment JavaScript is enabled in the onCreate method of the main activity - but I’m not actually sure that’s possible just yet, we’ll see.

Here’s the link to prove I’m not just getting you to install h4x app onto your phone.

Help Me Make It Better
Feel free to offer some improvements or say what you’d like to see. Please tell me about bugs, I only have a Nexus 6 to test on. Also please feel free to list what device you have and if it works on it.

Also this is my first Android app, so any constructive criticism is welcome.

(Bradley Shaw) #2

How well do you know Javascript? (Not being a dick. I just don’t know you)

If you wanted a challenge you could fiddle with the Discourse API and try and make everything native using the JSON. This should allow you to ditch the Chrome engine and get things fast but is also a lot of work.

Maybe a simpler way is just to have the logo and an animation (to show your phone is doing something and isnt stuck).

On the other hand, looks awesome and runs fairly decently on my OnePlus One.

Good job bro

(Sam Connolly) #3

I’m not an expert in JavaScript, but I did used to work for a company while I was in uni for about 9 months using pretty much entirely JS, so I’m not a novice in it either.

I do like the idea of ditching the Chrome engine and using GET requests for pulling in data rather than a webview and a URL. It might have to be something I come back to in a little while when I have a bit more time though. But I think I’ll give that a go in the not so distant future, worst case scenario I’ll get some more practice in with JS.

Thank you for the feedback as well


I’m sure there’s a WebView method “setJavaScriptEnabled” that takes true/false as a parameter to enable/disable JavaScript?

Will download this and have a look about when I’m home :slight_smile:

(Sam Connolly) #5

Yeah I did try this but Discourse requires JavaScript to work, and enabling JavaScript inside WebView is quite a slow process and can only be done in the ‘onCreate’ activity, so it starts the app, then enables JS, then proceeds to show the website inside webview. Or without JS enabled it just shows an error saying “Discourse works better with JavaScript” or something to that effect, and there are no threads available to see.


Hmmm, I’ll have a look. I’ve got an Android development module at uni atm so I might come across it whilst working, if not then I’ll just ask :stuck_out_tongue:

(DayC) #7

Works really well for me on Galaxy S6 Edge, good job bro.

(Sam Connolly) #8

Good to hear :slight_smile:

On another note, the discourse API works through GET requests and returns JSON objects, so I may try that and create a bit more of a mobile interface. Got a lot going on in work at the moment so I may take a few weeks before I get around to it.

(DayC) #9

It’s just a basic restful api, it’ll take POST, DELETE and PUT requests too. Don’t forget you will have to build an interface to go in front of the requests and not all actions are available by the looks of things. People asking a year ago this month how to initiate pm’s and it was unavailable, looking through the most up to date endpoints here that still appears to be the case. There’s a lot there but bear in mind that with what you have now you have a full set of functionality wereas you may not achieve what you’re looking for with the api.

(Sam Connolly) #10

Yeah I’m going to keep looking into it. As it stands the UI isn’t particularly nice looking on the app, specifically I don’t like the look of the title bar at the top. So I’d rather build it through and through as a proper app for both performance and UI. but I’ll have a look into functionality first before I do a complete overhaul.

(Sanchez ) #11

Works on my BlackBerry Priv

(GamerNmyDna) #12

I need to test this out.