1st version that works

This commit is contained in:
Bogdan Ungureanu 2022-03-14 11:53:00 +02:00
parent ee2884b2ff
commit 3806d2c80d
617 changed files with 17293 additions and 4470 deletions

View File

@ -1,10 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
<classpathentry kind="lib" path="libs/android-support-v4.jar"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>

188
.gitignore vendored Normal file
View File

@ -0,0 +1,188 @@
# Created by https://www.gitignore.io/api/android,windows,androidstudio
### Android ###
# Built application files
*.apk
*.ap_
# Files for the ART/Dalvik VM
*.dex
# Java class files
*.class
# Generated files
bin/
gen/
out/
# Gradle files
.gradle/
build/
# Local configuration file (sdk path, etc)
local.properties
# Proguard folder generated by Eclipse
proguard/
# Log Files
*.log
# Android Studio Navigation editor temp files
.navigation/
# Android Studio captures folder
captures/
# Intellij
*.iml
.idea/workspace.xml
.idea/tasks.xml
.idea/gradle.xml
.idea/dictionaries
.idea/libraries
# External native build folder generated in Android Studio 2.2 and later
.externalNativeBuild
# Freeline
freeline.py
freeline/
freeline_project_description.json
### Android Patch ###
gen-external-apklibs
### AndroidStudio ###
# Covers files to be ignored for android development using Android Studio.
# Built application files
# Files for the ART/Dalvik VM
# Java class files
# Generated files
# Gradle files
.gradle
# Signing files
.signing/
# Local configuration file (sdk path, etc)
# Proguard folder generated by Eclipse
# Log Files
# Android Studio
/*/build/
/*/local.properties
/*/out
/*/*/build
/*/*/production
*.ipr
*~
*.swp
# Android Patch
# External native build folder generated in Android Studio 2.2 and later
# NDK
obj/
# IntelliJ IDEA
*.iws
/out/
# User-specific configurations
.idea/libraries/
.idea/.name
.idea/compiler.xml
.idea/copyright/profiles_settings.xml
.idea/encodings.xml
.idea/misc.xml
.idea/modules.xml
.idea/scopes/scope_settings.xml
.idea/vcs.xml
.idea/jsLibraryMappings.xml
.idea/datasources.xml
.idea/dataSources.ids
.idea/sqlDataSources.xml
.idea/dynamic.xml
.idea/uiDesigner.xml
# OS-specific files
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db
# Legacy Eclipse project files
.classpath
.project
# Mobile Tools for Java (J2ME)
.mtj.tmp/
# Package Files #
*.war
*.ear
# virtual machine crash logs (Reference: http://www.java.com/en/download/help/error_hotspot.xml)
hs_err_pid*
## Plugin-specific files:
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
atlassian-ide-plugin.xml
# Mongo Explorer plugin
.idea/mongoSettings.xml
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
### AndroidStudio Patch ###
!/gradle/wrapper/gradle-wrapper.jar
### Windows ###
# Windows thumbnail cache files
ehthumbs_vista.db
# Folder config file
Desktop.ini
# Recycle Bin used on file shares
$RECYCLE.BIN/
# Windows Installer files
*.cab
*.msi
*.msm
*.msp
# Windows shortcuts
*.lnk
# End of https://www.gitignore.io/api/android,windows,androidstudio
/.idea/gradle.xml
/.idea/misc.xml
/.idea
/.idea/modules.xml
/.idea/gradle.xml
/.idea/misc.xml

View File

@ -1,33 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>SafeDispatch</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.ApkBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View File

@ -1,3 +0,0 @@
#Thu Nov 24 10:30:15 EET 2011
eclipse.preferences.version=1
filesCopiedToWebInfLib=

View File

@ -1,12 +0,0 @@
#Fri Dec 09 16:13:31 EET 2011
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.6

View File

