├── settings.gradle
├── app
├── src
│ ├── main
│ │ ├── ic_launcher-web.png
│ │ ├── ic_launcher-playstore.png
│ │ ├── res
│ │ │ ├── mipmap-hdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ ├── ic_launcher_round.png
│ │ │ │ └── ic_launcher_foreground.png
│ │ │ ├── mipmap-mdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ ├── ic_launcher_round.png
│ │ │ │ └── ic_launcher_foreground.png
│ │ │ ├── mipmap-xhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ ├── ic_launcher_round.png
│ │ │ │ └── ic_launcher_foreground.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ ├── ic_launcher_round.png
│ │ │ │ └── ic_launcher_foreground.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ ├── ic_launcher_round.png
│ │ │ │ └── ic_launcher_foreground.png
│ │ │ ├── values
│ │ │ │ ├── ic_launcher_background.xml
│ │ │ │ ├── colors.xml
│ │ │ │ ├── strings.xml
│ │ │ │ └── styles.xml
│ │ │ ├── mipmap-anydpi-v26
│ │ │ │ ├── ic_launcher.xml
│ │ │ │ └── ic_launcher_round.xml
│ │ │ ├── layout
│ │ │ │ ├── error.xml
│ │ │ │ └── activity_main.xml
│ │ │ ├── drawable-v24
│ │ │ │ └── ic_launcher_foreground.xml
│ │ │ └── drawable
│ │ │ │ └── ic_launcher_background.xml
│ │ ├── AndroidManifest.xml
│ │ └── java
│ │ │ └── com
│ │ │ └── hhilan
│ │ │ └── flarum
│ │ │ └── MainActivity.java
│ ├── test
│ │ └── java
│ │ │ └── com
│ │ │ └── hhilan
│ │ │ └── flarum
│ │ │ └── ExampleUnitTest.java
│ └── androidTest
│ │ └── java
│ │ └── com
│ │ └── hhilan
│ │ └── flarum
│ │ └── ExampleInstrumentedTest.java
├── proguard-rules.pro
└── build.gradle
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradle.properties
├── .github
└── FUNDING.yml
├── LICENSE
├── gradlew.bat
├── gradlew
└── README.md
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------
/app/src/main/ic_launcher-web.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aurorum-Studio/flarum-app/HEAD/app/src/main/ic_launcher-web.png
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aurorum-Studio/flarum-app/HEAD/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/app/src/main/ic_launcher-playstore.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aurorum-Studio/flarum-app/HEAD/app/src/main/ic_launcher-playstore.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aurorum-Studio/flarum-app/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aurorum-Studio/flarum-app/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aurorum-Studio/flarum-app/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aurorum-Studio/flarum-app/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aurorum-Studio/flarum-app/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aurorum-Studio/flarum-app/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aurorum-Studio/flarum-app/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aurorum-Studio/flarum-app/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aurorum-Studio/flarum-app/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aurorum-Studio/flarum-app/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aurorum-Studio/flarum-app/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aurorum-Studio/flarum-app/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aurorum-Studio/flarum-app/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aurorum-Studio/flarum-app/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aurorum-Studio/flarum-app/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/main/res/values/ic_launcher_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #D0D5D0
4 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Tue Feb 19 09:43:02 WAT 2019
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip
7 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | My Flarum
3 | Error occured, please check your internet connecion.
4 | SSL Error! Give Permission
5 | Do you want to exit this application?
6 |
7 |
--------------------------------------------------------------------------------
/app/src/test/java/com/hhilan/flarum/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.hhilan.flarum;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 | # IDE (e.g. Android Studio) users:
3 | # Gradle settings configured through the IDE *will override*
4 | # any settings specified in this file.
5 | # For more details on how to configure your build environment visit
6 | # http://www.gradle.org/docs/current/userguide/build_environment.html
7 | # Specifies the JVM arguments used for the daemon process.
8 | # The setting is particularly useful for tweaking memory settings.
9 | org.gradle.jvmargs=-Xmx1536m
10 | # When configured, Gradle will run in incubating parallel mode.
11 | # This option should only be used with decoupled projects. More details, visit
12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
13 | # org.gradle.parallel=true
14 |
--------------------------------------------------------------------------------
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | # These are supported funding model platforms
2 |
3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4 | patreon: # Replace with a single Patreon username
5 | open_collective: # Replace with a single Open Collective username
6 | ko_fi: # Replace with a single Ko-fi username
7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9 | liberapay: # Replace with a single Liberapay username
10 | issuehunt: # Replace with a single IssueHunt username
11 | otechie: # Replace with a single Otechie username
12 | lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
13 | custom: ['https://paypal.me/hhilan']
14 |
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/app/src/androidTest/java/com/hhilan/flarum/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.hhilan.flarum;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumented test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("com.myexampoint.webtoapp", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
12 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/error.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
18 |
19 |
31 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
21 |
22 |
30 |
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 27
5 | defaultConfig {
6 | applicationId "com.hhilan.openapp"
7 | minSdkVersion 15
8 | targetSdkVersion 27
9 | versionCode 1
10 | versionName "1.0"
11 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
12 | }
13 | //Successtar Edit
14 | lintOptions {
15 | checkReleaseBuilds false
16 | // Or, if you prefer, you can continue to check for errors in release builds,
17 | // but continue the build even when errors are found:
18 | abortOnError false
19 | }
20 |
21 | buildTypes {
22 | release {
23 | minifyEnabled false
24 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
25 | }
26 | }
27 | }
28 |
29 | dependencies {
30 | implementation fileTree(dir: 'libs', include: ['*.jar'])
31 | implementation 'com.android.support:appcompat-v7:27.0.2'
32 | implementation 'com.android.support.constraint:constraint-layout:1.0.2'
33 | testImplementation 'junit:junit:4.12'
34 | androidTestImplementation 'com.android.support.test:runner:1.0.1'
35 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
36 | }
37 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Aurorum License
2 |
3 | The Lisense is Edited from MIT Lisense.
4 |
5 | Copyright (c) 2023 Aurorum.co, Shichen Wanyan.
6 |
7 | Attention:
8 | THIS LICENSE IS DIFFERRENT FROM THE ORIGINAL MIT LICENSE, IT DOESN'T ALLOW YOU TO:
9 | 1. Sell copies of the Software
10 | 2. Sublicense without this license included
11 | 3. Use, publish and distribute without giving credit to the original project.
12 |
13 | Permission is hereby granted, free of charge, to any person obtaining a copy
14 | of this software and associated documentation files (the "Software"), to deal
15 | in the Software without restriction, including without limitation the rights
16 | to copy, modify, merge, and to permit persons to whom the Software is
17 | furnished to do so, subject to the following conditions:
18 |
19 | The above copyright notice and this permission notice shall be included in all
20 | copies or substantial portions of the Software.
21 |
22 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28 | SOFTWARE.
29 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-v24/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
1 |
7 |
12 |
13 |
19 |
22 |
25 |
26 |
27 |
28 |
34 |
35 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | set DIRNAME=%~dp0
12 | if "%DIRNAME%" == "" set DIRNAME=.
13 | set APP_BASE_NAME=%~n0
14 | set APP_HOME=%DIRNAME%
15 |
16 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
17 | set DEFAULT_JVM_OPTS=
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windows variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 |
53 | :win9xME_args
54 | @rem Slurp the command line arguments.
55 | set CMD_LINE_ARGS=
56 | set _SKIP=2
57 |
58 | :win9xME_args_slurp
59 | if "x%~1" == "x" goto execute
60 |
61 | set CMD_LINE_ARGS=%*
62 |
63 | :execute
64 | @rem Setup the command line
65 |
66 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
67 |
68 | @rem Execute Gradle
69 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
70 |
71 | :end
72 | @rem End local scope for the variables with windows NT shell
73 | if "%ERRORLEVEL%"=="0" goto mainEnd
74 |
75 | :fail
76 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
77 | rem the _cmd.exe /c_ return code!
78 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
79 | exit /b 1
80 |
81 | :mainEnd
82 | if "%OS%"=="Windows_NT" endlocal
83 |
84 | :omega
85 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_launcher_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
10 |
12 |
14 |
16 |
18 |
20 |
22 |
24 |
26 |
28 |
30 |
32 |
34 |
36 |
38 |
40 |
42 |
44 |
46 |
48 |
50 |
52 |
54 |
56 |
58 |
60 |
62 |
64 |
66 |
68 |
70 |
72 |
74 |
75 |
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Attempt to set APP_HOME
10 | # Resolve links: $0 may be a link
11 | PRG="$0"
12 | # Need this for relative symlinks.
13 | while [ -h "$PRG" ] ; do
14 | ls=`ls -ld "$PRG"`
15 | link=`expr "$ls" : '.*-> \(.*\)$'`
16 | if expr "$link" : '/.*' > /dev/null; then
17 | PRG="$link"
18 | else
19 | PRG=`dirname "$PRG"`"/$link"
20 | fi
21 | done
22 | SAVED="`pwd`"
23 | cd "`dirname \"$PRG\"`/" >/dev/null
24 | APP_HOME="`pwd -P`"
25 | cd "$SAVED" >/dev/null
26 |
27 | APP_NAME="Gradle"
28 | APP_BASE_NAME=`basename "$0"`
29 |
30 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
31 | DEFAULT_JVM_OPTS=""
32 |
33 | # Use the maximum available, or set MAX_FD != -1 to use that value.
34 | MAX_FD="maximum"
35 |
36 | warn () {
37 | echo "$*"
38 | }
39 |
40 | die () {
41 | echo
42 | echo "$*"
43 | echo
44 | exit 1
45 | }
46 |
47 | # OS specific support (must be 'true' or 'false').
48 | cygwin=false
49 | msys=false
50 | darwin=false
51 | nonstop=false
52 | case "`uname`" in
53 | CYGWIN* )
54 | cygwin=true
55 | ;;
56 | Darwin* )
57 | darwin=true
58 | ;;
59 | MINGW* )
60 | msys=true
61 | ;;
62 | NONSTOP* )
63 | nonstop=true
64 | ;;
65 | esac
66 |
67 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
68 |
69 | # Determine the Java command to use to start the JVM.
70 | if [ -n "$JAVA_HOME" ] ; then
71 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
72 | # IBM's JDK on AIX uses strange locations for the executables
73 | JAVACMD="$JAVA_HOME/jre/sh/java"
74 | else
75 | JAVACMD="$JAVA_HOME/bin/java"
76 | fi
77 | if [ ! -x "$JAVACMD" ] ; then
78 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
79 |
80 | Please set the JAVA_HOME variable in your environment to match the
81 | location of your Java installation."
82 | fi
83 | else
84 | JAVACMD="java"
85 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
86 |
87 | Please set the JAVA_HOME variable in your environment to match the
88 | location of your Java installation."
89 | fi
90 |
91 | # Increase the maximum file descriptors if we can.
92 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
93 | MAX_FD_LIMIT=`ulimit -H -n`
94 | if [ $? -eq 0 ] ; then
95 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
96 | MAX_FD="$MAX_FD_LIMIT"
97 | fi
98 | ulimit -n $MAX_FD
99 | if [ $? -ne 0 ] ; then
100 | warn "Could not set maximum file descriptor limit: $MAX_FD"
101 | fi
102 | else
103 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
104 | fi
105 | fi
106 |
107 | # For Darwin, add options to specify how the application appears in the dock
108 | if $darwin; then
109 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
110 | fi
111 |
112 | # For Cygwin, switch paths to Windows format before running java
113 | if $cygwin ; then
114 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
115 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
116 | JAVACMD=`cygpath --unix "$JAVACMD"`
117 |
118 | # We build the pattern for arguments to be converted via cygpath
119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
120 | SEP=""
121 | for dir in $ROOTDIRSRAW ; do
122 | ROOTDIRS="$ROOTDIRS$SEP$dir"
123 | SEP="|"
124 | done
125 | OURCYGPATTERN="(^($ROOTDIRS))"
126 | # Add a user-defined pattern to the cygpath arguments
127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
129 | fi
130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
131 | i=0
132 | for arg in "$@" ; do
133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
135 |
136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
138 | else
139 | eval `echo args$i`="\"$arg\""
140 | fi
141 | i=$((i+1))
142 | done
143 | case $i in
144 | (0) set -- ;;
145 | (1) set -- "$args0" ;;
146 | (2) set -- "$args0" "$args1" ;;
147 | (3) set -- "$args0" "$args1" "$args2" ;;
148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
154 | esac
155 | fi
156 |
157 | # Escape application args
158 | save () {
159 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
160 | echo " "
161 | }
162 | APP_ARGS=$(save "$@")
163 |
164 | # Collect all arguments for the java command, following the shell quoting and substitution rules
165 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
166 |
167 | # by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
168 | if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
169 | cd "$(dirname "$0")"
170 | fi
171 |
172 | exec "$JAVACMD" "$@"
173 |
--------------------------------------------------------------------------------
/app/src/main/java/com/hhilan/flarum/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.hhilan.flarum;
2 |
3 |
4 | import android.annotation.SuppressLint;
5 | import android.content.DialogInterface;
6 | import android.net.http.SslError;
7 | import android.support.v7.app.AlertDialog;
8 | import android.support.v7.app.AppCompatActivity;
9 | import android.os.Bundle;
10 | import android.view.KeyEvent;
11 | import android.webkit.SslErrorHandler;
12 | import android.webkit.WebView;
13 | import android.webkit.WebViewClient;
14 | import android.graphics.Bitmap;
15 | import android.view.View;
16 | import android.widget.ProgressBar;
17 |
18 | public class MainActivity extends AppCompatActivity {
19 |
20 | String ShowOrHideWebViewInitialUse = "show";
21 | private WebView webview ;
22 | private ProgressBar spinner;
23 | String myurl = "https://www.hhilan.com"; //Change this to your own url !!
24 |
25 | @SuppressLint("SetJavaScriptEnabled")
26 | @Override
27 | protected void onCreate(Bundle savedInstanceState) {
28 | super.onCreate(savedInstanceState);
29 | setContentView(R.layout.activity_main);
30 |
31 | webview =(WebView)findViewById(R.id.webView);
32 | spinner = (ProgressBar)findViewById(R.id.progressBar1);
33 | webview.setWebViewClient(new CustomWebViewClient());
34 |
35 | webview.getSettings().setJavaScriptEnabled(true);
36 | webview.getSettings().setDomStorageEnabled(true);
37 | webview.setOverScrollMode(WebView.OVER_SCROLL_NEVER);
38 | webview.loadUrl(myurl);
39 | }
40 |
41 |
42 |
43 | /**
44 | * This allows for a splash screen
45 | * Hide elements once the page loads
46 | * Show custom error page
47 | * Resolve issue with SSL certificate
48 | **/
49 |
50 | private class CustomWebViewClient extends WebViewClient {
51 |
52 | // Handle SSL issue
53 | @Override
54 | public void onReceivedSslError(WebView view, final SslErrorHandler handler, SslError error) {
55 |
56 | final AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this);
57 |
58 | builder.setMessage(R.string.notification_error_ssl_cert_invalid);
59 |
60 | builder.setPositiveButton("continue", new DialogInterface.OnClickListener() {
61 |
62 | @Override
63 | public void onClick(DialogInterface dialog, int which) {
64 |
65 | handler.proceed();
66 | }
67 | });
68 |
69 | builder.setNegativeButton("cancel", new DialogInterface.OnClickListener() {
70 |
71 | @Override
72 | public void onClick(DialogInterface dialog, int which) {
73 |
74 | handler.cancel();
75 | }
76 | });
77 |
78 | final AlertDialog dialog = builder.create();
79 |
80 | dialog.show();
81 | }
82 |
83 | @Override
84 | public void onPageStarted(WebView webview, String url, Bitmap favicon) {
85 |
86 | // only make it invisible the FIRST time the app is run
87 | if (ShowOrHideWebViewInitialUse.equals("show")) {
88 | webview.setVisibility(webview.INVISIBLE);
89 | }
90 | }
91 |
92 | @Override
93 | public void onPageFinished(WebView view, String url) {
94 |
95 | ShowOrHideWebViewInitialUse = "hide";
96 | spinner.setVisibility(View.GONE);
97 |
98 | view.setVisibility(webview.VISIBLE);
99 | super.onPageFinished(view, url);
100 |
101 | }
102 |
103 | // Show custom error page
104 | @Override
105 | public void onReceivedError(WebView view, int errorCode,
106 | String description, String failingUrl) {
107 | myurl = view.getUrl();
108 | setContentView(R.layout.error);
109 | super.onReceivedError(view, errorCode, description, failingUrl);
110 | }
111 |
112 |
113 | }
114 |
115 | @Override
116 | public boolean onKeyDown(int keyCode, KeyEvent event) {
117 | if (event.getAction() == KeyEvent.ACTION_DOWN) {
118 | switch (keyCode) {
119 | case KeyEvent.KEYCODE_BACK:
120 | if (webview.canGoBack()) {
121 | webview.goBack();
122 | }
123 | else {
124 |
125 | final AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this);
126 |
127 | builder.setMessage(R.string.exit_app);
128 |
129 | builder.setPositiveButton("Yes", new DialogInterface.OnClickListener() {
130 | @Override
131 | public void onClick(DialogInterface dialog, int which) {
132 |
133 | finish();
134 | }
135 | });
136 |
137 | builder.setNegativeButton("No", new DialogInterface.OnClickListener(){
138 | @Override
139 | public void onClick(DialogInterface dialog, int which) {
140 |
141 | // Do nothing
142 | }
143 | });
144 |
145 | final AlertDialog dialog = builder.create();
146 |
147 | dialog.show();
148 | }
149 | return true;
150 | }
151 |
152 | }
153 | return super.onKeyDown(keyCode, event);
154 | }
155 |
156 | /* Retry Loading the page */
157 |
158 | @SuppressLint("SetJavaScriptEnabled")
159 | public void tryAgain(View v){
160 |
161 | setContentView(R.layout.activity_main);
162 | webview =(WebView)findViewById(R.id.webView);
163 | spinner = (ProgressBar)findViewById(R.id.progressBar1);
164 | webview.setWebViewClient(new CustomWebViewClient());
165 |
166 | webview.getSettings().setJavaScriptEnabled(true);
167 | webview.getSettings().setDomStorageEnabled(true);
168 | webview.setOverScrollMode(WebView.OVER_SCROLL_NEVER);
169 | webview.loadUrl(myurl);
170 | }
171 | }
172 |
173 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | # Android App for Flarum
7 |
8 | > A way to build an Android app for your flarum site easily.
9 |
10 | ## About this project:
11 | This project is designed for the webmasters of Flarum websites. This project can help the Flarum website owners to build their web-based Android apps easily, and help the Flarum websites to keep the users. It mainly used the 'webview' tech in Java, with cache storage, log in protection, and other techs. Note: This is not a Flarum official project.
12 |
13 | ## What is Flarum?
14 | **[Flarum](https://flarum.org/) is a delightfully simple discussion platform for your website.** It's fast and easy to use, with all the features you need to run a successful community. It is designed to be:
15 |
16 | * **Fast and simple.** No clutter, no bloat, no complex dependencies. Flarum is built with PHP so it’s quick and easy to deploy. The interface is powered by Mithril, a performant JavaScript framework with a tiny footprint.
17 |
18 | * **Beautiful and responsive.** This is forum software for humans. Flarum is carefully designed to be consistent and intuitive across platforms, out-of-the-box.
19 |
20 | * **Powerful and extensible.** Customize, extend, and integrate Flarum to suit your community. Flarum’s architecture is amazingly flexible, with a powerful Extension API.
21 |
22 | ## Why this project is build?
23 | > Currently, we have not found great Android app solution for Flarum, the only one we found is fluam/fluam_app, but it tends to be an app for a lot of websites, instead of one. Also, it's not avaliable for users to login, nor make any actions through that project. Thus, we build this simple project to help the Flarum webmasters to build apps for their own websites.
24 |
25 | ## How to build an app with this project?
26 | > We have found two approaches for you to use this project, a command-line more approach, and a applications more approach.
27 |
28 | ### We'll start with the **command-line approach**, to skip to the application approach, click here. The command line approach allows you to:
29 | * **Add your website url**
30 | * **Change the name of the app**
31 | * **Make the app with any operating system gradle support**
32 |
33 | This approach doesn't allow you to:
34 |
35 | * **Use custom icon for the app**
36 | * **Customize your app package name**
37 | * **Add custom functions to your generated app**
38 |
39 | Here is instruction of the command-line approach:
40 | 1. Make sure you have Gradle installed on your device, to check if you have installed, or not, run the following command through the command line:
41 |
42 | > gradlew -v
43 |
44 | If there **are** info about gradle, congragulations, you can skip the installation of gradle, if there isn't, follow the following instruction:
45 | 1. If you are a **Linux/GNU** user, the system might tell you if you want to install gradle, after you ran the previous command, if it didn't, follow this guide to install gradle in your device: https://gradle.org/install
46 | 2. If you are a **Windows/Mac** user, you can follow the official guide to install: https://gradle.org/releases/ , or https://gradle.org/install
47 |
48 | **Note: You need to add gradle as a path when installing it.**
49 | **Note: You need to install [Java](https://java.com) before installation of gradle.**
50 |
51 | 2. After gradle is prepared, there is only a little things need to be done.
52 | 1. Download the release of this project:
53 |
54 | ```git clone https://github.com/Aurorum-Studio/flarum-app.git``` ##using git
55 |
56 | or,
57 |
58 | Directly dowload the latest release from GitHub: https://github.com/Aurorum-Studio/flarum-app/releases/
59 |
60 | 2. Now it's time to customize your app,
61 |
62 | > First, go to (relative path) /app/src/main/res/values/strings.xml
63 |
64 | > You can open this file with almost any text editor, and change the "My Flarum" on the second line "My Flarum", into the app name you want.
65 |
66 | > **This step is very important**, go to (relative path) /app/src/main/java/com/hhilan/flarum/MainActivity.java
67 | > Change "https://www.hhilan.com" on line 23, to your own url (the link of your website homepage).
68 |
69 | **Warning: Do not change anything else in this file, unless you KNOW WHAT YOU'RE DOING.**
70 |
71 | 3. If you're a Windows user, simply double-click the build.cmd file, and the building process would run automatically.
72 |
73 | If you're a Linux/GNU user, open the command line in the folder of this project, and run the following command:
74 |
75 | ```gradlew clean```
76 | ```gradlew build```
77 |
78 | Then, the app will be generate automatically, after the command line is closed (on Windows), or start a new line (on Linux/GNU), your app is already generated.
79 |
80 | You can find your app for debugging in (relative path) /app/build/outputs/apk/debug/app-debug.apk
81 |
82 | You can find your app for release in (relative path) /app/build/outputs/apk/debug/app-release-unsigned.apk
83 |
84 | **Note: It's recommanded to use debug app instead of the released one, because the released one is unsigned.**
85 |
86 | -----
87 |
88 | ### Now let's go to start with the **application approach**. The application approach allows you to:
89 | * **Add your website url**
90 | * **Change the name of the app**
91 | * **Use custom icon for the app**
92 | * **Customize your app package name**
93 | * **Add custom functions to your generated app**
94 |
95 | This approach doesn't allow you to:
96 |
97 | * **Make the app with any operating system gradle support.**
98 | * **Generate your application with only a little disk storage cost.**
99 |
100 | Here is the **application approach** instruction:
101 | 1. Download and install Android Studio, the official release and install instruction can be found on https://developer.android.com/studio/install .
102 | 2. Follow the guide, and install Android Studio on your computer, **Note: You need to make sure that gradle is installed, and added to path.**
103 | 3. Now, it's the time to work with this project.
104 | 1. Download the latest release of this project
105 | * If you prefer to download directly from browser, go to this link: https://github.com/Aurorum-Studio/flarum-app/releases
106 | * If you prefer to download with git, run ```git clone https://github.com/Aurorum-Studio/flarum-app.git```
107 | 2. Customize your application. (For more instruction of the structure of this project, read this doc.)
108 | * To change the name of the application,
109 | > Browse to (relative path) /app/src/main/res/values/strings.xml, and change the "My Flarum" on the second line "My Flarum", into the app name you want.
110 | > 
111 | * To change the name of the package,
112 | > go to the MainActivity.java file, and follow the following images
113 | > 
114 | > 
115 | > #### **!!! Note: Flarum is the trademark of Flarum, you should not use com.flarum or anything that implies the App is an official app by the Flarum team. Which is to say, the first and second string should not contain Flarum Trademark.**
116 | > #### **!!!Warning!!!: If your previous package name is like shown in the image, including strings like "www", or "com", DO NOT change the package name in this way, you should change it in other ways, while that would take a lot of work. Thus, DO NOT use names contain these strings unless it's your last time to change your package name. If you download this project directly from official release, you WOULD NOT recieve a project with those strings.**
117 | > 
118 | > And, that's done.
119 | * To change the icon of your application:
120 | > Note: You should not use Flarum icon, HhiLan icon, nor Aurorum icon for the icon of your application.
121 | > 
122 | > 
123 | > 
124 |
125 |
126 | 4. You have already done most of your DIY work, for more DIY-able details, go to this doc. (Documentation on building, link would be avaliable after it's built.)
127 | 5. Now, it's time to build this project into an application.
128 | > 
129 | > Click make project, and your app is built, with the path given by Android Studio.
130 |
131 | ## Todo list (It's very welcomed to make the todo list become true before me, and please make a pull request if you did.):
132 | 1. Build a version made with firefox (gecko), to make sure users with poor webview support can use this app.
133 | 2. Add a offline cache read feature, to allow users use the app offline. (might be done before 2023/05) Plan has been made.
134 | 3. Make this Readme file better.
135 | 4. Optimize the appearance of this app:
136 | * Add a better-looking loading
137 | * Add a better header.
138 | 5. Make a native Android app for flarum. (This would be a lot of work.)
139 | 6. Make a full automatic Windows/Linux/Android/web application to build this project to an app.
140 | 7. Make it available to upload staffs using fof upload. From [Issue #7](https://github.com/Aurorum-Studio/flarum-app/issues/7)
141 |
142 | ### At last, if you like this project, please star it.🦊 It's also very welcomed to contribute to this project through pull request, or issue, discussions. If you want to support me, please go to my sites, and view some articles. (https://dl.aurorum.co ; https://www.hhilan.com ; https://dev.aurorum.co)
143 |
144 | Here are some ways you can get support:
145 |
146 | Discussions:
147 | * HhiLan Support Tag: https://www.hhilan.com/d/131-aurorum-studioflarum-app (Sorry for using a photography site for support, but the domain I always use(the second option) is blocked in China, and I may not get notification when you need help using that domain)
148 | * Aurorum Dev Site: https://dev.aurorum.co/d/91-aurorum-studioflarum-app (Blocked in China)
149 | * Flarum Discussion: https://discuss.flarum.org/d/32467-unofficial-flarum-android-app
150 |
151 | Issues: Github: https://github.com/Aurorum-Studio/flarum-app/issues
152 |
153 | A small notice: The version of Gradle would impact the building process of this project, if you are in a country or region that have Google services available, you can download the right one from Android Studio, if you are not, you need to download version 6.7.1 from gradle official website.
154 |
155 |
156 |
--------------------------------------------------------------------------------