How to setup & run

1) Clone the repo

2) Open the project in Android Studio - Wait till all the processes complete

3) In the MainActivity.java -

private static final String url = "https://discuss.flarum.org/";

Edit the url to yours.

4) Do any changes to the code - Change colors, Package names, Add splash screens

5) Good to go ?

    chamath

    Have you tested this with the Github Auth extension?
    I am unable to login using Github.

    Edit:

    I removed the Title Bar as I would rather have more screen space then an permanent Title bar, I already know what forum I am running ? With that I also removed the 'settings' buttons as they had no function.. Again, just wasting screen space.

    Android Studio was easy enough to navigate, I was also able to customize the colors to match my Flarum color scheme.

    Here is what I got so far (comparing Title Bar to OP)

    Todos:

    Android Icon.
    Double back button to Exit.

    I am not much of a programmer but I would like to play it forward by creating APK files for anyone not wanting to do the compile themselves.

      Interesting. Sounds like your app have a push notification too. How did you make it work? Is it free or paid?

        I noted that as I opened an account immediately after I posted to check out. Thank you datitisev

        I also noted that the android app webview code provided is very basic and is not really an advanced version. For instance, it relies on JS / CSS / images files from the website / server instead of providing and use them from the app itself.

        I think a faster loading app would use whatever files that are possible to be added to the app itself instead of getting it from the website / server. In this page for example, forum-8451c64f.cs, forum-08315986.js, forum-en-df77f08d.js may be added to the app assets and run from it.

        To determine other/all flarum static files that can be included in the app, look into flarum source code or ask flarum developer.

        chamath this is good, does it use google chromeview ? i was considering building one in crosswalk as to support file uploads on android 4.4 kitkat which isn't supported in webview.

          @chamath after further testing it seems versions below 4.4.4 don't work so 4.4.1/4.4.2/4.4.3 kitkat versions do not have file upload support. Apart the overall functionality seems solid.

          Functions to add I would suggest a reload btn or swipetorefresh, and an offline screen for no connection available.

            witech Thanks for the testing. above KitKat means a lot of market share ? ..
            Lets do some updates soon ?

              This will be one of many reasons why I chosen flarum software, thank you for making it available as an open source! keep up the great work guys. Bookmarked!

              punit2502
              To add your code that fixed the issue. You did not share or explain what you did to resolve the issue.

              Was it by altering OP source code or by some other means?

                0E800 By Adding the following code:

                webView.setWebViewClient(new WebViewClient() {
                	@Override
                	public void onPageStarted(WebView view, String url, Bitmap favicon) {
                		mPbar.setVisibility(View.VISIBLE);
                	}
                
                public void onPageFinished(WebView view, String url) {
                	mPbar.setVisibility(View.GONE);
                }
                
                @SuppressWarnings("deprecation")
                @Override
                public boolean shouldOverrideUrlLoading(WebView view, String url) {
                	if (!url.contains("whatsapp://")) {
                	    Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
                	    startActivity(browserIntent);
                
                	    return true;
                	    }
                
                	return super.shouldOverrideUrlLoading(view, url);
                	}
                
                });