@ -1,75 +0,0 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.safemobile.dispatch_demo"
android:versionCode="9"
android:versionName="1.0.9" >
<uses-sdk android:minSdkVersion="8"
android:targetSdkVersion="19" />
<!-- require OpenGL ES version 2 for Google Maps -->
<uses-feature
android:glEsVersion="0x00020000"
android:required="true"/>
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<!-- The following two permissions are not required to use
Google Maps Android API v2, but are recommended. -->
<!--
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
-->
<uses-permission android:name="android.permission.RECORD_AUDIO"></uses-permission>
<!-- <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission> -->
<!-- <uses-permission android:name="android.permission.BLUETOOTH"></uses-permission> -->
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"></uses-permission>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission>
<uses-feature android:name="android.hardware.camera"/>
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false"/>
<uses-feature android:name="android.hardware.camera.flash" android:required="false"/>
<application
android:configChanges="orientation|screenSize"
android:icon="@drawable/icon"
android:label="@string/app_name"
android:screenOrientation="landscape"
android:theme="@style/Theme.Safedispatch">
<uses-library android:name="com.google.android.maps" android:required="false"/>
<service android:name="com.safemobile.services.TCPService" />
<meta-data android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="@string/googleMapsApiv2" />
<activity
android:name="SDMobileActivity"
android:label="@string/app_name_demo"
android:configChanges="orientation|screenSize"
android:screenOrientation="landscape" >
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity android:name="SetupActivity" android:configChanges="orientation|screenSize" android:screenOrientation="landscape" ></activity>
<activity android:name="TabLayoutActivity" android:configChanges="orientation|screenSize" android:screenOrientation="landscape" ></activity>
<activity android:name="LiveActivity" android:configChanges="orientation|screenSize" android:screenOrientation="landscape" ></activity>
<activity android:name="HistoryActivity" android:configChanges="orientation|screenSize" android:screenOrientation="landscape" ></activity>
<activity android:name="MessagesActivity" android:configChanges="orientation|screenSize" android:screenOrientation="landscape" ></activity>
<activity android:name="AlarmActivity" android:configChanges="orientation|screenSize" android:screenOrientation="landscape" ></activity>
<activity android:name="RadioActivity" android:configChanges="orientation|screenSize" android:screenOrientation="landscape" ></activity>
<activity android:name="RecordingsActivity" android:configChanges="orientation|screenSize" android:screenOrientation="landscape"></activity>
<activity android:name="EmptyActivity" android:configChanges="orientation|screenSize" android:screenOrientation="landscape" ></activity>
<activity android:name="NotificationActivity" android:configChanges="orientation|screenSize" android:screenOrientation="landscape" ></activity>
</application>
</manifest>

View File

@ -1,57 +0,0 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.safemobile.safedispatchmobile"
android:versionCode="4"
android:versionName="1.0.4" >
<uses-sdk android:minSdkVersion="7"
android:targetSdkVersion="15" />
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.INTERNET" />
<!-- <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"></uses-permission> -->
<!-- <uses-permission android:name="android.permission.ACCESS_LOCATION"></uses-permission> -->
<!-- <uses-permission android:name="android.permission.ACCESS_GPS"></uses-permission> -->
<!-- <uses-permission android:name="android.permission.ACCESS_ASSISTED_GPS"></uses-permission> -->
<uses-permission android:name="android.permission.RECORD_AUDIO"></uses-permission>
<!-- <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission> -->
<!-- <uses-permission android:name="android.permission.BLUETOOTH"></uses-permission> -->
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"></uses-permission>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission>
<uses-feature android:name="android.hardware.camera"/>
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false"/>
<uses-feature android:name="android.hardware.camera.flash" android:required="false"/>
<application
android:configChanges="orientation|screenSize"
android:icon="@drawable/icon"
android:label="@string/app_name"
android:screenOrientation="landscape"
android:theme="@style/Theme.NoBackground">
<uses-library android:name="com.google.android.maps" android:required="false"/>
<service android:name="com.safemobile.services.TCPService" />
<activity
android:name="SDMobileActivity"
android:label="@string/app_name"
android:configChanges="orientation|screenSize"
android:screenOrientation="landscape" >
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity android:name="SetupActivity" android:configChanges="orientation|screenSize" android:screenOrientation="landscape" ></activity>
<activity android:name="TabLayoutActivity" android:configChanges="orientation|screenSize" android:screenOrientation="landscape" ></activity>
<activity android:name="LiveActivity" android:configChanges="orientation|screenSize" android:screenOrientation="landscape" ></activity>
<activity android:name="HistoryActivity" android:configChanges="orientation|screenSize" android:screenOrientation="landscape" ></activity>
<activity android:name="MessagesActivity" android:configChanges="orientation|screenSize" android:screenOrientation="landscape" ></activity>
<activity android:name="AlarmActivity" android:configChanges="orientation|screenSize" android:screenOrientation="landscape" ></activity>
<activity android:name="RadioActivity" android:configChanges="orientation|screenSize" android:screenOrientation="landscape" ></activity>
<activity android:name="RecordingsActivity" android:configChanges="orientation|screenSize" android:screenOrientation="landscape"></activity>
<activity android:name="EmptyActivity" android:configChanges="orientation|screenSize" android:screenOrientation="landscape" ></activity>
<activity android:name="NotificationActivity" android:configChanges="orientation|screenSize" android:screenOrientation="landscape" ></activity>
</application>
</manifest>

View File

@ -1,55 +0,0 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.safemobile.safedispatchmobiledemo"
android:versionCode="4"
android:versionName="1.0.4" >
<uses-sdk android:minSdkVersion="7"
android:targetSdkVersion="15" />
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.INTERNET" />
<!-- <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"></uses-permission> -->
<!-- <uses-permission android:name="android.permission.ACCESS_LOCATION"></uses-permission> -->
<!-- <uses-permission android:name="android.permission.ACCESS_GPS"></uses-permission> -->
<!-- <uses-permission android:name="android.permission.ACCESS_ASSISTED_GPS"></uses-permission> -->
<uses-permission android:name="android.permission.RECORD_AUDIO"></uses-permission>
<!-- <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission> -->
<!-- <uses-permission android:name="android.permission.BLUETOOTH"></uses-permission> -->
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"></uses-permission>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission>
<uses-feature android:name="android.hardware.camera"/>
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false"/>
<uses-feature android:name="android.hardware.camera.flash" android:required="false"/>
<application
android:configChanges="orientation|screenSize"
android:icon="@drawable/icon_demo"
android:label="@string/app_name_demo"
android:screenOrientation="landscape"
android:theme="@style/Theme.NoBackground">
<uses-library android:name="com.google.android.maps" android:required="false"/>
<activity
android:name="SDMobileActivity"
android:label="@string/app_name_demo"
android:configChanges="orientation|screenSize"
android:screenOrientation="landscape" >
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity android:name="SetupActivity" android:configChanges="orientation|screenSize" android:screenOrientation="landscape" ></activity>
<activity android:name="TabLayoutActivity" android:configChanges="orientation|screenSize" android:screenOrientation="landscape" ></activity>
<activity android:name="LiveActivity" android:configChanges="orientation|screenSize" android:screenOrientation="landscape" ></activity>
<activity android:name="HistoryActivity" android:configChanges="orientation|screenSize" android:screenOrientation="landscape" ></activity>
<activity android:name="MessagesActivity" android:configChanges="orientation|screenSize" android:screenOrientation="landscape" ></activity>
<activity android:name="AlarmActivity" android:configChanges="orientation|screenSize" android:screenOrientation="landscape" ></activity>
<activity android:name="RadioActivity" android:configChanges="orientation|screenSize" android:screenOrientation="landscape" ></activity>
<activity android:name="RecordingsActivity" android:configChanges="orientation|screenSize" android:screenOrientation="landscape"></activity>
<activity android:name="EmptyActivity" android:configChanges="orientation|screenSize" android:screenOrientation="landscape" ></activity>
<activity android:name="NotificationActivity" android:configChanges="orientation|screenSize" android:screenOrientation="landscape" ></activity>
</application>
</manifest>

22
build.gradle Normal file
View File

