v0.5.3 events and indentation
This commit is contained in:
parent
575c1b0e1e
commit
18c7255b91
103 changed files with 1601 additions and 1906 deletions
|
@ -1,7 +1,19 @@
|
|||
<?xml version="1.0"?>
|
||||
<manifest package="org.qtproject.friendiqa" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="0.5.2" android:versionCode="19" android:installLocation="auto">
|
||||
<application android:hardwareAccelerated="true" android:vmSafeMode="true" android:name="org.qtproject.qt5.android.bindings.QtApplication" android:label="Friendiqa" android:icon="@drawable/friendiqa" android:logo="@drawable/friendiqa" android:theme="@android:style/Theme.Holo.Light">
|
||||
<activity android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation" android:name="androidnative.friendiqa.FriendiqaActivity" android:label="Friendiqa" android:screenOrientation="unspecified" android:launchMode="singleTask" android:taskAffinity="">
|
||||
<manifest package="org.qtproject.friendiqa" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="0.5.3" android:versionCode="21" android:installLocation="auto">
|
||||
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="29"/>
|
||||
|
||||
<!-- The following comment will be replaced upon deployment with default permissions based on the dependencies of the application.
|
||||
Remove the comment if you do not require these default permissions. -->
|
||||
<!-- %%INSERT_PERMISSIONS -->
|
||||
|
||||
<!-- The following comment will be replaced upon deployment with default features based on the dependencies of the application.
|
||||
Remove the comment if you do not require these default features. -->
|
||||
<!-- %%INSERT_FEATURES -->
|
||||
|
||||
<supports-screens android:largeScreens="true" android:normalScreens="true" android:anyDensity="true" android:smallScreens="true"/>
|
||||
|
||||
<application android:hardwareAccelerated="false" android:name="org.qtproject.qt5.android.bindings.QtApplication" android:label="Friendiqa" android:extractNativeLibs="true" android:icon="@drawable/friendiqa" android:theme="@android:style/Theme.Holo.Light" android:logo="@drawable/friendiqa">
|
||||
<activity android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation|mcc|mnc|density" android:name="androidnative.friendiqa.FriendiqaActivity" android:label="Friendiqa" android:screenOrientation="unspecified" android:launchMode="singleTask" android:taskAffinity="">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
<category android:name="android.intent.category.LAUNCHER"/>
|
||||
|
@ -17,6 +29,10 @@
|
|||
<category android:name="android.intent.category.DEFAULT"/>
|
||||
<data android:mimeType="text/*"/>
|
||||
</intent-filter>
|
||||
<!-- Application arguments -->
|
||||
<!-- meta-data android:name="android.app.arguments" android:value="arg1 arg2 arg3"/ -->
|
||||
<!-- Application arguments -->
|
||||
|
||||
<meta-data android:name="android.app.lib_name" android:value="friendiqa"/>
|
||||
<meta-data android:name="android.app.qt_sources_resource_id" android:resource="@array/qt_sources"/>
|
||||
<meta-data android:name="android.app.repository" android:value="default"/>
|
||||
|
@ -24,22 +40,33 @@
|
|||
<meta-data android:name="android.app.bundled_libs_resource_id" android:resource="@array/bundled_libs"/>
|
||||
<!-- Deploy Qt libs as part of package -->
|
||||
<meta-data android:name="android.app.bundle_local_qt_libs" android:value="-- %%BUNDLE_LOCAL_QT_LIBS%% --"/>
|
||||
<meta-data android:name="android.app.bundled_in_lib_resource_id" android:resource="@array/bundled_in_lib"/>
|
||||
<meta-data android:name="android.app.bundled_in_assets_resource_id" android:resource="@array/bundled_in_assets"/>
|
||||
|
||||
<!-- Run with local libs -->
|
||||
<meta-data android:name="android.app.use_local_qt_libs" android:value="-- %%USE_LOCAL_QT_LIBS%% --"/>
|
||||
<meta-data android:name="android.app.libs_prefix" android:value="/data/local/tmp/qt/"/>
|
||||
<meta-data android:name="android.app.load_local_libs" android:value="-- %%INSERT_LOCAL_LIBS%% --"/>
|
||||
<meta-data android:name="android.app.load_local_libs_resource_id" android:resource="@array/load_local_libs"/>
|
||||
<meta-data android:name="android.app.load_local_jars" android:value="-- %%INSERT_LOCAL_JARS%% --"/>
|
||||
<meta-data android:name="android.app.static_init_classes" android:value="-- %%INSERT_INIT_CLASSES%% --"/>
|
||||
<!-- Used to specify custom system library path to run with local system libs -->
|
||||
<!-- <meta-data android:name="android.app.system_libs_prefix" android:value="/system/lib/"/> -->
|
||||
<!-- Messages maps -->
|
||||
<meta-data android:value="@string/ministro_not_found_msg" android:name="android.app.ministro_not_found_msg"/>
|
||||
<meta-data android:value="@string/ministro_needed_msg" android:name="android.app.ministro_needed_msg"/>
|
||||
<meta-data android:value="@string/fatal_error_msg" android:name="android.app.fatal_error_msg"/>
|
||||
<meta-data android:value="@string/unsupported_android_version" android:name="android.app.unsupported_android_version"/>
|
||||
<!-- Messages maps -->
|
||||
|
||||
|
||||
<!-- Splash screen -->
|
||||
<!-- Orientation-specific (portrait/landscape) data is checked first. If not available for current orientation,
|
||||
then android.app.splash_screen_drawable. For best results, use together with splash_screen_sticky and
|
||||
use hideSplashScreen() with a fade-out animation from Qt Android Extras to hide the splash screen when you
|
||||
are done populating your window with content. -->
|
||||
<!-- meta-data android:name="android.app.splash_screen_drawable_portrait" android:resource="@drawable/logo_portrait" / -->
|
||||
<!-- meta-data android:name="android.app.splash_screen_drawable_landscape" android:resource="@drawable/logo_landscape" / -->
|
||||
<!-- meta-data android:name="android.app.splash_screen_drawable" android:resource="@drawable/logo"/ -->
|
||||
<!-- meta-data android:name="android.app.splash_screen_sticky" android:value="true"/ -->
|
||||
<meta-data android:name="android.app.splash_screen_drawable" android:resource="@drawable/splash"/>
|
||||
<!-- Splash screen -->
|
||||
|
||||
<!-- Background running -->
|
||||
<!-- Warning: changing this value to true may cause unexpected crashes if the
|
||||
|
@ -48,9 +75,23 @@
|
|||
signal is sent! -->
|
||||
<meta-data android:name="android.app.background_running" android:value="false"/>
|
||||
<!-- Background running -->
|
||||
</activity>
|
||||
|
||||
|
||||
<!-- auto screen scale factor -->
|
||||
<meta-data android:name="android.app.auto_screen_scale_factor" android:value="false"/>
|
||||
<!-- auto screen scale factor -->
|
||||
|
||||
<!-- extract android style -->
|
||||
<!-- available android:values :
|
||||
* default - In most cases this will be the same as "full", but it can also be something else if needed, e.g., for compatibility reasons
|
||||
* full - useful QWidget & Quick Controls 1 apps
|
||||
* minimal - useful for Quick Controls 2 apps, it is much faster than "full"
|
||||
* none - useful for apps that don't use any of the above Qt modules
|
||||
-->
|
||||
<meta-data android:name="android.app.extract_android_style" android:value="default"/>
|
||||
<!-- extract android style -->
|
||||
</activity>
|
||||
|
||||
<!-- For adding service(s) please check: https://wiki.qt.io/AndroidServices -->
|
||||
<service android:name="androidnative.friendiqa.FriendiqaService" android:permission="android.permission.BIND_JOB_SERVICE">
|
||||
<meta-data android:name="android.app.background_running" android:value="true"/>
|
||||
</service>
|
||||
|
@ -64,12 +105,14 @@
|
|||
<meta-data android:name="android.app.bundled_libs_resource_id" android:resource="@array/bundled_libs"/>
|
||||
|
||||
<meta-data android:name="android.app.bundle_local_qt_libs" android:value="-- %%BUNDLE_LOCAL_QT_LIBS%% --"/>
|
||||
<!--
|
||||
<meta-data android:name="android.app.bundled_in_lib_resource_id" android:resource="@array/bundled_in_lib"/>
|
||||
<meta-data android:name="android.app.bundled_in_assets_resource_id" android:resource="@array/bundled_in_assets"/>
|
||||
|
||||
-->
|
||||
<meta-data android:name="android.app.use_local_qt_libs" android:value="-- %%USE_LOCAL_QT_LIBS%% --"/>
|
||||
<meta-data android:name="android.app.libs_prefix" android:value="/data/local/tmp/qt/"/>
|
||||
<meta-data android:name="android.app.load_local_libs" android:value="-- %%INSERT_LOCAL_LIBS%% --"/>
|
||||
<meta-data android:name="android.app.load_local_libs_resource_id" android:resource="@array/load_local_libs"/>
|
||||
<meta-data android:name="android.app.load_local_jars" android:value="-- %%INSERT_LOCAL_JARS%% --"/>
|
||||
<meta-data android:name="android.app.static_init_classes" android:value="-- %%INSERT_INIT_CLASSES%% --"/>
|
||||
|
||||
|
@ -83,20 +126,7 @@
|
|||
<service android:process=":qt" android:name="androidnative.friendiqa.FriendiqaStopService" android:permission="android.permission.BIND_JOB_SERVICE" android:exported="true">
|
||||
<meta-data android:name="android.app.background_running" android:value="true"/>
|
||||
</service>
|
||||
|
||||
|
||||
</application>
|
||||
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="28"/>
|
||||
<supports-screens android:largeScreens="true" android:normalScreens="true" android:anyDensity="true" android:smallScreens="true"/>
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
|
||||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
|
||||
<!-- The following comment will be replaced upon deployment with default permissions based on the dependencies of the application.
|
||||
Remove the comment if you do not require these default permissions. -->
|
||||
<!-- %%INSERT_PERMISSIONS -->
|
||||
|
||||
<!-- The following comment will be replaced upon deployment with default features based on the dependencies of the application.
|
||||
Remove the comment if you do not require these default features. -->
|
||||
<!-- %%INSERT_FEATURES -->
|
||||
|
||||
|
||||
</manifest>
|
||||
|
|
BIN
source-android/android/arm/libcrypto_1_1.so
Executable file
BIN
source-android/android/arm/libcrypto_1_1.so
Executable file
Binary file not shown.
BIN
source-android/android/arm/libssl_1_1.so
Executable file
BIN
source-android/android/arm/libssl_1_1.so
Executable file
Binary file not shown.
BIN
source-android/android/arm64/libcrypto_1_1.so
Executable file
BIN
source-android/android/arm64/libcrypto_1_1.so
Executable file
Binary file not shown.
BIN
source-android/android/arm64/libssl_1_1.so
Executable file
BIN
source-android/android/arm64/libssl_1_1.so
Executable file
Binary file not shown.
|
@ -4,37 +4,26 @@ buildscript {
|
|||
jcenter()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.5.2'
|
||||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
maven {
|
||||
url "https://maven.google.com"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
apply plugin: 'com.android.application'
|
||||
|
||||
dependencies {
|
||||
compile fileTree(dir: 'libs', include: ['*.jar'])
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
|
||||
}
|
||||
|
||||
//apply plugin: 'android-library'
|
||||
|
||||
//dependencies {
|
||||
// compile 'com.android.support:support-v4:25.4.0'
|
||||
//}
|
||||
|
||||
//dependencies {
|
||||
// compile 'com.android.support:support-compat:25.4.0'
|
||||
//}
|
||||
|
||||
dependencies {
|
||||
compile 'androidx.appcompat:appcompat:1.1.0'
|
||||
}
|
||||
|
@ -55,7 +44,7 @@ android {
|
|||
|
||||
compileSdkVersion androidCompileSdkVersion.toInteger()
|
||||
|
||||
buildToolsVersion androidBuildToolsVersion
|
||||
buildToolsVersion '28.0.3'
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
|
@ -63,7 +52,7 @@ android {
|
|||
java.srcDirs = [qt5AndroidDir + '/src', 'src', 'java']
|
||||
aidl.srcDirs = [qt5AndroidDir + '/src', 'src', 'aidl']
|
||||
res.srcDirs = [qt5AndroidDir + '/res', 'res']
|
||||
resources.srcDirs = ['src']
|
||||
resources.srcDirs = ['resources']
|
||||
renderscript.srcDirs = ['src']
|
||||
assets.srcDirs = ['assets']
|
||||
jniLibs.srcDirs = ['libs']
|
||||
|
@ -73,6 +62,15 @@ android {
|
|||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
|
||||
// Do not compress Qt binary resources file
|
||||
aaptOptions {
|
||||
noCompress 'rcc'
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
resConfigs "en"
|
||||
}
|
||||
}
|
||||
apply from: "androidnative.gradle"
|
||||
setAndroidNativePath("/../androidnative.pri");
|
||||
|
|
|
@ -1,69 +0,0 @@
|
|||
buildscript {
|
||||
repositories {
|
||||
jcenter()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:1.1.0'
|
||||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
jcenter()
|
||||
}
|
||||
}
|
||||
|
||||
apply plugin: 'com.android.application'
|
||||
|
||||
dependencies {
|
||||
compile fileTree(dir: 'libs', include: ['*.jar'])
|
||||
}
|
||||
|
||||
//apply plugin: 'android-library'
|
||||
|
||||
dependencies {
|
||||
compile 'com.android.support:support-v4:25.3.1'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile 'com.android.support:support-compat:25.3.1'
|
||||
}
|
||||
|
||||
android {
|
||||
/*******************************************************
|
||||
* The following variables:
|
||||
* - androidBuildToolsVersion,
|
||||
* - androidCompileSdkVersion
|
||||
* - qt5AndroidDir - holds the path to qt android files
|
||||
* needed to build any Qt application
|
||||
* on Android.
|
||||
*
|
||||
* are defined in gradle.properties file. This file is
|
||||
* updated by QtCreator and androiddeployqt tools.
|
||||
* Changing them manually might break the compilation!
|
||||
*******************************************************/
|
||||
|
||||
compileSdkVersion androidCompileSdkVersion.toInteger()
|
||||
|
||||
buildToolsVersion androidBuildToolsVersion
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
manifest.srcFile 'AndroidManifest.xml'
|
||||
java.srcDirs = [qt5AndroidDir + '/src', 'src', 'java']
|
||||
aidl.srcDirs = [qt5AndroidDir + '/src', 'src', 'aidl']
|
||||
res.srcDirs = [qt5AndroidDir + '/res', 'res']
|
||||
resources.srcDirs = ['src']
|
||||
renderscript.srcDirs = ['src']
|
||||
assets.srcDirs = ['assets']
|
||||
jniLibs.srcDirs = ['libs']
|
||||
}
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
}
|
||||
apply from: "androidnative.gradle"
|
||||
setAndroidNativePath("/../androidnative.pri");
|
Binary file not shown.
|
@ -1,6 +1,5 @@
|
|||
#Wed Apr 10 15:27:10 PDT 2013
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.5.1-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.0.1-all.zip
|
||||
|
|
110
source-android/android/gradlew
vendored
110
source-android/android/gradlew
vendored
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env bash
|
||||
#!/usr/bin/env sh
|
||||
|
||||
##############################################################################
|
||||
##
|
||||
|
@ -6,47 +6,6 @@
|
|||
##
|
||||
##############################################################################
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS=""
|
||||
|
||||
APP_NAME="Gradle"
|
||||
APP_BASE_NAME=`basename "$0"`
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD="maximum"
|
||||
|
||||
warn ( ) {
|
||||
echo "$*"
|
||||
}
|
||||
|
||||
die ( ) {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
case "`uname`" in
|
||||
CYGWIN* )
|
||||
cygwin=true
|
||||
;;
|
||||
Darwin* )
|
||||
darwin=true
|
||||
;;
|
||||
MINGW* )
|
||||
msys=true
|
||||
;;
|
||||
esac
|
||||
|
||||
# For Cygwin, ensure paths are in UNIX format before anything is touched.
|
||||
if $cygwin ; then
|
||||
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
|
||||
fi
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
# Resolve links: $0 may be a link
|
||||
PRG="$0"
|
||||
|
@ -61,9 +20,49 @@ while [ -h "$PRG" ] ; do
|
|||
fi
|
||||
done
|
||||
SAVED="`pwd`"
|
||||
cd "`dirname \"$PRG\"`/" >&-
|
||||
cd "`dirname \"$PRG\"`/" >/dev/null
|
||||
APP_HOME="`pwd -P`"
|
||||
cd "$SAVED" >&-
|
||||
cd "$SAVED" >/dev/null
|
||||
|
||||
APP_NAME="Gradle"
|
||||
APP_BASE_NAME=`basename "$0"`
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS=""
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD="maximum"
|
||||
|
||||
warn () {
|
||||
echo "$*"
|
||||
}
|
||||
|
||||
die () {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
nonstop=false
|
||||
case "`uname`" in
|
||||
CYGWIN* )
|
||||
cygwin=true
|
||||
;;
|
||||
Darwin* )
|
||||
darwin=true
|
||||
;;
|
||||
MINGW* )
|
||||
msys=true
|
||||
;;
|
||||
NONSTOP* )
|
||||
nonstop=true
|
||||
;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
|
@ -90,7 +89,7 @@ location of your Java installation."
|
|||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
|
||||
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
|
||||
MAX_FD_LIMIT=`ulimit -H -n`
|
||||
if [ $? -eq 0 ] ; then
|
||||
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||
|
@ -114,6 +113,7 @@ fi
|
|||
if $cygwin ; then
|
||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||
|
||||
# We build the pattern for arguments to be converted via cygpath
|
||||
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
||||
|
@ -154,11 +154,19 @@ if $cygwin ; then
|
|||
esac
|
||||
fi
|
||||
|
||||
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
|
||||
function splitJvmOpts() {
|
||||
JVM_OPTS=("$@")
|
||||
# Escape application args
|
||||
save () {
|
||||
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||
echo " "
|
||||
}
|
||||
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
|
||||
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
|
||||
APP_ARGS=$(save "$@")
|
||||
|
||||
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
|
||||
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
||||
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
||||
|
||||
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
|
||||
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
|
||||
cd "$(dirname "$0")"
|
||||
fi
|
||||
|
||||
exec "$JAVACMD" "$@"
|
||||
|
|
174
source-android/android/gradlew.bat
vendored
174
source-android/android/gradlew.bat
vendored
|
@ -1,90 +1,84 @@
|
|||
@if "%DEBUG%" == "" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS=
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:init
|
||||
@rem Get command-line arguments, handling Windowz variants
|
||||
|
||||
if not "%OS%" == "Windows_NT" goto win9xME_args
|
||||
if "%@eval[2+2]" == "4" goto 4NT_args
|
||||
|
||||
:win9xME_args
|
||||
@rem Slurp the command line arguments.
|
||||
set CMD_LINE_ARGS=
|
||||
set _SKIP=2
|
||||
|
||||
:win9xME_args_slurp
|
||||
if "x%~1" == "x" goto execute
|
||||
|
||||
set CMD_LINE_ARGS=%*
|
||||
goto execute
|
||||
|
||||
:4NT_args
|
||||
@rem Get arguments from the 4NT Shell from JP Software
|
||||
set CMD_LINE_ARGS=%$
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||
exit /b 1
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
@if "%DEBUG%" == "" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS=
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:init
|
||||
@rem Get command-line arguments, handling Windows variants
|
||||
|
||||
if not "%OS%" == "Windows_NT" goto win9xME_args
|
||||
|
||||
:win9xME_args
|
||||
@rem Slurp the command line arguments.
|
||||
set CMD_LINE_ARGS=
|
||||
set _SKIP=2
|
||||
|
||||
:win9xME_args_slurp
|
||||
if "x%~1" == "x" goto execute
|
||||
|
||||
set CMD_LINE_ARGS=%*
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||
exit /b 1
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1 +0,0 @@
|
|||
sdk.dir=/home/pankraz/android-sdk_alt
|
BIN
source-android/android/res/drawable-hdpi/icon.png
Normal file
BIN
source-android/android/res/drawable-hdpi/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2 KiB |
BIN
source-android/android/res/drawable-ldpi/icon.png
Normal file
BIN
source-android/android/res/drawable-ldpi/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
BIN
source-android/android/res/drawable-mdpi/icon.png
Normal file
BIN
source-android/android/res/drawable-mdpi/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
|
@ -1,7 +1,7 @@
|
|||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<resources>
|
||||
<array name="qt_sources">
|
||||
<item>https://download.qt.io/ministro/android/qt5/qt-5.8</item>
|
||||
<item>https://download.qt.io/ministro/android/qt5/qt-5.14</item>
|
||||
</array>
|
||||
|
||||
<!-- The following is handled automatically by the deployment tool. It should
|
||||
|
@ -11,15 +11,12 @@
|
|||
<!-- %%INSERT_EXTRA_LIBS%% -->
|
||||
</array>
|
||||
|
||||
<array name="qt_libs">
|
||||
<!-- %%INSERT_QT_LIBS%% -->
|
||||
</array>
|
||||
|
||||
<array name="bundled_in_lib">
|
||||
<!-- %%INSERT_BUNDLED_IN_LIB%% -->
|
||||
<array name="qt_libs">
|
||||
<!-- %%INSERT_QT_LIBS%% -->
|
||||
</array>
|
||||
<array name="bundled_in_assets">
|
||||
<!-- %%INSERT_BUNDLED_IN_ASSETS%% -->
|
||||
|
||||
<array name="load_local_libs">
|
||||
<!-- %%INSERT_LOCAL_LIBS%% -->
|
||||
</array>
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -1,96 +0,0 @@
|
|||
package androidnative.example;
|
||||
import androidnative.SystemDispatcher;
|
||||
import android.app.Notification;
|
||||
import android.app.NotificationManager;
|
||||
import android.util.Log;
|
||||
import android.os.Handler;
|
||||
import android.app.Activity;
|
||||
import android.view.View;
|
||||
import android.content.Context;
|
||||
import java.util.Map;
|
||||
import org.qtproject.qt5.android.QtNative;
|
||||
|
||||
public class ExampleService {
|
||||
|
||||
static {
|
||||
|
||||
SystemDispatcher.addListener(new SystemDispatcher.Listener() {
|
||||
|
||||
NotificationManager m_notificationManager;
|
||||
Notification.Builder m_builder;
|
||||
|
||||
private void notificationManagerNotify(Map data) {
|
||||
|
||||
final Activity activity = QtNative.activity();
|
||||
final Map messageData = data;
|
||||
|
||||
Runnable runnable = new Runnable () {
|
||||
public void run() {
|
||||
try {
|
||||
String title = (String) messageData.get("title");
|
||||
|
||||
String message = (String) messageData.get("message");
|
||||
|
||||
if (m_notificationManager == null) {
|
||||
m_notificationManager = (NotificationManager) activity.getSystemService(Context.NOTIFICATION_SERVICE);
|
||||
m_builder = new Notification.Builder(activity);
|
||||
|
||||
// Small Icon is a must to make notification works.
|
||||
// And that is why you need to inherit QtActivity
|
||||
//m_builder.setSmallIcon(drawable.icon);
|
||||
}
|
||||
|
||||
m_builder.setContentTitle(title);
|
||||
m_builder.setContentText(message);
|
||||
m_notificationManager.notify(1, m_builder.build());
|
||||
|
||||
// Test function. Remove it later.
|
||||
SystemDispatcher.dispatch("Notifier.notifyFinished");
|
||||
} catch (Exception e) {
|
||||
Log.d("",e.getMessage());
|
||||
}
|
||||
|
||||
};
|
||||
};
|
||||
activity.runOnUiThread(runnable);
|
||||
}
|
||||
|
||||
private void hapticFeedbackPerform(Map data) {
|
||||
|
||||
final Activity activity = QtNative.activity();
|
||||
final Map messageData = data;
|
||||
Runnable runnable = new Runnable () {
|
||||
public void run() {
|
||||
int feedbackConstant = (Integer) messageData.get("feedbackConstant");
|
||||
int flags = (Integer) messageData.get("flags");
|
||||
|
||||
Log.d("",String.format("hapticFeedbackPerform(%d,%d)",feedbackConstant,flags));
|
||||
|
||||
View rootView = activity.getWindow().getDecorView().getRootView();
|
||||
rootView.performHapticFeedback(feedbackConstant, flags);
|
||||
|
||||
// Test function. Remove it later.
|
||||
SystemDispatcher.dispatch("hapticFeedbackPerformFinished");
|
||||
};
|
||||
};
|
||||
activity.runOnUiThread(runnable);
|
||||
}
|
||||
|
||||
public void onDispatched(String name , Map data) {
|
||||
|
||||
if (name.equals("Notifier.notify")) {
|
||||
notificationManagerNotify(data);
|
||||
return;
|
||||
} else if (name.equals("hapticFeedbackPerform")) {
|
||||
hapticFeedbackPerform(data);
|
||||
return;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -41,7 +41,7 @@ public class AndroidNativeActivity extends org.qtproject.qt5.android.bindings.Qt
|
|||
// result of the request.
|
||||
} else {
|
||||
|
||||
System.loadLibrary("friendiqa");
|
||||
System.loadLibrary("friendiqa_arm64-v8a");
|
||||
if((getIntent().getFlags() == (Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY)) || (getIntent().getFlags() == Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY) || (getIntent().getFlags() == Intent.FLAG_ACTIVITY_NEW_TASK) || (getIntent().getFlags() == Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED) || (getIntent().getFlags() == (Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED))) {
|
||||
SystemDispatcher.onActivityResume();
|
||||
} else {
|
||||
|
@ -90,7 +90,7 @@ public class AndroidNativeActivity extends org.qtproject.qt5.android.bindings.Qt
|
|||
|
||||
|
||||
protected void onNewIntent(Intent data) {
|
||||
System.loadLibrary("friendiqa");
|
||||
System.loadLibrary("friendiqa_arm64-v8a");
|
||||
super.onNewIntent(data);
|
||||
if ((data!=null) && (data.getType() != null) && !(data.getBooleanExtra("used",false))){
|
||||
String type = data.getType();
|
||||
|
|
|
@ -20,7 +20,7 @@ public class AndroidNativeService extends QtService
|
|||
private static String TAG = "AndroidNative";
|
||||
|
||||
public void startQtService(Context ctx) {
|
||||
Log.d(TAG, "QtActivity active "+String.valueOf(QtNative.activity()!=null));
|
||||
//Log.d(TAG, "QtActivity active "+String.valueOf(QtNative.activity()!=null));
|
||||
if (QtNative.activity()==null){
|
||||
//Log.d(TAG,"Friendiqasync Stop existing QtService");
|
||||
ctx.stopService(new Intent(ctx, AndroidNativeService.class));
|
||||
|
@ -55,7 +55,7 @@ public class AndroidNativeService extends QtService
|
|||
NotificationManager.IMPORTANCE_DEFAULT);
|
||||
channel.setSound(null,null);
|
||||
((NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE)).createNotificationChannel(channel);
|
||||
//Log.d(TAG,"Friendiqa onCreate Notification");
|
||||
Log.d(TAG,"Friendiqa onCreate Notification");
|
||||
Notification notification = new Notification.Builder(context,CHANNEL_ID)
|
||||
.setSmallIcon(R.drawable.friendiqanotification)
|
||||
.setContentTitle("Friendiqa")
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file is part of Friendiqa
|
||||
// https://github.com/lubuwest/Friendiqa
|
||||
// Copyright (C) 2017 Marco R. <thomasschmidt45@gmx.net>
|
||||
// Copyright (C) 2020 Marco R. <thomasschmidt45@gmx.net>
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
|
@ -56,8 +56,8 @@ JNIEXPORT jint JNI_OnLoad(JavaVM* vm, void*) {
|
|||
#endif
|
||||
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
//qDebug()<< "argv Friendiqa"<< argv[0]; //<<" argv2" <<argv[1];
|
||||
Q_DECL_EXPORT int main(int argc, char *argv[]) {
|
||||
//if (argc>1){qDebug()<< "argc Friendiqa"<< argc <<" argv1" <<argv[1];}
|
||||
if ((argc>1) && (qstrcmp(argv[1],"-service")==0)){
|
||||
//qDebug()<<"FriendiqaMain Service";
|
||||
QAndroidService app(argc, argv);
|
||||
|
@ -71,7 +71,7 @@ int main(int argc, char *argv[]) {
|
|||
else{
|
||||
QApplication app(argc, argv);
|
||||
QQuickView view;
|
||||
qDebug()<<"FriendiqaMain started";
|
||||
//qDebug()<<"FriendiqaMain started";
|
||||
QTranslator qtTranslator;
|
||||
qtTranslator.load("friendiqa-" + QLocale::system().name(),":/translations");
|
||||
app.installTranslator(&qtTranslator);
|
||||
|
|
|
@ -24,6 +24,17 @@ SOURCES += common/friendiqa.cpp \
|
|||
common/remoteauthasyncimageprovider.cpp \
|
||||
common/updatenews.cpp \
|
||||
common/alarmandroid.cpp
|
||||
lupdate_only{
|
||||
SOURCES = qml/friendiqa.qml \
|
||||
qml/*.qml
|
||||
qml/calendarqml/*.qml
|
||||
qml/configqml/*.qml
|
||||
qml/genericqml/*.qml
|
||||
qml/contactqml/*.qml
|
||||
qml/newsqml/*.qml
|
||||
qml/photoqml/*.qml
|
||||
js/*.js
|
||||
}
|
||||
|
||||
ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android
|
||||
|
||||
|
@ -70,16 +81,6 @@ DISTFILES += \
|
|||
js/*.js \
|
||||
android/androidnative.gradle \
|
||||
android/src/FriendiqaActivity.java \
|
||||
android/src/ExampleService.java
|
||||
android/src/FriendiqaService.java
|
||||
|
||||
contains(ANDROID_TARGET_ARCH,armeabi-v7a) {
|
||||
ANDROID_EXTRA_LIBS = \
|
||||
$$PWD/android/libcrypto_1_1.so \
|
||||
$$PWD/android/libssl_1_1.so
|
||||
}
|
||||
|
||||
contains(ANDROID_TARGET_ARCH,arm64-v8a) {
|
||||
ANDROID_EXTRA_LIBS = \
|
||||
/home/pankraz/ownCloud/clientsync/Friendiqa/v0.5.2/source-android/../../../../../git/android_openssl/arm64/libcrypto_1_1.so \
|
||||
$$PWD/../../../../../git/android_openssl/arm64/libssl_1_1.so
|
||||
}
|
||||
ANDROID_EXTRA_LIBS = $$PWD/android/arm/libcrypto_1_1.so $$PWD/android/arm/libssl_1_1.so $$PWD/android/arm64/libcrypto_1_1.so $$PWD/android/arm64/libssl_1_1.so
|
||||
|
|
|
@ -45,7 +45,7 @@ StackView{
|
|||
height:osSettings.appHeight
|
||||
property var db: ["Friendiqa", "1.0", "Stores Friendica data", 100000000]
|
||||
property var login: Service.readActiveConfig(db)
|
||||
property var globaloptions: ({}) //Service.readGlobaloptions(db)
|
||||
property var globaloptions: Service.readGO(db)
|
||||
property var contactlist: []
|
||||
property real mm: osSettings.osType=="Android"?Screen.pixelDensity:Screen.pixelDensity*1.5
|
||||
signal messageSignal(var friend)
|
||||
|
@ -59,6 +59,7 @@ StackView{
|
|||
signal uploadSignal(var urls)
|
||||
signal sendtextSignal(var intenttext)
|
||||
signal changeimage(var method, var type, var id)
|
||||
signal updateSyncinterval(int interval)
|
||||
property var news:[]
|
||||
property var newContacts:[]
|
||||
//property string contactLoadType: ""
|
||||
|
@ -67,7 +68,7 @@ StackView{
|
|||
onLoginChanged:{
|
||||
if(login==""){root.push("qrc:/qml/configqml/AccountPage.qml")}
|
||||
else{root.push(rootStackItem)
|
||||
newstab.newstabstatus=login.newsViewType;
|
||||
if (login.newsViewType!="" || login.newsViewType!=null){newstab.newstabstatus=login.newsViewType;}
|
||||
Newsjs.getCurrentContacts(login,db,function(contacts){
|
||||
contactlist=contacts})}
|
||||
}
|
||||
|
@ -105,20 +106,20 @@ StackView{
|
|||
|
||||
FontLoader{id: fontAwesome; source: "qrc:/images/fontawesome-webfont.ttf"}
|
||||
|
||||
Keys.onReleased: {
|
||||
Keys.onReleased: {//print(event.key + "Backkey"+newstab.conversation.length+" "+root.depth)
|
||||
if (event.key === osSettings.backKey) {
|
||||
if (rootstack.currentIndex==0){
|
||||
newstab.active=true;
|
||||
if (newstab.newstabstatus!=login.newsViewType){
|
||||
newstab.newstabstatus=login.newsViewType;
|
||||
if(login.newsViewType=="Timeline"){Newsjs.newsfromdb(db,login.username,0,function(dbnews){
|
||||
if (newstab.newstabstatus!=globaloptions.newsViewType){
|
||||
newstab.newstabstatus=globaloptions.newsViewType;
|
||||
if(globaloptions.newsViewType=="Timeline"){Newsjs.newsfromdb(db,login.username,0,function(dbnews){
|
||||
newsSignal(dbnews)
|
||||
})}
|
||||
else{
|
||||
Newsjs.chatsfromdb(db,login.username,function(dbnews){
|
||||
newsSignal(dbnews)
|
||||
})}
|
||||
}
|
||||
}
|
||||
|
||||
else if (newstab.conversation.length>0){newstab.conversation=[]}
|
||||
else if (root.depth>1){root.pop()}
|
||||
|
@ -285,7 +286,6 @@ StackView{
|
|||
}
|
||||
|
||||
Label{
|
||||
|
||||
text: "\uf08b " +qsTr("Quit")
|
||||
font.pixelSize: 4*mm
|
||||
width: parent.width
|
||||
|
@ -303,9 +303,6 @@ StackView{
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Item{
|
||||
id:rootStackItem
|
||||
width:parent.width
|
||||
|
@ -392,13 +389,13 @@ StackView{
|
|||
|
||||
}
|
||||
Component.onCompleted: {
|
||||
forceActiveFocus();
|
||||
Service.readGlobaloptions(db,function(go){globaloptions=go})
|
||||
forceActiveFocus();
|
||||
//print(xhr.networktype());
|
||||
if(osSettings.osType=="Android"){
|
||||
var component = Qt.createComponent("qrc:/qml/genericqml/IntentReceiver.qml");
|
||||
var IntentReceiverQml = component.createObject(root);
|
||||
} else if (osSettings.osType=="Linux"){
|
||||
}
|
||||
else if (osSettings.osType=="Linux"){
|
||||
var component = Qt.createComponent("qrc:/qml/genericqml/LinuxSync.qml");
|
||||
var LinuxSyncQml = component.createObject(root);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue