0E800 http://blog.nkdroidsolutions.com/android-facebook-login-example-v4/

Currently trying to apply this method. Hopefully this will detect when Facebook login button is pressed and work as intended.

For now you can do this:
Under onPageStarted add:
if (url.startsWith("https://m.facebook.com/dialog/oauth?") {
webView.loadUrl("http://aPageinYourWebsiteThatSaysSorryFacebook/GithubLoginIsn'tAvailableOnAndroidApp");
}

This way on page loads it will check if the page is a Facebook login page, (also add www. option along with m.) and if it's it will redirect the user to a static page on your flarum stating that this feature isn't currently available.

Ninja Edit: I've found my own solution on GitHub: github link

Try this but replace simple m.facebook.com links with m.facebook.com/dialog/oauth? this way users will be able to browse normal Facebook links. Only Facebook login links will be redirected to your Flarum. I've also included a screenshot as an example. (About how it looks.)

This way you don't give up on popup logins. Meanwhile, you can try to achieve the one that I posted at the top. Good luck!

If any you have any extra questions, do ask.

Ultimate ninja edit (included screenshot also here):
image for the lazy

Legend27 level ninja edit: https://github.com/dumanpro/Android-App-for-Flarum?files=1 check out my code if you want to add swipe down to reload function. (which is an essential, in my opinion.) Also there's a small but smart boolean magic to disable mid screen loading indicator, don't miss it.

    0E800 yep. Webview is a pain. However the thing I posted may solve the problem. Meanwhile you can use the "Sorry not available" method and keep using them.

    15 days later

    so this basically just including firebase without do push notification when user mention to other user? or other things?
    user engagement is the key for this push notification to works. not all user/people setup their email in its phone.

    thanks

    @mgilang Someone with extensive Firebase experience might be able to show how to add that.

    The issue is that this android app just emulates your flarum website in an android window.
    Its not a native android app.

    Someone would need to find a way to replace / migrate the current mysql authentication with a firebase authentication. There is some documentation online about how to do this but its way over my current dev abilities.

    Ref:
    http://marcelpociot.de/blog/2016-06-20-synchronise-laravel-eloquent-models-with-firebase
    https://github.com/mpociot/laravel-firebase-sync
    https://stackoverflow.com/questions/38425743/migrate-mysql-to-firebase
    https://db-engines.com/en/system/Firebase+Realtime+Database%3BMySQL%3BSQLite

      0E800
      yes i hear this also from my dev friend.
      other way is flarum need to release the stable API to make the native android app possible.

      thanks

      0E800 love seeing Marcel Pociot linked here, I've worked with his package before but don't understand why that package would help here. Also for Marcel's package to work we'd need to be on an illuminate version that supports scout, Flarum is stuck at 5.1 at this point.

      Could you explain what is necessary to make firebase authentication work? Feel free to create a separate thread about this and link back?

        luceos no need to replace authentication.. but will need to store firebase tokens for each user in db (array or seperate table). already halfway through on that.

        Why are you guys not looking into Onesignal?
        It's seems a better option.
        Cost effective too!

        a month later
        12 days later

        where is the problem?

        i got error:

         
        Information:Gradle tasks [:app:generateDebugSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies, :app:generateDebugAndroidTestSources, :app:compileDebugSources, :app:compileDebugUnitTestSources, :app:compileDebugAndroidTestSources]
        C:\Users\Sanver\Desktop\flarum-mobile-android-master\app\src\main\java\org\flarum\flarum\FCM\MyFirebaseMessagingService.java
        Error:(15, 25) error: cannot find symbol class R
        Error:(50, 32) error: package R does not exist
        Error:(49, 94) error: package R does not exist
        C:\Users\Sanver\Desktop\flarum-mobile-android-master\app\src\main\java\org\flarum\flarum\MainActivity.java
        Error:(34, 25) error: package R does not exist
        Error:(35, 51) error: package R does not exist
        Error:(38, 45) error: package R does not exist
        Error:(40, 51) error: package R does not exist
        Error:(100, 36) error: package R does not exist
        Error:(112, 20) error: package R does not exist
        Error:(119, 27) error: package R does not exist
        Error:Execution failed for task ':app:compileDebugJavaWithJavac'.
        Compilation failed; see the compiler error output for details.
        Information:BUILD FAILED
        Information:Total time: 2.676 secs
        Information:11 errors
        Information:0 warnings
        Information:See complete output in console
        

        Edit: actually i bypass the problem with make the name of package name "org.flarum.flarum" on developers.google.

          Felli yeap, after that i changed the package_name , just after that i got this error above.

          You also changed the file folders as well right?

            When you download the open source project go into the files org / flarum / flarum then change them to fit your website domain, then using Android Studios or any coding editor with a Java extension, and search the whole project for code referring to org.flarum.flarum and change it to fit the folders you just changed, once that is done using Android Studios you should be able to create either a debug.apk or release.apk.