@ -0,0 +1,22 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
maven {
url 'https://maven.google.com/'
name 'Google'
}
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.1.2'
classpath 'com.google.android.libraries.mapsplatform.secrets-gradle-plugin:secrets-gradle-plugin:2.0.1'
}
}
allprojects {
repositories {
jcenter()
google()
}
}

41
gradle.properties Normal file
View File

@ -0,0 +1,41 @@
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# Default value: -Xmx10248m -XX:MaxPermSize=256m
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
VERSION_NAME=1.2
# Increase memory allotted to JVM
org.gradle.jvmargs=-Xmx2048M
#Xmx1536M
#org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
# Enable Gradle Daemon
#org.gradle.daemon=true
# Enable Configure on demand
#org.gradle.configureondemand=true
# Enable parallel builds
org.gradle.parallel=true
android.useAndroidX=true
android.enableJetifier=true
# Enable Build Cache
#android.enableBuildCache=true
# Enable simple gradle caching
#org.gradle.caching=true

BIN
gradle/wrapper/gradle-wrapper.jar vendored Normal file

Binary file not shown.

View File

@ -0,0 +1,6 @@
#Thu Mar 10 10:35:08 EET 2022
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME

185
gradlew vendored Normal file
View File

@ -0,0 +1,185 @@
#!/usr/bin/env sh
#
# Copyright 2015 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
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='"-Xmx64m" "-Xms64m"'
# 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
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
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
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin or MSYS, switch paths to Windows format before running java
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; 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`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=`expr $i + 1`
done
case $i in
0) set -- ;;
1) set -- "$args0" ;;
2) set -- "$args0" "$args1" ;;
3) set -- "$args0" "$args1" "$args2" ;;
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=`save "$@"`
# 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"
exec "$JAVACMD" "$@"

89
gradlew.bat vendored Normal file
View File

@ -0,0 +1,89 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@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 Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
@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="-Xmx64m" "-Xms64m"
@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 execute
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 execute
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
: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 %*
: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

85
import-summary.txt Normal file
View File

@ -0,0 +1,85 @@
ECLIPSE ANDROID PROJECT IMPORT SUMMARY
======================================
Manifest Merging:
-----------------
Your project uses libraries that provide manifests, and your Eclipse
project did not explicitly turn on manifest merging. In Android Gradle
projects, manifests are always merged (meaning that contents from your
libraries' manifests will be merged into the app manifest. If you had
manually copied contents from library manifests into your app manifest
you may need to remove these for the app to build correctly.
Ignored Files:
--------------
The following files were *not* copied into the new Gradle project; you
should evaluate whether these are still needed in your project and if
so manually move them:
From LibSafeMobile:
* proguard-project.txt
* safemobile.keystore
From SafeDispatch:
* AndroidManifest_Safe.xml
* AndroidManifest_demo.xml
* proguard.cfg
Replaced Jars with Dependencies:
--------------------------------
The importer recognized the following .jar files as third party
libraries and replaced them with Gradle dependencies instead. This has
the advantage that more explicit version information is known, and the
libraries can be updated automatically. However, it is possible that
the .jar file in your project was of an older version than the
dependency we picked, which could render the project not compileable.
You can disable the jar replacement in the import wizard and try again:
android-support-v4.jar => com.android.support:support-v4:18.0.0
Replaced Libraries with Dependencies:
-------------------------------------
The importer recognized the following library projects as third party
libraries and replaced them with Gradle dependencies instead. This has
the advantage that more explicit version information is known, and the
libraries can be updated automatically. However, it is possible that
the source files in your project were of an older version than the
dependency we picked, which could render the project not compileable.
You can disable the library replacement in the import wizard and try
again:
LibGooglePlayServices => [com.google.android.gms:play-services:+]
Moved Files:
------------
Android Gradle projects use a different directory structure than ADT
Eclipse projects. Here's how the projects were restructured:
In LibSafeMobile:
* AndroidManifest.xml => libSafeMobile\src\main\AndroidManifest.xml
* assets\ => libSafeMobile\src\main\assets
* libs\Citizen_Android_1063.jar => libSafeMobile\libs\Citizen_Android_1063.jar
* res\ => libSafeMobile\src\main\res\
* src\ => libSafeMobile\src\main\java\
* truck5_large.PNG => truck5_large.png
In SafeDispatch:
* disable.PNG => disable.png
* AndroidManifest.xml => safeDispatch\src\main\AndroidManifest.xml
* assets\ => safeDispatch\src\main\assets\
* lint.xml => safeDispatch\lint.xml
* res\ => safeDispatch\src\main\res\
* src\ => safeDispatch\src\main\java\
Next Steps:
-----------
You can now build the project. The Gradle project needs network
connectivity to download dependencies.
Bugs:
-----
If for some reason your project does not build, and you determine that
it is due to a bug or limitation of the Eclipse to Gradle importer,
please file a bug at http://b.android.com with category
Component-Tools.
(This import summary is for your information only, and can be deleted
after import once you are satisfied with the results.)

View File

@ -0,0 +1,44 @@
apply plugin: 'com.android.library'
apply plugin: 'com.google.android.libraries.mapsplatform.secrets-gradle-plugin'
android {
compileSdkVersion 31
buildToolsVersion "31.0.0"
defaultConfig {
minSdkVersion 21
targetSdkVersion 31
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
buildFeatures {
viewBinding false
}
}
dependencies {
implementation files('libs/Citizen_Android_1063.jar')
// support libraries
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'com.google.android.material:material:1.5.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'androidx.media:media:1.5.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
implementation 'com.google.android.gms:play-services-auth:20.1.0'
// Fused location provider with and without google services
implementation 'com.google.android.gms:play-services-location:19.0.1'
// Google maps library
implementation 'com.google.android.gms:play-services-maps:18.0.2'
// add Gson
implementation 'com.google.code.gson:gson:2.8.6'
}

Binary file not shown.

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.safemobile.lib"
android:versionCode="1"
android:versionName="1.0" >
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
</application>
</manifest>

View File

@ -0,0 +1,15 @@
package com.safemobile.activities;
import android.app.Activity;
import android.os.Bundle;
public class AbstractEmptyActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
}
}

View File

@ -0,0 +1,60 @@
package com.safemobile.activities;
import java.util.ArrayList;
import com.safemobile.lib.Vehicle;
import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import androidx.appcompat.app.AppCompatActivity;
public abstract class AbstractLiveActivity extends AppCompatActivity {
private AbstractSDParentActivity parentTab;
private Activity activity;
private Context context;
private Bundle savedInstanceState;
public abstract void refreshMap(); // --> updateMap
public abstract void vehiclesReceived(ArrayList<Vehicle> vehiclesList); // --> SaveVehicleInfo
public abstract void pollReceived(int position, double lat, double lng); // --> UpdatePoll
public abstract void vehicleStatusReceived(long imei, int opCode, int status); // --> UpdateOptions
public abstract void emergencyAlarmReceived(int position, double lat, double lng); // --> UpdateEmergencyAlarm
/** Misc */
public AbstractSDParentActivity getParentTab() {
return parentTab;
}
public void setParentTab(AbstractSDParentActivity parentTab) {
this.parentTab = parentTab;
}
public Activity getActivity() {
return activity;
}
public void setActivity(Activity activity) {
this.activity = activity;
}
public Context getContext() {
return context;
}
public void setContext(Context context) {
this.context = context;
}
public Bundle getSavedInstanceState() {
return savedInstanceState;
}
public void setSavedInstanceState(Bundle savedInstanceState) {
this.savedInstanceState = savedInstanceState;
}
}

View File

@ -0,0 +1,25 @@
package com.safemobile.activities;
import android.app.Activity;
import android.content.Context;
public abstract class AbstractMessagesActivity extends Activity {
/** Misc */
public AbstractParentActivity parentTab;
public Activity activity;
public Context context;
// GridView Type
public boolean LASTMESSAGES = true;
/*
public abstract void UpdateSMS(ArrayList<SMS> list);
public abstract void updateResultsInUi();
public abstract void selectVehicle4Sc_id(long sc_id);
public abstract void updateTCPConnection(boolean connected);
public abstract void ConfirmSMS(String data);
public abstract void NewSMS(String imei, String message);
public abstract void onContactsUpdate();
*/
}

View File

@ -0,0 +1,129 @@
package com.safemobile.activities;
import com.safemobile.bluetooth.BluetoothTether;
import com.safemobile.lib.AppParams;
import com.safemobile.lib.Contact;
import com.safemobile.lib.R;
import com.safemobile.services.TCPhandler;
import com.safemobile.services.TCPmsgParser;
import android.app.Activity;
import android.app.NotificationManager;
import android.app.TabActivity;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.os.Handler;
import android.view.View;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.ImageView;
import android.widget.RelativeLayout;
@SuppressWarnings("deprecation")
public abstract class AbstractParentActivity extends TabActivity {
/** UI Elements */
public RelativeLayout layoutLoading, relativeLayoutMenu;
public ImageView imageViewLoading;
/** Misc */
public Activity activity;
public Context context;
public NotificationManager mNotificationManager;
public boolean displayLogCat = false; // show logCat messages when TCP send was successful
/** Handler */
public Handler myHandler = new Handler();
/** BlueTooth Tether */
public BluetoothTether bluetoothTether = null;
/** Broadcast Receiver */
public BroadcastReceiver mReceiver = null;
/** TCP */
protected TCPhandler tcp = null;
protected TCPmsgParser tcpParser = null;
/** Methods */
//public void onCreate(Bundle savedInstanceState) { };
public abstract void startAudioHandler();
public abstract void getSetZoneAndChannel(int gwID, int rgwID, int zoneNR, int channelNR);
public abstract void getRadioStatus(int gwID, int rgwID);
public abstract void sendPTT(int callType, long id);
public abstract void sendCallType(int callType, long id);
public abstract void sendDekey();
public abstract void sendReset();
public abstract void sendEmergency(int onOFF);
public abstract void sendEmergency(int onOFF, long group_id);
public abstract void sendSMS(String seqId, long sc_id, String txt);
public abstract void displayToast(final String msg);
public abstract void whenBackPressed(AppParams.ActivityResult result);
public abstract void whenMenuPressed();
public abstract void changeLanguage();
public abstract Contact getVehicleById(long imei);
/** enable the menu buttons placed on the right side of the screen
* @param enable if set to true, the buttons will be enabled, else they will be disabled */
public abstract void enableMenuButtons(boolean enable);
public abstract void setRadioActivity(AbstractRadioActivity radioActivity);
public abstract void setMessagesActivity(AbstractMessagesActivity messageActivity);
/** Send a TCP Command using Async Tasks
* @param params Here you will add parameters for commands, and params[0] will be the Operation Code
* followed by others parameters accordingly to the command*/
public abstract void executeNetworkStuff(String[] params);
/** get if TCP is connected or disconnected or null */
public Object getTCPState() {
// return true if tcp connection is on, false if not connected and null
if(tcp!=null && tcp.isConnectionUP)
return "true";
else if(tcp!=null && !tcp.isConnectionUP)
return "false";
return null;
}
public void showMenu(boolean show)
{
if(relativeLayoutMenu != null)
{
// do not performe animation if already shown or already hidden
if((relativeLayoutMenu.isShown() && show) || (!relativeLayoutMenu.isShown() && !show))
;
else {
Animation anim = AnimationUtils.loadAnimation(this, R.anim.slide_out_bottom);
if(show)
anim = AnimationUtils.loadAnimation(this, R.anim.slide_in_bottom);
relativeLayoutMenu.clearAnimation();
relativeLayoutMenu.startAnimation(anim);
relativeLayoutMenu.setVisibility(show ? View.VISIBLE : View.GONE);
}
}
}
public boolean isMenuVisibile()
{
if(relativeLayoutMenu!= null && relativeLayoutMenu.getVisibility() == View.VISIBLE)
return true;
else
return false;
}
public abstract void unregisterReceivers(BroadcastReceiver receiver);
public abstract void cancelNotification(int drawable);
public abstract void stopTethering();
public abstract void stopAudio();
public abstract void stopTCP();
public abstract void recreateTCPConnection();
public abstract void removeITCPListener();
/*
public abstract void onResume();
public abstract void onStart();
public abstract void onPause();
*/
}

View File

@ -0,0 +1,264 @@
package com.safemobile.activities;
import java.util.ArrayList;
import java.util.ConcurrentModificationException;
import java.util.ListIterator;
import java.util.Timer;
import com.safemobile.lib.AppParams;
import com.safemobile.lib.Contact;
import com.safemobile.lib.radio.Channel;
import com.safemobile.lib.radio.Emerg;
import com.safemobile.lib.radio.IncCall;
import com.safemobile.lib.radio.Zone;
import android.app.Activity;
import android.app.Dialog;
import android.content.Context;
import android.os.Handler;
import android.widget.ArrayAdapter;
public abstract class AbstractRadioActivity extends Activity {
/** Misc */
public AbstractParentActivity parentTab;
public Activity activity;
public Context context;
public boolean emergencyOn = false;
public boolean pttONoff = false;
public IncCall incCall;
public String chMsg = "";
public Emerg emerg;
public Dialog dialogExternal;
// only in PadRadio
//public int radioID, GWID, zoneNR, chNR;
/** Handler */
public Handler myHandler = new Handler();
public Timer timerInCall, timerPTTOn, timerCallType;
/** Lists */
//public ArrayList<String> allContactsNames = new ArrayList<String>();
//public ArrayList<String> allGroupsNames = new ArrayList<String>();
//public ArrayList<Integer> allContactsIDs = new ArrayList<Integer>();
//public ArrayList<Integer> allGroupsIDs = new ArrayList<Integer>();
//public ArrayList<Zone> crtZones = new ArrayList<Zone>();
//public ArrayList<Channel> crtChannels = new ArrayList<Channel>();
public ArrayAdapter<String> adapter;
/** Methods */
//public void onCreate(Bundle savedInstanceState) { };
public abstract void startAudioHandler();
public void PTTclick(int type) { };
/*
public abstract void updateRadioTCPdown();
public abstract void UpdateRadios(ArrayList<RadioGW> radios);
public abstract void UpdateCallTypeChanged(IncCall response);
public abstract void UpdateZoneCH(int _radioID, int _GWID, int _zoneNR, int _chNR);
public abstract void UpdateRadioStatus(int status);
public abstract void UpdateIncCall (IncCall iCall);
public abstract String updateUI(EnumCallState radioStatus);
public abstract void UpdateEmerg (Emerg emerg);
public abstract void onContactsUpdate();
*/
public abstract void sendPTTFromBlueTooth(boolean on);
public abstract void ShowDialog(String title, String errorMsg);
public abstract void stopAudioHandler();
public abstract Object getAudioHandlerState();
public abstract void initUDP();
/** Stop the timer that ends call after one minute */
public void stopTimerInCall()
{
timerInCall.cancel();
timerInCall.purge();
timerInCall = null;
}
/** get Group Contact ID from Name */
public long getGroupID4Name_old(String name)
{
try {
ListIterator<Contact> it = AppParams.listContacts.listIterator();
while(it.hasNext())
{
Contact ctc = it.next();
// if searched name - return corresponding id
if(ctc.name.equals(name) && ctc.contactType == Contact.GROUP)
return ctc.id;
}
long id = -1;
// try to get id from name because the id was manual dialed
try {
id = Long.parseLong(name);
}
catch(Exception ex) {
}
return id;
}
catch (ConcurrentModificationException ex) {
return -1;
}
}
/** get Private Contact ID from Name */
public long getPrivateID4Name_old(String name)
{
try {
ListIterator<Contact> it = AppParams.listContacts.listIterator();
while(it.hasNext())
{
Contact ctc = it.next();
// if searched name - return corresponding id
if(ctc.name.equals(name) && ctc.contactType == Contact.PRIVATE)
return ctc.id;
}
long id = -1;
// try to get id from name because the id was manual dialed
try {
id = Long.parseLong(name);
}
catch(Exception ex) {
}
return id;
}
catch (ConcurrentModificationException ex) {
return -1;
}
}
/** get Private Contact ID from Name */
public String getName4PrivateID(long id)
{
try {
ListIterator<Contact> it = AppParams.listContacts.listIterator();
while(it.hasNext())
{
Contact ctc = it.next();
// if searched name - return corresponding id
if(ctc.id == id && ctc.contactType == Contact.PRIVATE)
return ctc.name;
}
return id+"";
}
catch (ConcurrentModificationException ex) {
return id+"";
}
}
/** get Group Contact ID from Name */
public String getName4GroupID(long id)
{
try {
ListIterator<Contact> it = AppParams.listContacts.listIterator();
while(it.hasNext())
{
Contact ctc = it.next();
// if searched name - return corresponding id
if(ctc.id == id && ctc.contactType == Contact.GROUP)
return ctc.name;
}
return id+"";
}
catch (ConcurrentModificationException ex) {
return id+"";
}
}
/** get zone number from spinner zoneName */
public int getNR4Zone_old(String zoneName)
{
for(Zone zone: AppParams.listZones)
if(zone.ZoneName.equals(zoneName))
return zone.id;
return -1;
}
/** get channel number from spinner chName */
public int getNR4CH_old(String chName)
{
for(Channel ch: AppParams.crtZone.channelList)
if(ch.chName.equals(chName))
return ch.id;
return -1;
}
/** get All Contacts Names */
public static ArrayList<String> getAllContactsName(String type, ArrayList<Contact> listContacts)
{
ArrayList<String> list = new ArrayList<String>();
try {
ListIterator<Contact> it = listContacts.listIterator();
while(it.hasNext())
{
Contact contact = it.next();
if(type.equals("Call"))
list.add(contact.name);
else {
if((type.equalsIgnoreCase("Private Call") && contact.contactType == Contact.PRIVATE) ||
(type.equalsIgnoreCase("Group Call") && contact.contactType == Contact.GROUP))
list.add(contact.name);
}
}
}
catch (ConcurrentModificationException ex) {
}
return list;
}
/** get All Contacts Names */
public static ArrayList<Long> getAllContactsIDs(String type, ArrayList<Contact> listContacts)
{
ArrayList<Long> list = new ArrayList<Long>();
try
{
ListIterator<Contact> it = listContacts.listIterator();
while(it.hasNext())
{
Contact contact = it.next();
if(type.equals("Call"))
list.add((long)contact.id);
if((type.equalsIgnoreCase("Private Call") && contact.contactType == Contact.PRIVATE) ||
(type.equalsIgnoreCase("Group Call") && contact.contactType == Contact.GROUP))
list.add((long)contact.id);
}
}
catch (ConcurrentModificationException ex) {
}
return list;
}
/** Display a toast Message */
public void displayToast(String msg)
{
parentTab.displayToast(msg);
}
}

View File

@ -0,0 +1,15 @@
package com.safemobile.activities;
import android.app.Activity;
import android.content.Context;
public abstract class AbstractRecordingsActivity extends Activity {
/** Misc */
public AbstractParentActivity parentTab;
public Activity activity;
public Context context;
public abstract void deleteSelected(final int position);
}

View File

@ -0,0 +1,323 @@
package com.safemobile.activities;
import java.util.ArrayList;
import java.util.Hashtable;
import com.safemobile.bluetooth.BluetoothTether;
import com.safemobile.lib.AppParams;
import com.safemobile.lib.SM;
import com.safemobile.lib.SuperVehicle;
import com.safemobile.lib.Vehicle;
import com.safemobile.services.TCPhandler;
import com.safemobile.services.TCPmsgParser;
import android.app.Activity;
import android.app.NotificationManager;
import android.app.TabActivity;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.os.Handler;
import android.widget.ImageView;
import android.widget.RelativeLayout;
@SuppressWarnings("deprecation")
public abstract class AbstractSDParentActivity extends TabActivity {
/** UI Elements */
public RelativeLayout layoutLoading;