2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-09-01 14:45:08 +00:00

Compare commits

..

1 Commits

Author SHA1 Message Date
Albert Vaca
5583aa69b9 Version should be 0.5 instead of 0.6! 2014-02-19 16:31:12 +01:00
149 changed files with 1393 additions and 6224 deletions

9
.gitignore vendored
View File

@@ -2,13 +2,6 @@ local.properties
.gradle/
.idea/
out/
gen/
bin/
build/
target/
classes/
gradle
gradlew
gradlew.bat
*.iml
*.keystore
classes/

View File

@@ -1,3 +0,0 @@
REVIEWBOARD_URL = "https://git.reviewboard.kde.org"
REPOSITORY = 'git://anongit.kde.org/kdeconnect-android'
TARGET_GROUPS = 'kdeconnect'

View File

@@ -7,7 +7,7 @@ function export_pot_file # First parameter will be the path of the pot file we h
{
potfile=$1
mkdir outdir
a2po export --android res/ --gettext outdir
a2po export --android src/main/res/ --gettext outdir
mv outdir/template.pot $potfile
rm -rf outdir
}
@@ -15,7 +15,7 @@ function export_pot_file # First parameter will be the path of the pot file we h
function import_po_files # First parameter will be a path that will contain several .po files with the format LANG.po
{
podir=$1
a2po import --android res/ --gettext $podir
a2po import --android src/main/res/ --gettext $podir
}

View File

@@ -1,29 +1,21 @@
buildscript {
repositories {
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.12.+' //Update to 14 when Studio 0.9 gets to beta
classpath 'com.android.tools.build:gradle:0.7.+'
}
}
apply plugin: 'com.android.application'
apply plugin: 'android'
android {
compileSdkVersion 21
buildToolsVersion '21.1.1'
compileSdkVersion 19
buildToolsVersion "19"
defaultConfig {
minSdkVersion 9
targetSdkVersion 21
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['resources']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
targetSdkVersion 19
}
packagingOptions {
exclude "META-INF/DEPENDENCIES"
@@ -32,22 +24,17 @@ android {
exclude "META-INF/LICENSE.txt"
exclude "META-INF/NOTICE.txt"
}
lintOptions {
abortOnError false
}
buildTypes {
}
}
dependencies {
repositories {
mavenCentral()
}
compile 'com.android.support:support-v4:21.0.2'
compile 'com.android.support:appcompat-v7:21.0.2'
compile 'org.apache.mina:mina-core:2.0.9'
compile "com.android.support:support-v4:19.0.+"
compile "com.android.support:appcompat-v7:19.0.+"
compile "org.apache.mina:mina-core:2.0.+"
compile 'org.bouncycastle:bcprov-jdk16:1.45'
compile 'org.apache.sshd:sshd-core:0.8.0'
compile 'org.bouncycastle:bcprov-jdk16:1.46'
compile 'tomcat:tomcat-apr:5.5.+'
//compile fileTree(dir: 'libs', include: '*.jar')
}

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

Binary file not shown.

View File

@@ -0,0 +1,6 @@
#Sun Jan 12 12:44:14 MSK 2014
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=http\://services.gradle.org/distributions/gradle-1.9-all.zip

164
gradlew vendored Executable file
View File

@@ -0,0 +1,164 @@
#!/usr/bin/env bash
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# 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"
# 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\"`/" >&-
APP_HOME="`pwd -P`"
cd "$SAVED" >&-
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" ] ; 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, switch paths to Windows format before running java
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
# 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=$((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
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
function splitJvmOpts() {
JVM_OPTS=("$@")
}
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"

90
gradlew.bat vendored Normal file
View File

@@ -0,0 +1,90 @@
@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

1067
icon.svg

File diff suppressed because it is too large Load Diff

Before

Width:  |  Height:  |  Size: 35 KiB

85
kdeconnect-android.iml Normal file
View File

@@ -0,0 +1,85 @@
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="android" name="Android">
<configuration>
<option name="SELECTED_BUILD_VARIANT" value="debug" />
<option name="ASSEMBLE_TASK_NAME" value="assembleDebug" />
<option name="COMPILE_JAVA_TASK_NAME" value="compileDebugJava" />
<option name="ASSEMBLE_TEST_TASK_NAME" value="assembleDebugTest" />
<option name="SOURCE_GEN_TASK_NAME" value="generateDebugSources" />
<option name="ALLOW_USER_CONFIGURATION" value="false" />
<option name="MANIFEST_FILE_RELATIVE_PATH" value="/src/main/AndroidManifest.xml" />
<option name="RES_FOLDER_RELATIVE_PATH" value="/src/main/res" />
<option name="RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/src/main/res" />
<option name="ASSETS_FOLDER_RELATIVE_PATH" value="/src/main/assets" />
</configuration>
</facet>
<facet type="android-gradle" name="Android-Gradle">
<configuration>
<option name="GRADLE_PROJECT_PATH" value=":" />
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" inherit-compiler-output="false">
<output url="file://$MODULE_DIR$/build/classes/debug" />
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/build/source/r/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/source/aidl/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/source/buildConfig/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/source/rs/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/res/rs/debug" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/build/source/r/test/debug" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/build/source/aidl/test/debug" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/build/source/buildConfig/test/debug" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/build/source/rs/test/debug" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/build/res/rs/test/debug" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/aidl" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/assets" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/jni" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/rs" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/res" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/main/aidl" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/assets" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/jni" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/rs" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/res" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/instrumentTest/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/instrumentTest/assets" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/instrumentTest/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/instrumentTest/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/instrumentTest/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/instrumentTest/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/instrumentTest/resources" type="java-test-resource" />
<excludeFolder url="file://$MODULE_DIR$/.git" />
<excludeFolder url="file://$MODULE_DIR$/.gradle" />
<excludeFolder url="file://$MODULE_DIR$/.idea" />
<excludeFolder url="file://$MODULE_DIR$/build/apk" />
<excludeFolder url="file://$MODULE_DIR$/build/assets" />
<excludeFolder url="file://$MODULE_DIR$/build/bundles" />
<excludeFolder url="file://$MODULE_DIR$/build/classes" />
<excludeFolder url="file://$MODULE_DIR$/build/dependency-cache" />
<excludeFolder url="file://$MODULE_DIR$/build/incremental" />
<excludeFolder url="file://$MODULE_DIR$/build/libs" />
<excludeFolder url="file://$MODULE_DIR$/build/manifests" />
<excludeFolder url="file://$MODULE_DIR$/build/res" />
<excludeFolder url="file://$MODULE_DIR$/build/symbols" />
<excludeFolder url="file://$MODULE_DIR$/build/tmp" />
</content>
<orderEntry type="jdk" jdkName="Android API 19 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" exported="" name="sshd-core-0.8.0" level="project" />
<orderEntry type="library" exported="" name="tomcat-apr-5.5.15" level="project" />
<orderEntry type="library" exported="" name="slf4j-api-1.6.6" level="project" />
<orderEntry type="library" exported="" name="bcprov-jdk16-1.45" level="project" />
<orderEntry type="library" exported="" name="mina-core-2.0.7" level="project" />
<orderEntry type="library" exported="" name="support-v4-19.0.1" level="project" />
<orderEntry type="library" exported="" name="ComAndroidSupportAppcompatV71901.aar" level="project" />
</component>
</module>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 351 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 451 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 468 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 431 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

View File

@@ -1,13 +0,0 @@
<ListView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/buttons_list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
android:fillViewport="true"
android:divider="@null"
tools:context=".MainActivity"
/>

View File

@@ -1,27 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/mousepad_view">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/mousepad_info"
android:gravity="center"
style="@android:style/TextAppearance.Medium"
android:layout_centerInParent="true"
android:padding="12dip" />
<view
android:layout_width="wrap_content"
android:layout_height="wrap_content"
class="org.kde.kdeconnect.Plugins.MousePadPlugin.KeyListenerView"
android:id="@+id/keyListener"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="58dp" />
</RelativeLayout>

View File

@@ -1,36 +0,0 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
android:orientation="vertical">
<ListView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@android:id/list"
android:layout_weight="1"
/>
<TextView
android:layout_width="fill_parent"
android:layout_height="100dp"
android:text="@string/custom_dev_list_help"/>
<EditText
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:imeOptions="actionSend"
android:id="@+id/ip_edittext"/>
<Button
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/add_host"
android:onClick="addNewIp"
android:id="@android:id/button1"/>
</LinearLayout>

View File

@@ -1,18 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:kdeconnect="http://schemas.android.com/apk/res-auto/android">
<item android:id="@+id/menu_show_keyboard"
android:title="@string/show_keyboard"
android:icon="@drawable/ic_action_keyboard"
kdeconnect:showAsAction="ifRoom" />
<item android:id="@+id/menu_right_click"
android:title="@string/right_click"
kdeconnect:showAsAction="never" />
<item android:id="@+id/menu_middle_click"
android:title="@string/middle_click"
kdeconnect:showAsAction="never" />
</menu>

View File

@@ -1,84 +0,0 @@
<?xml version='1.0' encoding='utf-8'?>
<resources>
<string name="pref_plugin_telephony">Известяване за обаждания</string>
<string name="pref_plugin_telephony_desc">Изпращане на уведомления за СМС и обаждания</string>
<string name="pref_plugin_battery">Доклад за батерията</string>
<string name="pref_plugin_battery_desc">Периодично съобщаване за състоянието на батерията</string>
<string name="pref_plugin_sftp">Достъп до файловата система</string>
<string name="pref_plugin_sftp_desc">Позволява отдалечен достъп до файловата система на телефона</string>
<string name="pref_plugin_clipboard">Синхронизиране на буфера</string>
<string name="pref_plugin_clipboard_desc">Споделяне съдържанието на буфера</string>
<string name="pref_plugin_mousepad">Отдалечен контрол</string>
<string name="pref_plugin_mpris">Отдалечен мултимедиен контрол</string>
<string name="pref_plugin_mpris_desc">Управление на звук/видео от телефона</string>
<string name="pref_plugin_ping">Пинг</string>
<string name="pref_plugin_ping_desc">Изпращане и получаване на пинг</string>
<string name="pref_plugin_notifications">Синхронизиране на уведомленията</string>
<string name="pref_plugin_notifications_desc">Достъп до уведомленията от други устройства</string>
<string name="plugin_not_available">Тази функция не е налична във вашата версия на Андроид</string>
<string name="device_list_empty">Няма устройства</string>
<string name="ok">Добре</string>
<string name="cancel">Отказ</string>
<string name="open_settings">Отваряне на настройките</string>
<string name="no_permissions">Трябва да осигурите права за достъп до уведомленията</string>
<string name="send_ping">Изпращане на пинг</string>
<string name="open_mpris_controls">Отваряне на отдалечен контрол</string>
<string name="open_mousepad">Отваряне на отдалечен контрол</string>
<string name="category_connected_devices">Свързани устройства</string>
<string name="category_not_paired_devices">Несдвоени устройства</string>
<string name="category_remembered_devices">Запомнени устройства</string>
<string name="plugins_failed_to_load">Неуспешно зареждане на приставки (докоснете за подробности)</string>
<string name="device_menu_plugins">Изберете приставки</string>
<string name="device_menu_unpair">Разкачване</string>
<string name="device_not_reachable">Устройството е недостъпно</string>
<string name="unknown_device">Неизвестно устройство</string>
<string name="error_not_reachable">Устройството е недостъпно</string>
<string name="error_already_requested">Вече е заявено сдвояване</string>
<string name="error_already_paired">Устройството вече е сдвоено</string>
<string name="error_could_not_send_package">Пакетът не може да бъде изпратен</string>
<string name="error_timed_out">Просрочка</string>
<string name="error_canceled_by_user">Отхвърлена от потребителя</string>
<string name="error_canceled_by_other_peer">Отказана от другата страна</string>
<string name="error_invalid_key">Получен е неправилен ключ</string>
<string name="pair_requested">Заявено е сдвояване</string>
<string name="pairing_request_from">Заявено е сдвояване от %1s</string>
<string name="incoming_file_title">Заявено е сдвояване от %1s</string>
<string name="incoming_file_text">%s</string>
<string name="tap_to_answer">Докоснете за да отговорите</string>
<string name="reconnect">Ново свързване</string>
<string name="device_not_paired">Устройството не е сдвоено</string>
<string name="request_pairing">Заявка за сдвояване</string>
<string name="pairing_accept">Приемане</string>
<string name="pairing_reject">Отхвърляне</string>
<string name="device">Устройство</string>
<string name="pair_device">Сдвояване с устройството</string>
<string name="remote_control">Отдалечен контрол</string>
<string name="settings">Настройки на KDE Connect</string>
<string name="mpris_play">Възпроизвеждане</string>
<string name="mpris_previous">Предишен</string>
<string name="mpris_rew">Превъртане назад</string>
<string name="mpris_ff">Превъртане напред</string>
<string name="mpris_next">Следващ</string>
<string name="mpris_volume">Сила на звука</string>
<string name="mpris_settings">Отдалечен мултимедиен контрол</string>
<string name="share_to">Споделяне...</string>
<string name="protocol_version_older">Това устройство използва стара версия на протокола</string>
<string name="protocol_version_newer">Това устройство използва по-нова версия на протокола</string>
<string name="general_settings">Общи настройки</string>
<string name="plugin_settings">Общи настройки</string>
<string name="plugin_settings_with_name">Отваряне на настройките</string>
<string name="device_name">Име на устройството</string>
<string name="device_name_preference_summary">%s</string>
<string name="invalid_device_name">Невалидно име на устройство</string>
<string name="custom_devices_settings">Няма устройства</string>
<string name="custom_device_list">Няма устройства</string>
<string name="custom_device_list_summary">Няма устройства</string>
<string name="share_notification_preference">Синхронизиране на уведомленията</string>
<string-array name="mpris_time_entries">
<item>10 seconds</item>
<item>20 seconds</item>
<item>30 seconds</item>
<item>1 minute</item>
<item>2 minutes</item>
</string-array>
</resources>

View File

@@ -1,111 +0,0 @@
<?xml version='1.0' encoding='utf-8'?>
<resources>
<string name="pref_plugin_telephony">Notificador de telefonia</string>
<string name="pref_plugin_telephony_desc">Envia notificacions pels SMS i les trucades</string>
<string name="pref_plugin_battery">Informe de la bateria</string>
<string name="pref_plugin_battery_desc">Informa periòdicament sobre l\'estat de la bateria</string>
<string name="pref_plugin_sftp">Exposa el sistema de fitxers</string>
<string name="pref_plugin_sftp_desc">Permet navegar de forma remota pel sistema de fitxers del telèfon</string>
<string name="pref_plugin_clipboard">Sincronitza el porta-retalls</string>
<string name="pref_plugin_clipboard_desc">Comparteix el contingut del porta-retalls</string>
<string name="pref_plugin_mousepad">Entrada remota</string>
<string name="pref_plugin_mousepad_desc">Usa el vostre telèfon com un ratolí i un teclat</string>
<string name="pref_plugin_mpris">Comandament a distància multimèdia</string>
<string name="pref_plugin_mpris_desc">Controla l\'àudio i el vídeo del vostre telèfon</string>
<string name="pref_plugin_ping">Ping</string>
<string name="pref_plugin_ping_desc">Envia i rep els pings</string>
<string name="pref_plugin_notifications">Sincronitza les notificacions</string>
<string name="pref_plugin_notifications_desc">Accedeix a les vostres notificacions des d\'altres dispositius</string>
<string name="pref_plugin_sharereceiver">Receptor de compartits</string>
<string name="pref_plugin_sharereceiver_desc">Desa els fitxers entrants a l\'emmagatzematge del telèfon</string>
<string name="plugin_not_available">Aquesta característica no està disponible en la vostra versió d\'Android</string>
<string name="device_list_empty">No hi ha cap dispositiu</string>
<string name="ok">D\'acord</string>
<string name="cancel">Cancel·la</string>
<string name="open_settings">Obre l\'arranjament</string>
<string name="no_permissions">Us caldrà concedir permís per accedir a les notificacions</string>
<string name="send_ping">Envia un ping</string>
<string name="open_mpris_controls">Obre el comandament a distància</string>
<string name="open_mousepad">Obre el control pel plafó tàctil</string>
<string name="mousepad_info">Moveu un dit per la pantalla per a moure el cursor del ratolí</string>
<string name="mousepad_double_tap_settings_title">Estableix l\'acció de tocar amb dos dits</string>
<string name="mousepad_triple_tap_settings_title">Estableix l\'acció de tocar amb tres dits</string>
<string name="mousepad_right_click">Clic dret</string>
<string name="mousepad_middle_click">Clic del mig</string>
<string name="category_connected_devices">Dispositius connectats</string>
<string name="category_not_paired_devices">Dispositius sense aparellar</string>
<string name="category_remembered_devices">Dispositius recordats</string>
<string name="plugins_failed_to_load">Els connectors han fallat en carregar-los (puntegeu per a més informació):</string>
<string name="device_menu_plugins">Selecció dels connectors</string>
<string name="device_menu_unpair">Desparella</string>
<string name="device_not_reachable">No s\'ha pogut accedir al dispositiu parell</string>
<string name="unknown_device">Dispositiu desconegut</string>
<string name="error_not_reachable">No es pot accedir al dispositiu</string>
<string name="error_already_requested">Ja s\'ha demanat aparellar</string>
<string name="error_already_paired">El dispositiu ja està aparellat</string>
<string name="error_could_not_send_package">No s\'ha pogut enviar el paquet</string>
<string name="error_timed_out">Ha excedit el temps</string>
<string name="error_canceled_by_user">Cancel·lat per l\'usuari</string>
<string name="error_canceled_by_other_peer">Cancel·lat per l\'altre parell</string>
<string name="error_invalid_key">S\'ha rebut una clau no vàlida</string>
<string name="pair_requested">S\'ha demanat aparellar</string>
<string name="pairing_request_from">S\'ha demanat aparellar des de %1s</string>
<string name="received_url_title">S\'ha rebut un vincle des de %1s</string>
<string name="received_url_text">Puntegeu per obrir «%1s»</string>
<string name="incoming_file_title">Fitxer entrant des de %1s</string>
<string name="incoming_file_text">%1s</string>
<string name="received_file_title">Fitxer rebut des de %1s</string>
<string name="received_file_text">Puntegeu per obrir «%1s»</string>
<string name="tap_to_answer">Puntegeu per a respondre</string>
<string name="reconnect">Reconnecta</string>
<string name="right_click">Envia un clic del botó dret</string>
<string name="middle_click">Envia un clic del botó del mig</string>
<string name="show_keyboard">Mostra el teclat</string>
<string name="device_not_paired">El dispositiu no està aparellat</string>
<string name="request_pairing">Demana aparellar</string>
<string name="pairing_accept">Accepta</string>
<string name="pairing_reject">Rebutja</string>
<string name="device">Dispositiu</string>
<string name="pair_device">Dispositiu parell</string>
<string name="remote_control">Comandament a distància</string>
<string name="settings">Arranjament del KDE Connect</string>
<string name="mpris_play">Reprodueix</string>
<string name="mpris_previous">Anterior</string>
<string name="mpris_rew">Rebobina</string>
<string name="mpris_ff">Avanç ràpid</string>
<string name="mpris_next">Següent</string>
<string name="mpris_volume">Volum</string>
<string name="mpris_settings">Arranjament multimèdia</string>
<string name="mpris_time_settings_title">Interval de temps</string>
<string name="mpris_time_settings_summary">Ajusta el temps per avançar o rebobinar un fitxer multimèdia.</string>
<string name="share_to">Comparteix amb...</string>
<string name="protocol_version_older">Aquest dispositiu usa una versió antiga del protocol</string>
<string name="protocol_version_newer">Aquest dispositiu usa una versió nova del protocol</string>
<string name="general_settings">Arranjament general</string>
<string name="plugin_settings">Arranjament</string>
<string name="plugin_settings_with_name">Ajustaments de %s</string>
<string name="device_name">Nom del dispositiu</string>
<string name="device_name_preference_summary">%s</string>
<string name="invalid_device_name">El nom del dispositiu no és vàlid</string>
<string name="shareplugin_text_saved">S\'ha rebut text i s\'ha desat al porta-retalls</string>
<string name="custom_devices_settings">Llista personalitzada de dispositius</string>
<string name="custom_device_list">Llista personalitzada de dispositius</string>
<string name="custom_device_list_summary">Llista personalitzada de dispositius</string>
<string name="share_notification_preference">Rebombori de les notificacions</string>
<string name="share_notification_preference_summary">Vibra i reprodueix un so en rebre un fitxer</string>
<string name="sftp_internal_storage">Emmagatzematge intern</string>
<string name="sftp_all_files">Tots els fitxers</string>
<string name="sftp_sdcard_num">Targeta SD %d</string>
<string name="sftp_sdcard">Targeta SD</string>
<string name="sftp_readonly">(només de lectura)</string>
<string name="sftp_camera">Imatges de la càmera</string>
<string name="add_host">Afegeix una màquina/IP</string>
<string name="custom_dev_list_help">Empreu aquesta opció només si el dispositiu no és detectat automàticament. Introduïu a sota l\'adreça IP o nom de la màquina i premeu el botó per afegir-lo a la llista. Seleccioneu un element existent per eliminar-lo de la llista.</string>
<string-array name="mpris_time_entries">
<item>10 segons</item>
<item>20 segons</item>
<item>30 segons</item>
<item>1 minut</item>
<item>2 minuts</item>
</string-array>
</resources>

View File

@@ -1,111 +0,0 @@
<?xml version='1.0' encoding='utf-8'?>
<resources>
<string name="pref_plugin_telephony">Upozornění telefonie</string>
<string name="pref_plugin_telephony_desc">Posílat upozornění na SMS a hovory</string>
<string name="pref_plugin_battery">Hlášení baterie</string>
<string name="pref_plugin_battery_desc">Periodicky hlásit stav baterky</string>
<string name="pref_plugin_sftp">Přístup k souborovému systému</string>
<string name="pref_plugin_sftp_desc">Umožní vám vzdáleně prohlížet souborový systém telefonu</string>
<string name="pref_plugin_clipboard">Synchronizace schránky</string>
<string name="pref_plugin_clipboard_desc">Sdílet obsah schránky</string>
<string name="pref_plugin_mousepad">Vzdálený vstup</string>
<string name="pref_plugin_mousepad_desc">Používejte svůj telefon jako myš a klávesnici</string>
<string name="pref_plugin_mpris">Vzdálené ovládání multimédií</string>
<string name="pref_plugin_mpris_desc">Ovládejte audio/video z vašeho telefonu</string>
<string name="pref_plugin_ping">Ping</string>
<string name="pref_plugin_ping_desc">Posílat a přijímat ping</string>
<string name="pref_plugin_notifications">Synchronizace upozornění</string>
<string name="pref_plugin_notifications_desc">Zpřístupněte si upozornění z jiných zařízení</string>
<string name="pref_plugin_sharereceiver">Sdílet příjemce</string>
<string name="pref_plugin_sharereceiver_desc">Ukládat příchozí soubory do úložiště telefonu</string>
<string name="plugin_not_available">Tato vlastnost není pro vaši verzi Androidu platná</string>
<string name="device_list_empty">Žádná zařízení</string>
<string name="ok">OK</string>
<string name="cancel">Zrušit</string>
<string name="open_settings">Otevřít nastavení</string>
<string name="no_permissions">Pro zpřístupnění upozornění potřebujete oprávnění</string>
<string name="send_ping">Poslat ping</string>
<string name="open_mpris_controls">Otevřít vzdálené ovládání</string>
<string name="open_mousepad">Otevřít dotykové ovládání</string>
<string name="mousepad_info">Pohybujte prstem po monitoru pro pohybování kurzorem myši</string>
<string name="mousepad_double_tap_settings_title">Nastavit činnost pro ťuknutí dvěma prsty</string>
<string name="mousepad_triple_tap_settings_title">Nastavit činnost pro ťuknutí třemi prsty</string>
<string name="mousepad_right_click">Kliknutí pravým tlačítkem myši</string>
<string name="mousepad_middle_click">Kliknutí prostředním tlačítkem myši</string>
<string name="category_connected_devices">Připojená zařízení</string>
<string name="category_not_paired_devices">Nespárovaná zařízení</string>
<string name="category_remembered_devices">Zapamatovaná zařízení</string>
<string name="plugins_failed_to_load">Moduly nebyly načteny (ťukněte pro více informací):</string>
<string name="device_menu_plugins">Vyberte moduly</string>
<string name="device_menu_unpair">Zrušit párování</string>
<string name="device_not_reachable">Spárované zařízení je nedostupné</string>
<string name="unknown_device">Neznámé zařízení</string>
<string name="error_not_reachable">Zařízení je nedostupné</string>
<string name="error_already_requested">Párování již bylo vyžádáno</string>
<string name="error_already_paired">Zařízení je již spárované</string>
<string name="error_could_not_send_package">Balíček nelze poslat</string>
<string name="error_timed_out">Čas vypršel</string>
<string name="error_canceled_by_user">Přerušeno uživatelem</string>
<string name="error_canceled_by_other_peer">Přerušeno druhým uživatelem</string>
<string name="error_invalid_key">Byl přijat neplatný klíč</string>
<string name="pair_requested">Bylo vyžádáno párování</string>
<string name="pairing_request_from">Požadavek o párování z %1s</string>
<string name="received_url_title">Přijat odkaz od %1s</string>
<string name="received_url_text">Ťukněte pro otevření \'%1s\'</string>
<string name="incoming_file_title">Příchozí soubor od %1s</string>
<string name="incoming_file_text">%1s</string>
<string name="received_file_title">Přijat soubor od %1s</string>
<string name="received_file_text">Ťukněte pro otevření \'%1s\'</string>
<string name="tap_to_answer">Ťukněte pro odpovězení</string>
<string name="reconnect">Znovu připojit</string>
<string name="right_click">Poslat kliknutí pravým tlačítkem</string>
<string name="middle_click">Poslat kliknutí prostředním tlačítkem</string>
<string name="show_keyboard">Zobrazit klávesnici</string>
<string name="device_not_paired">Zařízení není spárované</string>
<string name="request_pairing">Vyžádat párování</string>
<string name="pairing_accept">Přijmout</string>
<string name="pairing_reject">Odmítnout</string>
<string name="device">Zařízení</string>
<string name="pair_device">Spárovat zařízení</string>
<string name="remote_control">Vzdálené ovládání</string>
<string name="settings">Nastavení KDE Connect</string>
<string name="mpris_play">Přehrát</string>
<string name="mpris_previous">Předchozí</string>
<string name="mpris_rew">Přetočit zpět</string>
<string name="mpris_ff">Rychle vpřed</string>
<string name="mpris_next">Následující</string>
<string name="mpris_volume">Hlasitost</string>
<string name="mpris_settings">Nastavení multimédií</string>
<string name="mpris_time_settings_title">Časový interval</string>
<string name="mpris_time_settings_summary">Upravit čas pro rychlý posun multimediálním souborem vpřed a zpět.</string>
<string name="share_to">Sdílet s...</string>
<string name="protocol_version_older">Toto zařízení používá starou verzi protokolu</string>
<string name="protocol_version_newer">Toto zařízení používá novější verzi protokolu</string>
<string name="general_settings">Obecná nastavení</string>
<string name="plugin_settings">Nastavení</string>
<string name="plugin_settings_with_name">Nastavení %s</string>
<string name="device_name">Název zařízení</string>
<string name="device_name_preference_summary">%s</string>
<string name="invalid_device_name">Neplatný název zařízení</string>
<string name="shareplugin_text_saved">Přijatý text byl uložen do schránky</string>
<string name="custom_devices_settings">Seznam vlastních zařízení</string>
<string name="custom_device_list">Seznam vlastních zařízení</string>
<string name="custom_device_list_summary">Seznam vlastních zařízení</string>
<string name="share_notification_preference">Hlasitá upozornění</string>
<string name="share_notification_preference_summary">Vibrovat a přehrát melodii při přijímání souboru</string>
<string name="sftp_internal_storage">Interní úložiště</string>
<string name="sftp_all_files">Všechny soubory</string>
<string name="sftp_sdcard_num">SD karta %d</string>
<string name="sftp_sdcard">SD karta</string>
<string name="sftp_readonly">(pouze ke čtení)</string>
<string name="sftp_camera">Obrázky z fotoaparátu</string>
<string name="add_host">Přidat stroj/IP</string>
<string name="custom_dev_list_help">Použijte tuto možnost pouze pokud není vaše zařízení automaticky detekováno. Zadejte níže IP adresu a název hostitele a stiskněte tlačítko pro přidání do seznamu. Stiskněte existující položku pro odstranění ze seznamu.</string>
<string-array name="mpris_time_entries">
<item>10 sekund</item>
<item>20 sekund</item>
<item>30 sekund</item>
<item>1 minuta</item>
<item>2 minuty</item>
</string-array>
</resources>

View File

@@ -1,111 +0,0 @@
<?xml version='1.0' encoding='utf-8'?>
<resources>
<string name="pref_plugin_telephony">Notificador de telefonía</string>
<string name="pref_plugin_telephony_desc">Enviar notificaciones de SMS y llamadas</string>
<string name="pref_plugin_battery">Informe de la batería</string>
<string name="pref_plugin_battery_desc">Informar periódicamente del estado de la batería</string>
<string name="pref_plugin_sftp">Revelar el sistema de archivos</string>
<string name="pref_plugin_sftp_desc">Permite examinar de forma remota el sistema de archivos del teléfono</string>
<string name="pref_plugin_clipboard">Sincronización del portapapeles</string>
<string name="pref_plugin_clipboard_desc">Compartir el contenido del portapapeles</string>
<string name="pref_plugin_mousepad">Entrada remota</string>
<string name="pref_plugin_mousepad_desc">Usar su teléfono como ratón y teclado</string>
<string name="pref_plugin_mpris">Controles remotos multimedia</string>
<string name="pref_plugin_mpris_desc">Controlar audio y vídeo desde el teléfono</string>
<string name="pref_plugin_ping">Ping</string>
<string name="pref_plugin_ping_desc">Enviar y recibir pings</string>
<string name="pref_plugin_notifications">Sincronizar notificaciones</string>
<string name="pref_plugin_notifications_desc">Acceder a las notificaciones desde otros dispositivos</string>
<string name="pref_plugin_sharereceiver">Compartir receptor</string>
<string name="pref_plugin_sharereceiver_desc">Guardar archivos entrantes en el almacenamiento del teléfono</string>
<string name="plugin_not_available">Esta funcionalidad no está disponible en su versión de Android</string>
<string name="device_list_empty">Ningún dispositivo</string>
<string name="ok">Aceptar</string>
<string name="cancel">Cancelar</string>
<string name="open_settings">Abrir preferencias</string>
<string name="no_permissions">Debe otorgar permiso para acceder a las notificaciones</string>
<string name="send_ping">Enviar ping</string>
<string name="open_mpris_controls">Abrir control remoto</string>
<string name="open_mousepad">Abrir control del panel táctil</string>
<string name="mousepad_info">Mueva un dedo sobre la pantalla para mover el cursor del ratón</string>
<string name="mousepad_double_tap_settings_title">Establecer la acción al golpetear con dos dedos</string>
<string name="mousepad_triple_tap_settings_title">Establecer la acción al golpetear con tres dedos</string>
<string name="mousepad_right_click">Clic derecho</string>
<string name="mousepad_middle_click">Clic del botón central</string>
<string name="category_connected_devices">Dispositivos conectados</string>
<string name="category_not_paired_devices">Dispositivos no vinculados</string>
<string name="category_remembered_devices">Dispositivos recordados</string>
<string name="plugins_failed_to_load">Complementos cuya carga ha fallado (toque para más información):</string>
<string name="device_menu_plugins">Seleccionar complementos</string>
<string name="device_menu_unpair">Desvincular</string>
<string name="device_not_reachable">No se encuentra el dispositivo aparejado</string>
<string name="unknown_device">Dispositivo desconocido</string>
<string name="error_not_reachable">No se encuentra el dispositivo</string>
<string name="error_already_requested">Ya ha solicitado vincularse</string>
<string name="error_already_paired">Dispositivo ya vinculado</string>
<string name="error_could_not_send_package">No se puede enviar el paquete</string>
<string name="error_timed_out">Se ha agotado el tiempo</string>
<string name="error_canceled_by_user">Cancelado por el usuario</string>
<string name="error_canceled_by_other_peer">Cancelado por la otra parte</string>
<string name="error_invalid_key">Se ha recibido una clave no valida</string>
<string name="pair_requested">Vinculación solicitada</string>
<string name="pairing_request_from">Solicitud de vinculación de %1s</string>
<string name="received_url_title">Enlace recibido desde %1s</string>
<string name="received_url_text">Pulse para abrir «%1s»</string>
<string name="incoming_file_title">Archivo entrante desde %1s</string>
<string name="incoming_file_text">%1s</string>
<string name="received_file_title">Archivo recibido desde %1s</string>
<string name="received_file_text">Pulse para abrir «%1s»</string>
<string name="tap_to_answer">Toque para responder</string>
<string name="reconnect">Reconectar</string>
<string name="right_click">Enviar clic derecho</string>
<string name="middle_click">Enviar clic del botón central</string>
<string name="show_keyboard">Mostrar teclado</string>
<string name="device_not_paired">Dispositivo no vinculado</string>
<string name="request_pairing">Solicitar vinculación</string>
<string name="pairing_accept">Aceptar</string>
<string name="pairing_reject">Rechazar</string>
<string name="device">Dispositivo</string>
<string name="pair_device">Vincular dispositivo</string>
<string name="remote_control">Control remoto</string>
<string name="settings">Preferencias de KDE Connect</string>
<string name="mpris_play">Reproducir</string>
<string name="mpris_previous">Anterior</string>
<string name="mpris_rew">Rebobinar</string>
<string name="mpris_ff">Avance rápido</string>
<string name="mpris_next">Siguiente</string>
<string name="mpris_volume">Volumen</string>
<string name="mpris_settings">Preferencias multimedia</string>
<string name="mpris_time_settings_title">Intervalo de tiempo</string>
<string name="mpris_time_settings_summary">Ajustar el tiempo a avanzar o rebobinar un archivo multimedia.</string>
<string name="share_to">Compartir con...</string>
<string name="protocol_version_older">Este dispositivo usa una versión antigua del protocolo</string>
<string name="protocol_version_newer">Este dispositivo usa una versión más reciente del protocolo</string>
<string name="general_settings">Preferencias generales</string>
<string name="plugin_settings">Preferencias</string>
<string name="plugin_settings_with_name">Preferencias de %s</string>
<string name="device_name">Nombre de dispositivo</string>
<string name="device_name_preference_summary">%s</string>
<string name="invalid_device_name">Nombre de dispositivo no válido</string>
<string name="shareplugin_text_saved">Texto recibido y guardado en el portapapeles</string>
<string name="custom_devices_settings">Lista de dispositivos personalizada</string>
<string name="custom_device_list">Lista de dispositivos personalizada</string>
<string name="custom_device_list_summary">Lista de dispositivos personalizada</string>
<string name="share_notification_preference">Notificaciones ruidosas</string>
<string name="share_notification_preference_summary">Vibrar y reproducir un sonido cuando se reciba un archivo</string>
<string name="sftp_internal_storage">Almacenamiento interno</string>
<string name="sftp_all_files">Todos los archivos</string>
<string name="sftp_sdcard_num">Tarjeta SD %d</string>
<string name="sftp_sdcard">Tarjeta SD</string>
<string name="sftp_readonly">(solo lectura)</string>
<string name="sftp_camera">Imágenes de la cámara</string>
<string name="add_host">Añadir IP/nombre</string>
<string name="custom_dev_list_help">Use esta opción solo si su dispositivo no es detectado automáticamente. Introduzca la dirección IP o nombre debajo y pulse el botón para añadirlo a la lista. Pulse un ítem existente para eliminarlo de la lista.</string>
<string-array name="mpris_time_entries">
<item>10 segundos</item>
<item>20 segundos</item>
<item>30 segundos</item>
<item>1 minuto</item>
<item>2 minutos</item>
</string-array>
</resources>

View File

@@ -1,111 +0,0 @@
<?xml version='1.0' encoding='utf-8'?>
<resources>
<string name="pref_plugin_telephony">Puhelinilmoitukset</string>
<string name="pref_plugin_telephony_desc">Lähetä ilmoitukset tekstiviesteistä ja puheluista</string>
<string name="pref_plugin_battery">Akkuraportti</string>
<string name="pref_plugin_battery_desc">Raportoi akun tila säännöllisesti</string>
<string name="pref_plugin_sftp">Tiedostojärjestelmän paljastaminen</string>
<string name="pref_plugin_sftp_desc">Mahdollistaa puhelimen tiedostojärjestelmän etäselaamisen</string>
<string name="pref_plugin_clipboard">Leikepöydän synkronointi</string>
<string name="pref_plugin_clipboard_desc">Jaa leikepöydän sisältö</string>
<string name="pref_plugin_mousepad">Kaukosyöte</string>
<string name="pref_plugin_mousepad_desc">Käytä puhelintasi hiirenä ja näppäimistönä</string>
<string name="pref_plugin_mpris">Multimediakauko-ohjaimet</string>
<string name="pref_plugin_mpris_desc">Ohjaa ääntä ja videota puhelimestasi</string>
<string name="pref_plugin_ping">Tiedustelupaketti</string>
<string name="pref_plugin_ping_desc">Lähetä ja vastaanota tiedustelupaketteja</string>
<string name="pref_plugin_notifications">Ilmoitusten synkronointi</string>
<string name="pref_plugin_notifications_desc">Näe ilmoituksesi muissa laitteissa</string>
<string name="pref_plugin_sharereceiver">Jaon vastaanottaja</string>
<string name="pref_plugin_sharereceiver_desc">Tallenna tulevat tiedoston puhelimen muistiin</string>
<string name="plugin_not_available">Piirre ei ole käytettävissä Android-versiossasi</string>
<string name="device_list_empty">Ei laitteita</string>
<string name="ok">OK</string>
<string name="cancel">Peru</string>
<string name="open_settings">Avaa asetukset</string>
<string name="no_permissions">Sinun on annettava lupa ilmoitusten näkemiseen</string>
<string name="send_ping">Lähetä tiedustelupaketti</string>
<string name="open_mpris_controls">Avaa kauko-ohjain</string>
<string name="open_mousepad">Avaa hiiren ohjain</string>
<string name="mousepad_info">Liikuta hiiren osoitinta liikuttamalla sormeasi näytöllä</string>
<string name="mousepad_double_tap_settings_title">Aseta kahden sormen napautuksen toiminto</string>
<string name="mousepad_triple_tap_settings_title">Aseta kolmen sormen napautuksen toiminto</string>
<string name="mousepad_right_click">Oikea napsautus</string>
<string name="mousepad_middle_click">Keskinapsautus</string>
<string name="category_connected_devices">Yhdistetyt laitteet</string>
<string name="category_not_paired_devices">Pariksi liitetyt laitteet</string>
<string name="category_remembered_devices">Muistetut laitteet</string>
<string name="plugins_failed_to_load">Liitännäisten lataus epäonnistui (lisätietoa napauttamalla):</string>
<string name="device_menu_plugins">Valitse liitännäiset</string>
<string name="device_menu_unpair">Poista laitepari</string>
<string name="device_not_reachable">Laitepari tavoittamattomissa</string>
<string name="unknown_device">Tuntematon laite</string>
<string name="error_not_reachable">Laite tavoittamattomissa</string>
<string name="error_already_requested">Pariksi kytkemistä on jo pyydetty</string>
<string name="error_already_paired">Laite on jo kytketty pariksi</string>
<string name="error_could_not_send_package">Ei voitu lähettää pakettia</string>
<string name="error_timed_out">Aikakatkaisu</string>
<string name="error_canceled_by_user">Käyttäjä perui</string>
<string name="error_canceled_by_other_peer">Vertaiskäyttäjä perui</string>
<string name="error_invalid_key">Vastaanotettiin väärä avain</string>
<string name="pair_requested">Paripyyntö</string>
<string name="pairing_request_from">Paripyyntö kohteesta %1s</string>
<string name="received_url_title">Vastaanotettiin linkki lähettäjältä %1s</string>
<string name="received_url_text">Avaa ”%1s” napauttamalla</string>
<string name="incoming_file_title">Saapuva tiedosto lähettäjältä %1s</string>
<string name="incoming_file_text">%1s</string>
<string name="received_file_title">Vastaanotettiin tiedosto lähettäjältä %1s</string>
<string name="received_file_text">Avaa ”%1s” napauttamalla</string>
<string name="tap_to_answer">Vastaa napauttamalla</string>
<string name="reconnect">Yhdistä uudelleen</string>
<string name="right_click">Lähetä oikean painikkeen napsautus</string>
<string name="middle_click">Lähetä keskipainikkeen napsautus</string>
<string name="show_keyboard">Näytä näppäimistö</string>
<string name="device_not_paired">Laitetta ei ole kytketty pariksi</string>
<string name="request_pairing">Pyydä pariksi kytkemistä</string>
<string name="pairing_accept">Hyväksy</string>
<string name="pairing_reject">Hylkää</string>
<string name="device">Laite</string>
<string name="pair_device">Kytke laite pariksi</string>
<string name="remote_control">Kauko-ohjain</string>
<string name="settings">KDE Connectin asetukset</string>
<string name="mpris_play">Toista</string>
<string name="mpris_previous">Edellinen</string>
<string name="mpris_rew">Kelaa takaisin</string>
<string name="mpris_ff">Nopeasti eteenpäin</string>
<string name="mpris_next">Seuraava</string>
<string name="mpris_volume">Äänenvoimakkuus</string>
<string name="mpris_settings">Multimedia-asetukset</string>
<string name="mpris_time_settings_title">Aikaväli</string>
<string name="mpris_time_settings_summary">Säädä multimediatiedoston pikakelauksen aikaa.</string>
<string name="share_to">Jaa…</string>
<string name="protocol_version_older">Laite käyttää vanha yhteyskäytäntöversiota</string>
<string name="protocol_version_newer">Laite käyttää uudempaa yhteyskäytäntöversiota</string>
<string name="general_settings">Yleisasetukset</string>
<string name="plugin_settings">Asetukset</string>
<string name="plugin_settings_with_name">%s-asetukset</string>
<string name="device_name">Laitenimi</string>
<string name="device_name_preference_summary">%s</string>
<string name="invalid_device_name">Virheellinen laitenimi</string>
<string name="shareplugin_text_saved">Vastaanotettiin tekstiä, tallennettiin leikepöydälle</string>
<string name="custom_devices_settings">Omien laitteiden luettelo</string>
<string name="custom_device_list">Omien laitteiden luettelo</string>
<string name="custom_device_list_summary">Omien laitteiden luettelo</string>
<string name="share_notification_preference">Äänekkäät ilmoitukset</string>
<string name="share_notification_preference_summary">Värise ja soita ääni tiedoston saapuessa</string>
<string name="sftp_internal_storage">Sisäinen muisti</string>
<string name="sftp_all_files">Kaikki tiedostot</string>
<string name="sftp_sdcard_num">SD-kortti %d</string>
<string name="sftp_sdcard">SD-kortti</string>
<string name="sftp_readonly">(vain luku)</string>
<string name="sftp_camera">Kamerakuvat</string>
<string name="add_host">Lisää kone/IP</string>
<string name="custom_dev_list_help">Käytä tätä vain, jos laitettasi ei tunnisteta automaattisesti. Kirjoita IP-osoite tai konenimi alle ja kosketa painiketta lisätäksesi sen luetteloon. Kosketa olemassa olevaa kohtaa poistaaksesi sen luettelosta.</string>
<string-array name="mpris_time_entries">
<item>10 sekuntia</item>
<item>20 sekuntia</item>
<item>30 sekuntia</item>
<item>1 minuutti</item>
<item>2 minuuttia</item>
</string-array>
</resources>

View File

@@ -1,10 +0,0 @@
<?xml version='1.0' encoding='utf-8'?>
<resources>
<string-array name="mpris_time_entries">
<item>10 seconds</item>
<item>20 seconds</item>
<item>30 seconds</item>
<item>1 minute</item>
<item>2 minutes</item>
</string-array>
</resources>

View File

@@ -1,84 +0,0 @@
<?xml version='1.0' encoding='utf-8'?>
<resources>
<string name="pref_plugin_telephony">전화 알림이</string>
<string name="pref_plugin_telephony_desc">문자 메시지와 통화 알림 보내기</string>
<string name="pref_plugin_battery">배터리 보고</string>
<string name="pref_plugin_battery_desc">주기적으로 배터리 상태 보고</string>
<string name="pref_plugin_sftp">파일 시스템 보기</string>
<string name="pref_plugin_sftp_desc">휴대폰의 파일 시스템 보기</string>
<string name="pref_plugin_clipboard">클립보드 동기화</string>
<string name="pref_plugin_clipboard_desc">클립보드 내용 동기화</string>
<string name="pref_plugin_mousepad">원격 제어</string>
<string name="pref_plugin_mpris">멀티미디어 제어</string>
<string name="pref_plugin_mpris_desc">휴대폰에서 오디오/비디오 제어</string>
<string name="pref_plugin_ping"></string>
<string name="pref_plugin_ping_desc">핑 보내고 받기</string>
<string name="pref_plugin_notifications">알림 동기화</string>
<string name="pref_plugin_notifications_desc">다른 장치에서 알림 보기</string>
<string name="plugin_not_available">현재 안드로이드 버전에서 사용할 수 없습니다</string>
<string name="device_list_empty">장치 없음</string>
<string name="ok">확인</string>
<string name="cancel">취소</string>
<string name="open_settings">설정 열기</string>
<string name="no_permissions">알림 접근 권한을 허가해야 합니다</string>
<string name="send_ping">핑 보내기</string>
<string name="open_mpris_controls">원격 제어 열기</string>
<string name="open_mousepad">원격 제어 열기</string>
<string name="category_connected_devices">연결된 장치</string>
<string name="category_not_paired_devices">페어링되지 않은 장치</string>
<string name="category_remembered_devices">기억하는 장치</string>
<string name="plugins_failed_to_load">불러올 수 없는 플러그인(정보를 보려면 누르기)</string>
<string name="device_menu_plugins">플러그인 선택</string>
<string name="device_menu_unpair">페어링 해제</string>
<string name="device_not_reachable">장치에 접근할 수 없음</string>
<string name="unknown_device">알 수 없는 장치</string>
<string name="error_not_reachable">장치에 접근할 수 없음</string>
<string name="error_already_requested">페어링이 이미 요청됨</string>
<string name="error_already_paired">장치가 이미 페어링됨</string>
<string name="error_could_not_send_package">패키지를 보낼 수 없음</string>
<string name="error_timed_out">시간 초과됨</string>
<string name="error_canceled_by_user">사용자가 취소함</string>
<string name="error_canceled_by_other_peer">다른 쪽에서 취소함</string>
<string name="error_invalid_key">잘못된 키 받음</string>
<string name="pair_requested">페어링 요청됨</string>
<string name="pairing_request_from">%1s에서 페어링 요청</string>
<string name="incoming_file_title">%1s에서 페어링 요청</string>
<string name="incoming_file_text">%s</string>
<string name="tap_to_answer">눌러서 응답하기</string>
<string name="reconnect">다시 연결</string>
<string name="device_not_paired">장치가 페어링되지 않음</string>
<string name="request_pairing">페어링 요청</string>
<string name="pairing_accept">수락</string>
<string name="pairing_reject">거부</string>
<string name="device">장치</string>
<string name="pair_device">장치 페어링</string>
<string name="remote_control">원격 제어</string>
<string name="settings">KDE Connect 설정</string>
<string name="mpris_play">재생</string>
<string name="mpris_previous">이전</string>
<string name="mpris_rew">되감기</string>
<string name="mpris_ff">빨리 감기</string>
<string name="mpris_next">다음</string>
<string name="mpris_volume">음량</string>
<string name="mpris_settings">멀티미디어 제어</string>
<string name="share_to">다음으로 공유...</string>
<string name="protocol_version_older">이 장치의 프로토콜 버전이 오래되었습니다</string>
<string name="protocol_version_newer">이 장치의 프로토콜 버전이 더 새롭습니다</string>
<string name="general_settings">일반 설정</string>
<string name="plugin_settings">일반 설정</string>
<string name="plugin_settings_with_name">설정 열기</string>
<string name="device_name">장치 이름</string>
<string name="device_name_preference_summary">%s</string>
<string name="invalid_device_name">잘못된 장치 이름</string>
<string name="custom_devices_settings">장치 없음</string>
<string name="custom_device_list">장치 없음</string>
<string name="custom_device_list_summary">장치 없음</string>
<string name="share_notification_preference">알림 동기화</string>
<string-array name="mpris_time_entries">
<item>10 seconds</item>
<item>20 seconds</item>
<item>30 seconds</item>
<item>1 minute</item>
<item>2 minutes</item>
</string-array>
</resources>

View File

@@ -1,10 +0,0 @@
<?xml version='1.0' encoding='utf-8'?>
<resources>
<string-array name="mpris_time_entries">
<item>10 seconds</item>
<item>20 seconds</item>
<item>30 seconds</item>
<item>1 minute</item>
<item>2 minutes</item>
</string-array>
</resources>

View File

@@ -1,111 +0,0 @@
<?xml version='1.0' encoding='utf-8'?>
<resources>
<string name="pref_plugin_telephony">Powiadomienie telefonu</string>
<string name="pref_plugin_telephony_desc">Wysyłaj powiadomienia dla SMS i połączeń</string>
<string name="pref_plugin_battery">Zgłaszanie baterii</string>
<string name="pref_plugin_battery_desc">Okresowo zgłaszaj stan baterii</string>
<string name="pref_plugin_sftp">Eksponowanie systemu plików</string>
<string name="pref_plugin_sftp_desc">Zezwala na zdalne przeglądanie systemu plików telefonu</string>
<string name="pref_plugin_clipboard">Synchronizacja schowka</string>
<string name="pref_plugin_clipboard_desc">Udostępnij zawartość schowka</string>
<string name="pref_plugin_mousepad">Zdalne sterowanie</string>
<string name="pref_plugin_mousepad_desc">Użyj swojego telefonu jako myszy i klawiatury</string>
<string name="pref_plugin_mpris">Zdalne sterowanie multimediami</string>
<string name="pref_plugin_mpris_desc">Steruj dźwiękiem/obrazem ze swojego telefonu</string>
<string name="pref_plugin_ping">Ping</string>
<string name="pref_plugin_ping_desc">Wysyłaj i otrzymuj pingi</string>
<string name="pref_plugin_notifications">Powiadomienia synchronizacji</string>
<string name="pref_plugin_notifications_desc">Uzyskaj dostęp do swoich powiadomień z innego urządzenia</string>
<string name="pref_plugin_sharereceiver">Udostępnij odbiornik</string>
<string name="pref_plugin_sharereceiver_desc">Zapisz przychodzące pliki do pamięci telefonu</string>
<string name="plugin_not_available">Funkcja ta nie jest dostępna w twojej wersji Androida</string>
<string name="device_list_empty">Brak urządzeń</string>
<string name="ok">OK</string>
<string name="cancel">Anuluj</string>
<string name="open_settings">Otwórz ustawienia</string>
<string name="no_permissions">Musisz przydzielić uprawnienia, aby uzyskać dostęp do powiadomień</string>
<string name="send_ping">Wyślij ping</string>
<string name="open_mpris_controls">Otwórz zdalne sterowanie</string>
<string name="open_mousepad">Otwórz sterowanie gładzikiem</string>
<string name="mousepad_info">Przesuń kciukiem po ekranie, aby przesunąć wskaźnik myszy</string>
<string name="mousepad_double_tap_settings_title">Ustaw działanie po dwukrotnym stuknięciu palcem</string>
<string name="mousepad_triple_tap_settings_title">Ustaw działanie po trzykrotnym stuknięciu palcem</string>
<string name="mousepad_right_click">Naciśnięcie prawym</string>
<string name="mousepad_middle_click">Naciśnięcie środkowym</string>
<string name="category_connected_devices">Podłączone urządzenia</string>
<string name="category_not_paired_devices">Brak sparowanych urządzeń</string>
<string name="category_remembered_devices">Zapamiętane urządzenia</string>
<string name="plugins_failed_to_load">Nieudane wczytywanie wtyczki (stuknij po więcej informacji):</string>
<string name="device_menu_plugins">Wybierz wtyczki</string>
<string name="device_menu_unpair">Odparuj</string>
<string name="device_not_reachable">Sparowane urządzenie nieosiągalne</string>
<string name="unknown_device">Nieznane urządzenie</string>
<string name="error_not_reachable">Urządzenie nieosiągalne</string>
<string name="error_already_requested">Już zażądano parowania</string>
<string name="error_already_paired">Urządzenie już sparowano</string>
<string name="error_could_not_send_package">Nie można wysłać pakietu</string>
<string name="error_timed_out">Przekroczono czasu odpowiedzi</string>
<string name="error_canceled_by_user">Anulowane przez użytkownika</string>
<string name="error_canceled_by_other_peer">Anulowane przez innego partnera</string>
<string name="error_invalid_key">Otrzymano nieprawidłowy klucz</string>
<string name="pair_requested">Zażądano parowania</string>
<string name="pairing_request_from">Żądanie parowania z %1s</string>
<string name="received_url_title">Odebrano odsyłacz od %1s</string>
<string name="received_url_text">Znacznik do otwarcia \'%1s\'</string>
<string name="incoming_file_title">Plik przychodzący od %1s</string>
<string name="incoming_file_text">%1s</string>
<string name="received_file_title">Odebrano plik od %1s</string>
<string name="received_file_text">Znacznik do otwarcia \'%1s\'</string>
<string name="tap_to_answer">Stuknij, aby odpowiedzieć</string>
<string name="reconnect">Połącz ponownie</string>
<string name="right_click">Wyślij naciskając prawym</string>
<string name="middle_click">Wyślij naciskając środkowym</string>
<string name="show_keyboard">Pokaż klawiaturę</string>
<string name="device_not_paired">Urządzenie niesparowane</string>
<string name="request_pairing">Zażądaj sparowania</string>
<string name="pairing_accept">Przyjmij</string>
<string name="pairing_reject">Odrzuć</string>
<string name="device">Urządzenie</string>
<string name="pair_device">Sparuj urządzenie</string>
<string name="remote_control">Zdalne sterowanie</string>
<string name="settings">Ustawienia KDE Connect</string>
<string name="mpris_play">Odtwórz</string>
<string name="mpris_previous">Poprzedni</string>
<string name="mpris_rew">Przewiń</string>
<string name="mpris_ff">Przewiń do przodu</string>
<string name="mpris_next">Następny</string>
<string name="mpris_volume">Głośność</string>
<string name="mpris_settings">Ustawienia multimediów</string>
<string name="mpris_time_settings_title">Czas okresu</string>
<string name="mpris_time_settings_summary">Dostosuj czas do przewijania wprzód lub wstecz w pliku multimedialnym.</string>
<string name="share_to">Współdziel z...</string>
<string name="protocol_version_older">Urządzenie to używa starej wersji protokołu</string>
<string name="protocol_version_newer">Urządzenie to używa nowszej wersji protokołu</string>
<string name="general_settings">Ustawienia ogólne</string>
<string name="plugin_settings">Ustawienia</string>
<string name="plugin_settings_with_name">Ustawienia %s</string>
<string name="device_name">Nazwa urządzenia</string>
<string name="device_name_preference_summary">%s</string>
<string name="invalid_device_name">Nieprawidłowa nazwa urządzenia</string>
<string name="shareplugin_text_saved">Otrzymano tekst, zapisano do schowka</string>
<string name="custom_devices_settings">Lista własnych urządzeń</string>
<string name="custom_device_list">Lista własnych urządzeń</string>
<string name="custom_device_list_summary">Lista własnych urządzeń</string>
<string name="share_notification_preference">Hałaśliwe powiadomienia</string>
<string name="share_notification_preference_summary">Zadrżyj i odegraj dźwięk przy odebraniu pliku</string>
<string name="sftp_internal_storage">"Pamięć wewnętrzna "</string>
<string name="sftp_all_files">Wszystkie pliki</string>
<string name="sftp_sdcard_num">Karta SD %d</string>
<string name="sftp_sdcard">Karta SD</string>
<string name="sftp_readonly">(tylko do odczytu)</string>
<string name="sftp_camera">Zdjęcia z aparatu</string>
<string name="add_host">Dodaj gospodarza/IP</string>
<string name="custom_dev_list_help">Użyj tej opcji tylko wtedy, gdy twoje urządzenie nie jest samoczynnie wykrywane. Podaj adres IP i nazwę gospodarza poniżej i dotknij przycisku, aby dodać je do listy. Dotknij istniejącego elementu, aby usunąć go z listy.</string>
<string-array name="mpris_time_entries">
<item>10 sekund</item>
<item>20 sekund</item>
<item>30 sekund</item>
<item>1 minuta</item>
<item>2 minuty</item>
</string-array>
</resources>

View File

@@ -1,84 +0,0 @@
<?xml version='1.0' encoding='utf-8'?>
<resources>
<string name="pref_plugin_telephony">Notificator de telefonie</string>
<string name="pref_plugin_telephony_desc">Trimite notificări pentru SMS-uri și apeluri</string>
<string name="pref_plugin_battery">Raport acumulator</string>
<string name="pref_plugin_battery_desc">Raportează periodic starea acumulatorului</string>
<string name="pref_plugin_sftp">Expunere sistem de fișiere</string>
<string name="pref_plugin_sftp_desc">Vă permite să răsfoiți de la distanță sistemul de fișiere al dispozitivului</string>
<string name="pref_plugin_clipboard">Sincronizare clipboard</string>
<string name="pref_plugin_clipboard_desc">Partajează conținutul clipboardului</string>
<string name="pref_plugin_mousepad">Control de la distanță</string>
<string name="pref_plugin_mpris">Controale multimedia distante</string>
<string name="pref_plugin_mpris_desc">Controlați audio/video de pe telefon</string>
<string name="pref_plugin_ping">Ping</string>
<string name="pref_plugin_ping_desc">Trimite și primește ping-uri</string>
<string name="pref_plugin_notifications">Sincronizare notificări</string>
<string name="pref_plugin_notifications_desc">Accesați-vă notificările de pe alte dispozitive</string>
<string name="plugin_not_available">Această caracteristică nu este disponibilă în versiunea dumneavoastră de Android</string>
<string name="device_list_empty">Niciun dispozitiv</string>
<string name="ok">Bine</string>
<string name="cancel">Renunță</string>
<string name="open_settings">Deschide configurările</string>
<string name="no_permissions">Trebuie să acordați permisiunea pentru accesarea notificărilor</string>
<string name="send_ping">Trimite ping</string>
<string name="open_mpris_controls">Deschide controlul de la distanță</string>
<string name="open_mousepad">Deschide controlul de la distanță</string>
<string name="category_connected_devices">Dispozitive conectate</string>
<string name="category_not_paired_devices">Dispozitive neasociate</string>
<string name="category_remembered_devices">Dispozitive memorizate</string>
<string name="plugins_failed_to_load">Încărcarea extensiilor a eșuat (atingeți pentru mai multe informații):</string>
<string name="device_menu_plugins">Alege extensii</string>
<string name="device_menu_unpair">Dezasociază</string>
<string name="device_not_reachable">Dispozitivul nu e accesibil</string>
<string name="unknown_device">Dispozitiv necunoscut</string>
<string name="error_not_reachable">Dispozitivul nu e accesibil</string>
<string name="error_already_requested">Asocierea a fost cerută deja</string>
<string name="error_already_paired">Dispozitiv asociat deja</string>
<string name="error_could_not_send_package">Pachetul nu a putut fi trimis</string>
<string name="error_timed_out">A expirat</string>
<string name="error_canceled_by_user">Anulat de către utilizator</string>
<string name="error_canceled_by_other_peer">Anulat de către partener</string>
<string name="error_invalid_key">Cheie nevalidă recepționată</string>
<string name="pair_requested">Asociere cerută</string>
<string name="pairing_request_from">Cerere de asociere de la %1s</string>
<string name="incoming_file_title">Cerere de asociere de la %1s</string>
<string name="incoming_file_text">%s</string>
<string name="tap_to_answer">Atingeți pentru a răspunde</string>
<string name="reconnect">Reconectează</string>
<string name="device_not_paired">Dispozitiv neasociat</string>
<string name="request_pairing">Cere asocierea</string>
<string name="pairing_accept">Acceptă</string>
<string name="pairing_reject">Respinge</string>
<string name="device">Dispozitiv</string>
<string name="pair_device">Asociază dispozitiv</string>
<string name="remote_control">Control de la distanță</string>
<string name="settings">Configurări KDE Connect</string>
<string name="mpris_play">Redă</string>
<string name="mpris_previous">Precedent</string>
<string name="mpris_rew">Derulează</string>
<string name="mpris_ff">Derulare rapidă înainte</string>
<string name="mpris_next">Următor</string>
<string name="mpris_volume">Volum</string>
<string name="mpris_settings">Controale multimedia distante</string>
<string name="share_to">Partajează cu...</string>
<string name="protocol_version_older">Acest dispozitiv folosește o versiune veche a protocolului</string>
<string name="protocol_version_newer">Acest dispozitiv folosește o versiune mai nouă a protocolului</string>
<string name="general_settings">Configurări generale</string>
<string name="plugin_settings">Configurări generale</string>
<string name="plugin_settings_with_name">Deschide configurările</string>
<string name="device_name">Denumire dispozitiv</string>
<string name="device_name_preference_summary">%s</string>
<string name="invalid_device_name">Denumire nevalidă a dispozitivului</string>
<string name="custom_devices_settings">Niciun dispozitiv</string>
<string name="custom_device_list">Niciun dispozitiv</string>
<string name="custom_device_list_summary">Niciun dispozitiv</string>
<string name="share_notification_preference">Sincronizare notificări</string>
<string-array name="mpris_time_entries">
<item>10 seconds</item>
<item>20 seconds</item>
<item>30 seconds</item>
<item>1 minute</item>
<item>2 minutes</item>
</string-array>
</resources>

View File

@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<declare-styleable name="MaxWidthImageButton">
<attr name="maxWidth" format="dimension" />
</declare-styleable>
</resources>

View File

@@ -1,140 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="pref_plugin_telephony">Telephony notifier</string>
<string name="pref_plugin_telephony_desc">Send notifications for SMS and calls</string>
<string name="pref_plugin_battery">Battery report</string>
<string name="pref_plugin_battery_desc">Periodically report battery status</string>
<string name="pref_plugin_sftp">Filesystem expose</string>
<string name="pref_plugin_sftp_desc">Allows to browse the phone\'s filesystem remotely</string>
<string name="pref_plugin_clipboard">Clipboard sync</string>
<string name="pref_plugin_clipboard_desc">Share the clipboard content</string>
<string name="pref_plugin_mousepad">Remote input</string>
<string name="pref_plugin_mousepad_desc">Use your phone as a mouse and keyboard</string>
<string name="pref_plugin_mpris">Multimedia remote controls</string>
<string name="pref_plugin_mpris_desc">Control audio/video from your phone</string>
<string name="pref_plugin_ping">Ping</string>
<string name="pref_plugin_ping_desc">Send and receive pings</string>
<string name="pref_plugin_notifications">Notification sync</string>
<string name="pref_plugin_notifications_desc">Access your notifications from other devices</string>
<string name="pref_plugin_sharereceiver">Share receiver</string>
<string name="pref_plugin_sharereceiver_desc">Save incoming files to the phone storage</string>
<string name="plugin_not_available">This feature is not available in your Android version</string>
<string name="device_list_empty">No devices</string>
<string name="ok">OK</string>
<string name="cancel">Cancel</string>
<string name="open_settings">Open settings</string>
<string name="no_permissions">You need to grant permission to access notifications</string>
<string name="send_ping">Send ping</string>
<string name="open_mpris_controls">Open remote control</string>
<string name="open_mousepad">Open touchpad control</string>
<string name="mousepad_info">Move a finger on the screen to move the mouse cursor</string>
<string name="mousepad_double_tap_key" translatable="false">mousepad_double_tap_key</string>
<string name="mousepad_triple_tap_key" translatable="false">mousepad_triple_tap_key</string>
<string name="mousepad_right_value" translatable="false">right</string>
<string name="mousepad_middle_value" translatable="false">middle</string>
<string name="mousepad_double_tap_settings_title">Set Two Finger Tap Action</string>
<string name="mousepad_double_default" translatable="false">@string/mousepad_right_value</string>
<string name="mousepad_triple_default" translatable="false">@string/mousepad_middle_value</string>
<string name="mousepad_triple_tap_settings_title">Set Three Finger Tap Action</string>
<string name="mousepad_right_click">Right click</string>
<string name="mousepad_middle_click">Middle click</string>
<string name="category_connected_devices">Connected devices</string>
<string name="category_not_paired_devices">Available devices</string>
<string name="category_remembered_devices">Remembered devices</string>
<string name="plugins_failed_to_load">Plugins failed to load (tap for more info):</string>
<string name="device_menu_plugins">Select plugins</string>
<string name="device_menu_unpair">Unpair</string>
<string name="device_not_reachable">Paired device not reachable</string>
<string name="unknown_device">Unknown device</string>
<string name="error_not_reachable">Device not reachable</string>
<string name="error_already_requested">Pairing already requested</string>
<string name="error_already_paired">Device already paired</string>
<string name="error_could_not_send_package">Could not send package</string>
<string name="error_timed_out">Timed out</string>
<string name="error_canceled_by_user">Canceled by user</string>
<string name="error_canceled_by_other_peer">Canceled by other peer</string>
<string name="error_invalid_key">Invalid key received</string>
<string name="pair_requested">Pair requested</string>
<string name="pairing_request_from">Pairing request from %1s</string>
<string name="received_url_title">Received link from %1s</string>
<string name="received_url_text">Tap to open \'%1s\'</string>
<string name="incoming_file_title">Incoming file from %1s</string>
<string name="incoming_file_text">%1s</string>
<string name="received_file_title">Received file from %1s</string>
<string name="received_file_text">Tap to open \'%1s\'</string>
<string name="tap_to_answer">Tap to answer</string>
<string name="reconnect">Reconnect</string>
<string name="right_click">Send Right Click</string>
<string name="middle_click">Send Middle Click</string>
<string name="show_keyboard">Show Keyboard</string>
<string name="device_not_paired">Device not paired</string>
<string name="request_pairing">Request pairing</string>
<string name="pairing_accept">Accept</string>
<string name="pairing_reject">Reject</string>
<string name="device">Device</string>
<string name="pair_device">Pair device</string>
<string name="remote_control">Remote control</string>
<string name="settings">KDE Connect Settings</string>
<string name="mpris_play">Play</string>
<string name="mpris_previous">Previous</string>
<string name="mpris_rew">Rewind</string>
<string name="mpris_ff">Fast-forward</string>
<string name="mpris_next">Next</string>
<string name="mpris_volume">Volume</string>
<string name="mpris_settings">Multimedia Settings</string>
<string name="mpris_time_settings_title">Interval Time</string>
<string name="mpris_time_settings_summary">Adjust the time to fast forward or rewind a multimedia file.</string>
<string name="mpris_time_key" translatable="false">mpris_interval_time</string>
<string name="mpris_time_default" translatable="false">10000000</string>
<string name="share_to">Share To...</string>
<string name="protocol_version_older">This device uses an old protocol version</string>
<string name="protocol_version_newer">This device uses a newer protocol version</string>
<string name="general_settings">General Settings</string>
<string name="plugin_settings">Settings</string>
<string name="plugin_settings_with_name">%s settings</string>
<string name="plugin_settings_key" translatable="false">_preferences</string>
<string name="device_name">Device name</string>
<string name="device_name_preference_summary">%s</string>
<string name="invalid_device_name">Invalid device name</string>
<string name="shareplugin_text_saved">Received text, saved to clipboard</string>
<string name="custom_devices_settings">Custom device list</string>
<string name="custom_device_list">Add devices by IP</string>
<string name="share_notification_preference">Noisy notifications</string>
<string name="share_notification_preference_summary">Vibrate and play a sound when receiving a file</string>
<string name="sftp_internal_storage">Internal storage</string>
<string name="sftp_all_files">All files</string>
<string name="sftp_sdcard_num">SD card %d</string>
<string name="sftp_sdcard">SD card</string>
<string name="sftp_readonly">(read only)</string>
<string name="sftp_camera">Camera pictures</string>
<string name="add_host">Add host/IP</string>
<string name="custom_dev_list_help">Use this option only if your device is not automatically detected. Enter IP address or hostname below and touch the button to add it to the list. Touch an existing item to remove it from the list.</string>
<string-array name="mpris_time_entries">
<item>10 seconds</item>
<item>20 seconds</item>
<item>30 seconds</item>
<item>1 minute</item>
<item>2 minutes</item>
</string-array>
<string-array name="mpris_time_entries_values" translatable="false">
<item>10000000</item>
<item>20000000</item>
<item>30000000</item>
<item>60000000</item>
<item>120000000</item>
</string-array>
<string-array name="mousepad_tap_entries" translatable="false">
<item>@string/mousepad_right_click</item>
<item>@string/mousepad_middle_click</item>
</string-array>
<string-array name="mousepad_tap_values" translatable="false">
<item>@string/mousepad_right_value</item>
<item>@string/mousepad_middle_value</item>
</string-array>
</resources>

View File

@@ -1,24 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ListPreference
android:id="@+id/mousepad_double_tap_preference"
android:key="@string/mousepad_double_tap_key"
android:title="@string/mousepad_double_tap_settings_title"
android:summary="%s"
android:entries="@array/mousepad_tap_entries"
android:entryValues="@array/mousepad_tap_values"
android:defaultValue="@string/mousepad_double_default" />
<ListPreference
android:id="@+id/mousepad_triple_tap_preference"
android:key="@string/mousepad_triple_tap_key"
android:title="@string/mousepad_triple_tap_settings_title"
android:summary="%s"
android:entries="@array/mousepad_tap_entries"
android:entryValues="@array/mousepad_tap_values"
android:defaultValue="@string/mousepad_triple_default" />
</PreferenceScreen>

View File

@@ -1,15 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ListPreference
android:id="@+id/mpris_time_preference"
android:key="@string/mpris_time_key"
android:title="@string/mpris_time_settings_title"
android:summary="@string/mpris_time_settings_summary"
android:entries="@array/mpris_time_entries"
android:entryValues="@array/mpris_time_entries_values"
android:defaultValue="@string/mpris_time_default" />
</PreferenceScreen>

View File

@@ -1,13 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<CheckBoxPreference
android:id="@+id/share_notification_preference"
android:key="share_notification_preference"
android:title="@string/share_notification_preference"
android:summary="@string/share_notification_preference_summary"
android:defaultValue="true" />
</PreferenceScreen>

View File

@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.kde.kdeconnect_tp"
android:versionCode="736"
android:versionName="0.7.3.6">
android:versionCode="12"
android:versionName="0.5">
<uses-sdk android:minSdkVersion="9"
android:targetSdkVersion="21" />
android:targetSdkVersion="18" />
<supports-screens
android:smallScreens="true"
@@ -88,26 +88,6 @@
android:value="org.kde.kdeconnect.UserInterface.DeviceActivity" />
</activity>
<activity
android:name="org.kde.kdeconnect.UserInterface.CustomDevicesActivity"
android:label="@string/custom_devices_settings"
android:parentActivityName="org.kde.kdeconnect.UserInterface.DeviceActivity"
>
<meta-data android:name="android.support.PARENT_ACTIVITY"
android:value="org.kde.kdeconnect.UserInterface.DeviceActivity" />
</activity>
<activity
android:name="org.kde.kdeconnect.UserInterface.PluginSettingsActivity"
android:label="@string/mpris_settings"
android:parentActivityName="org.kde.kdeconnect.UserInterface.SettingsActivity"
>
<meta-data android:name="android.support.PARENT_ACTIVITY"
android:value="org.kde.kdeconnect.UserInterface.SettingsActivity" />
</activity>
<receiver android:name="org.kde.kdeconnect.KdeConnectBroadcastReceiver">
<intent-filter>
<action android:name="android.intent.action.PACKAGE_REPLACED" />
@@ -145,19 +125,6 @@
android:value="org.kde.kdeconnect.UserInterface.DeviceActivity" />
</activity>
<activity
android:theme="@style/Theme.AppCompat"
android:name="org.kde.kdeconnect.Plugins.MousePadPlugin.MousePadActivity"
android:label="@string/remote_control"
android:windowSoftInputMode="stateHidden|adjustResize"
android:configChanges="orientation|keyboardHidden|screenSize"
android:screenOrientation="fullSensor"
android:parentActivityName="org.kde.kdeconnect.UserInterface.DeviceActivity"
>
<meta-data android:name="android.support.PARENT_ACTIVITY"
android:value="org.kde.kdeconnect.UserInterface.DeviceActivity" />
</activity>
<activity
android:theme="@style/Theme.AppCompat"
android:name="org.kde.kdeconnect.UserInterface.ShareToReceiver"

View File

@@ -1,37 +1,23 @@
/*
* Copyright 2014 Albert Vaca Cintora <albertvaka@gmail.com>
*
* 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 the Free Software Foundation; either version 2 of
* the License or (at your option) version 3 or any later version
* accepted by the membership of KDE e.V. (or its successor approved
* by the membership of KDE e.V.), which shall act as a proxy
* defined in Section 14 of version 3 of the license.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.kde.kdeconnect.Backends;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;
import android.util.Base64;
import org.kde.kdeconnect.NetworkPackage;
import java.security.KeyFactory;
import java.security.PrivateKey;
import java.security.PublicKey;
import java.security.spec.PKCS8EncodedKeySpec;
import java.util.ArrayList;
public abstract class BaseLink {
private final BaseLinkProvider linkProvider;
private final String deviceId;
private final ArrayList<PackageReceiver> receivers = new ArrayList<PackageReceiver>();
private BaseLinkProvider linkProvider;
private String deviceId;
private ArrayList<PackageReceiver> receivers = new ArrayList<PackageReceiver>();
protected PrivateKey privateKey;
protected BaseLink(String deviceId, BaseLinkProvider linkProvider) {

View File

@@ -1,23 +1,3 @@
/*
* Copyright 2014 Albert Vaca Cintora <albertvaka@gmail.com>
*
* 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 the Free Software Foundation; either version 2 of
* the License or (at your option) version 3 or any later version
* accepted by the membership of KDE e.V. (or its successor approved
* by the membership of KDE e.V.), which shall act as a proxy
* defined in Section 14 of version 3 of the license.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.kde.kdeconnect.Backends;
import android.util.Log;
@@ -29,7 +9,7 @@ import java.util.ArrayList;
public abstract class BaseLinkProvider {
private final ArrayList<ConnectionReceiver> connectionReceivers = new ArrayList<ConnectionReceiver>();
private ArrayList<ConnectionReceiver> connectionReceivers = new ArrayList<ConnectionReceiver>();
public interface ConnectionReceiver {
public void onConnectionReceived(NetworkPackage identityPackage, BaseLink link);
@@ -63,7 +43,7 @@ public abstract class BaseLinkProvider {
public abstract void onStop();
public abstract void onNetworkChange();
//public abstract int getPriority();
public abstract int getPriority();
public abstract String getName();
}

View File

@@ -1,23 +1,3 @@
/*
* Copyright 2014 Albert Vaca Cintora <albertvaka@gmail.com>
*
* 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 the Free Software Foundation; either version 2 of
* the License or (at your option) version 3 or any later version
* accepted by the membership of KDE e.V. (or its successor approved
* by the membership of KDE e.V.), which shall act as a proxy
* defined in Section 14 of version 3 of the license.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.kde.kdeconnect.Backends.LanBackend;
import android.util.Log;

View File

@@ -1,29 +1,7 @@
/*
* Copyright 2014 Albert Vaca Cintora <albertvaka@gmail.com>
*
* 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 the Free Software Foundation; either version 2 of
* the License or (at your option) version 3 or any later version
* accepted by the membership of KDE e.V. (or its successor approved
* by the membership of KDE e.V.), which shall act as a proxy
* defined in Section 14 of version 3 of the license.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.kde.kdeconnect.Backends.LanBackend;
import android.content.Context;
import android.os.AsyncTask;
import android.preference.PreferenceManager;
import android.support.v4.util.LongSparseArray;
import android.util.Log;
import org.apache.mina.core.future.ConnectFuture;
@@ -40,24 +18,21 @@ import org.apache.mina.transport.socket.nio.NioSocketAcceptor;
import org.apache.mina.transport.socket.nio.NioSocketConnector;
import org.kde.kdeconnect.Backends.BaseLinkProvider;
import org.kde.kdeconnect.NetworkPackage;
import org.kde.kdeconnect.UserInterface.CustomDevicesActivity;
import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.HashMap;
public class LanLinkProvider extends BaseLinkProvider {
public static final String KEY_CUSTOM_DEVLIST_PREFERENCE = "device_list_preference";
private final static int port = 1714;
private final Context context;
private final HashMap<String, LanLink> visibleComputers = new HashMap<String, LanLink>();
private final LongSparseArray<LanLink> nioSessions = new LongSparseArray<LanLink>();
private Context context;
private HashMap<String, LanLink> visibleComputers = new HashMap<String, LanLink>();
private HashMap<Long, LanLink> nioSessions = new HashMap<Long, LanLink>();
private NioSocketAcceptor tcpAcceptor = null;
private NioDatagramAcceptor udpAcceptor = null;
@@ -66,9 +41,8 @@ public class LanLinkProvider extends BaseLinkProvider {
@Override
public void sessionClosed(IoSession session) throws Exception {
LanLink brokenLink = nioSessions.get(session.getId());
LanLink brokenLink = nioSessions.remove(session.getId());
if (brokenLink != null) {
nioSessions.remove(session.getId());
connectionLost(brokenLink);
brokenLink.disconnect();
String deviceId = brokenLink.getDeviceId();
@@ -118,7 +92,7 @@ public class LanLinkProvider extends BaseLinkProvider {
}
};
private final IoHandler udpHandler = new IoHandlerAdapter() {
private IoHandler udpHandler = new IoHandlerAdapter() {
@Override
public void messageReceived(IoSession udpSession, Object message) throws Exception {
super.messageReceived(udpSession, message);
@@ -191,10 +165,6 @@ public class LanLinkProvider extends BaseLinkProvider {
String deviceId = identityPackage.getString("deviceId");
Log.i("LanLinkProvider","addLink to "+deviceId);
LanLink oldLink = visibleComputers.get(deviceId);
if (oldLink == link) {
Log.e("KDEConnect", "LanLinkProvider: oldLink == link. This should not happen!");
return;
}
visibleComputers.put(deviceId, link);
connectionAccepted(identityPackage, link);
if (oldLink != null) {
@@ -265,29 +235,20 @@ public class LanLinkProvider extends BaseLinkProvider {
new AsyncTask<Void,Void,Void>() {
@Override
protected Void doInBackground(Void... voids) {
String deviceListPrefs = PreferenceManager.getDefaultSharedPreferences(context).getString(
KEY_CUSTOM_DEVLIST_PREFERENCE, "");
ArrayList<String> iplist = new ArrayList<String>();
if (!deviceListPrefs.isEmpty()) {
iplist = CustomDevicesActivity.deserializeIpList(deviceListPrefs);
}
iplist.add("255.255.255.255");
for (String ipstr : iplist) {
try {
InetAddress client = InetAddress.getByName(ipstr);
NetworkPackage identity = NetworkPackage.createIdentityPackage(context);
identity.set("tcpPort", finalTcpPort);
byte[] b = identity.serialize().getBytes("UTF-8");
DatagramPacket packet = new DatagramPacket(b, b.length, client, port);
DatagramSocket socket = new DatagramSocket();
socket.setReuseAddress(true);
socket.setBroadcast(true);
socket.send(packet);
//Log.i("LanLinkProvider","Udp identity package sent to address "+packet.getAddress());
} catch(Exception e) {
e.printStackTrace();
Log.e("LanLinkProvider","Sending udp identity package failed. Invalid address? ("+ipstr+")");
}
try {
NetworkPackage identity = NetworkPackage.createIdentityPackage(context);
identity.set("tcpPort",finalTcpPort);
byte[] b = identity.serialize().getBytes("UTF-8");
DatagramPacket packet = new DatagramPacket(b, b.length, InetAddress.getByAddress(new byte[]{-1,-1,-1,-1}), port);
DatagramSocket socket = new DatagramSocket();
socket.setReuseAddress(true);
socket.setBroadcast(true);
socket.send(packet);
//Log.e("LanLinkProvider","Udp identity package sent");
} catch(Exception e) {
e.printStackTrace();
Log.e("LanLinkProvider","Sending udp identity package failed");
}
return null;
@@ -300,21 +261,25 @@ public class LanLinkProvider extends BaseLinkProvider {
@Override
public void onNetworkChange() {
onStop();
onStart();
}
@Override
public void onStop() {
udpAcceptor.unbind();
tcpAcceptor.unbind();
}
/*
@Override
public int getPriority() {
return 1000;
}
*/
@Override
public String getName() {
return "LanLinkProvider";

View File

@@ -1,23 +1,3 @@
/*
* Copyright 2014 Albert Vaca Cintora <albertvaka@gmail.com>
*
* 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 the Free Software Foundation; either version 2 of
* the License or (at your option) version 3 or any later version
* accepted by the membership of KDE e.V. (or its successor approved
* by the membership of KDE e.V.), which shall act as a proxy
* defined in Section 14 of version 3 of the license.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.kde.kdeconnect.Backends.LoopbackBackend;
import android.util.Log;

View File

@@ -0,0 +1,43 @@
package org.kde.kdeconnect.Backends.LoopbackBackend;
import android.content.Context;
import org.kde.kdeconnect.Backends.BaseLinkProvider;
import org.kde.kdeconnect.NetworkPackage;
public class LoopbackLinkProvider extends BaseLinkProvider {
private Context context;
public LoopbackLinkProvider(Context context) {
this.context = context;
}
@Override
public void onStart() {
onNetworkChange();
}
@Override
public void onStop() {
}
@Override
public void onNetworkChange() {
NetworkPackage np = NetworkPackage.createIdentityPackage(context);
connectionAccepted(np, new LoopbackLink(this));
}
@Override
public int getPriority() {
return 0;
}
@Override
public String getName() {
return "LoopbackLinkProvider";
}
}

View File

@@ -1,23 +1,3 @@
/*
* Copyright 2014 Albert Vaca Cintora <albertvaka@gmail.com>
*
* 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 the Free Software Foundation; either version 2 of
* the License or (at your option) version 3 or any later version
* accepted by the membership of KDE e.V. (or its successor approved
* by the membership of KDE e.V.), which shall act as a proxy
* defined in Section 14 of version 3 of the license.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.kde.kdeconnect;
import android.app.Service;
@@ -46,11 +26,11 @@ import java.util.concurrent.locks.ReentrantLock;
public class BackgroundService extends Service {
private final ArrayList<BaseLinkProvider> linkProviders = new ArrayList<BaseLinkProvider>();
private ArrayList<BaseLinkProvider> linkProviders = new ArrayList<BaseLinkProvider>();
private final HashMap<String, Device> devices = new HashMap<String, Device>();
private HashMap<String, Device> devices = new HashMap<String, Device>();
private final Device.PairingCallback devicePairingCallback = new Device.PairingCallback() {
private Device.PairingCallback devicePairingCallback = new Device.PairingCallback() {
@Override
public void incomingRequest() {
if (deviceListChangedCallback != null) deviceListChangedCallback.onDeviceListChanged();
@@ -83,7 +63,7 @@ public class BackgroundService extends Service {
}
}
private void registerLinkProviders() {
public void registerLinkProviders() {
SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(this);
@@ -101,7 +81,7 @@ public class BackgroundService extends Service {
return devices.get(id);
}
private final BaseLinkProvider.ConnectionReceiver deviceListener = new BaseLinkProvider.ConnectionReceiver() {
private BaseLinkProvider.ConnectionReceiver deviceListener = new BaseLinkProvider.ConnectionReceiver() {
@Override
public void onConnectionReceived(final NetworkPackage identityPackage, final BaseLink link) {
@@ -116,6 +96,7 @@ public class BackgroundService extends Service {
device.addLink(identityPackage, link);
} else {
Log.i("BackgroundService", "addLink,unknown device: " + deviceId);
String name = identityPackage.getString("deviceName");
device = new Device(BackgroundService.this, identityPackage, link);
devices.put(deviceId, device);
device.addPairingCallback(devicePairingCallback);
@@ -285,13 +266,14 @@ public class BackgroundService extends Service {
void onServiceStart(BackgroundService service);
}
private final static ArrayList<InstanceCallback> callbacks = new ArrayList<InstanceCallback>();
private static ArrayList<InstanceCallback> callbacks = new ArrayList<InstanceCallback>();
private final static Lock mutex = new ReentrantLock(true);
private static final Lock mutex = new ReentrantLock(true);
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
//This will be called for each intent launch, even if the service is already started and it is reused
Log.i("BackgroundService","onStartCommand");
mutex.lock();
for (InstanceCallback c : callbacks) {
c.onServiceStart(this);

View File

@@ -1,23 +1,3 @@
/*
* Copyright 2014 Albert Vaca Cintora <albertvaka@gmail.com>
*
* 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 the Free Software Foundation; either version 2 of
* the License or (at your option) version 3 or any later version
* accepted by the membership of KDE e.V. (or its successor approved
* by the membership of KDE e.V.), which shall act as a proxy
* defined in Section 14 of version 3 of the license.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.kde.kdeconnect;
import android.app.Notification;
@@ -55,10 +35,10 @@ import java.util.TimerTask;
public class Device implements BaseLink.PackageReceiver {
private final Context context;
private Context context;
private final String deviceId;
private final String name;
private String deviceId;
private String name;
public PublicKey publicKey;
private int notificationId;
private int protocolVersion;
@@ -81,11 +61,11 @@ public class Device implements BaseLink.PackageReceiver {
private ArrayList<PairingCallback> pairingCallback = new ArrayList<PairingCallback>();
private Timer pairingTimer;
private final ArrayList<BaseLink> links = new ArrayList<BaseLink>();
private final HashMap<String, Plugin> plugins = new HashMap<String, Plugin>();
private final HashMap<String, Plugin> failedPlugins = new HashMap<String, Plugin>();
private ArrayList<BaseLink> links = new ArrayList<BaseLink>();
private HashMap<String, Plugin> plugins = new HashMap<String, Plugin>();
private HashMap<String, Plugin> failedPlugins = new HashMap<String, Plugin>();
private final SharedPreferences settings;
SharedPreferences settings;
//Remembered trusted device, we need to wait for a incoming devicelink to communicate
Device(Context context, String deviceId) {
@@ -229,6 +209,8 @@ public class Device implements BaseLink.PackageReceiver {
public void unpair() {
if (!isPaired()) return;
//Log.e("Device","Unpairing (unpair)");
pairStatus = PairStatus.NotPaired;
@@ -341,14 +323,12 @@ public class Device implements BaseLink.PackageReceiver {
Log.i("Device","addLink "+link.getLinkProvider().getName()+" -> "+getName() + " active links: "+ links.size());
/*
Collections.sort(links, new Comparator<BaseLink>() {
@Override
public int compare(BaseLink o, BaseLink o2) {
return o2.getLinkProvider().getPriority() - o.getLinkProvider().getPriority();
}
});
*/
link.addPackageReceiver(this);
@@ -428,7 +408,7 @@ public class Device implements BaseLink.PackageReceiver {
.setTicker(res.getString(R.string.pair_requested))
.setSmallIcon(android.R.drawable.ic_menu_help)
.setAutoCancel(true)
.setDefaults(Notification.DEFAULT_ALL)
.setDefaults(Notification.DEFAULT_SOUND)
.build();
@@ -472,19 +452,13 @@ public class Device implements BaseLink.PackageReceiver {
}
} else if (!isPaired()) {
unpair();
//TODO: Notify the other side that we don't trust them
Log.e("onPackageReceived","Device not paired, ignoring package!");
} else {
for (Plugin plugin : plugins.values()) {
try {
plugin.onPackageReceived(np);
} catch (Exception e) {
e.printStackTrace();
Log.e("Device", "Exception in "+plugin.getDisplayName()+"'s onPackageReceived()");
}
plugin.onPackageReceived(np);
}
}
@@ -517,19 +491,13 @@ public class Device implements BaseLink.PackageReceiver {
ArrayList<BaseLink> mLinks = new ArrayList<BaseLink>(links);
boolean success = false;
try {
for (BaseLink link : mLinks) {
if (useEncryption) {
success = link.sendPackageEncrypted(np, publicKey);
} else {
success = link.sendPackage(np);
}
if (success) break;
for(BaseLink link : mLinks) {
if (useEncryption) {
success = link.sendPackageEncrypted(np, publicKey);
} else {
success = link.sendPackage(np);
}
} catch(Exception e) {
e.printStackTrace();
Log.e("sendPackage","Error while sending package");
success = false;
if (success) break;
}
if (success) {
@@ -579,25 +547,24 @@ public class Device implements BaseLink.PackageReceiver {
@Override
public void run() {
boolean success;
try {
success = plugin.onCreate();
boolean success = plugin.onCreate();
if (!success) {
Log.e("addPlugin", "plugin failed to load " + name);
failedPlugins.put(name, plugin);
return;
}
} catch (Exception e) {
success = false;
failedPlugins.put(name, plugin);
e.printStackTrace();
Log.e("addPlugin", "Exception loading plugin " + name);
return;
}
if (success) {
//Log.e("addPlugin","added " + name);
failedPlugins.remove(name);
plugins.put(name, plugin);
} else {
Log.e("addPlugin", "plugin failed to load " + name);
plugins.remove(name);
failedPlugins.put(name, plugin);
}
//Log.e("addPlugin","added " + name);
failedPlugins.remove(name);
plugins.put(name, plugin);
for (PluginsChangedListener listener : pluginsChangedListeners) {
listener.onPluginsChanged(Device.this);
@@ -615,7 +582,6 @@ public class Device implements BaseLink.PackageReceiver {
if (plugin == null) {
if (failedPlugin == null) {
//Not found
return false;
}
plugin = failedPlugin;
@@ -623,22 +589,25 @@ public class Device implements BaseLink.PackageReceiver {
try {
plugin.onDestroy();
//Log.e("removePlugin","removed " + name);
} catch (Exception e) {
e.printStackTrace();
Log.e("removePlugin","Exception calling onDestroy for plugin "+name);
return false;
}
//Log.e("removePlugin","removed " + name);
for (PluginsChangedListener listener : pluginsChangedListeners) {
listener.onPluginsChanged(this);
}
return true;
}
public void setPluginEnabled(String pluginName, boolean value) {
settings.edit().putBoolean(pluginName,value).commit();
if (value && isPaired() && isReachable()) addPlugin(pluginName);
if (value) addPlugin(pluginName);
else removePlugin(pluginName);
}
@@ -648,9 +617,6 @@ public class Device implements BaseLink.PackageReceiver {
return enabled;
}
public boolean hasPluginsLoaded() {
return !plugins.isEmpty() || !failedPlugins.isEmpty();
}
public void reloadPluginsFromSettings() {
@@ -670,7 +636,9 @@ public class Device implements BaseLink.PackageReceiver {
}
}
//No need to call PluginsChangedListeners because addPlugin and removePlugin already do so
for (PluginsChangedListener listener : pluginsChangedListeners) {
listener.onPluginsChanged(this);
}
}
public HashMap<String,Plugin> getLoadedPlugins() {
@@ -685,7 +653,7 @@ public class Device implements BaseLink.PackageReceiver {
void onPluginsChanged(Device device);
}
private final ArrayList<PluginsChangedListener> pluginsChangedListeners = new ArrayList<PluginsChangedListener>();
private ArrayList<PluginsChangedListener> pluginsChangedListeners = new ArrayList<PluginsChangedListener>();
public void addPluginsChangedListener(PluginsChangedListener listener) {
pluginsChangedListeners.add(listener);

View File

@@ -1,23 +1,3 @@
/*
* Copyright 2014 Albert Vaca Cintora <albertvaka@gmail.com>
*
* 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 the Free Software Foundation; either version 2 of
* the License or (at your option) version 3 or any later version
* accepted by the membership of KDE e.V. (or its successor approved
* by the membership of KDE e.V.), which shall act as a proxy
* defined in Section 14 of version 3 of the license.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.kde.kdeconnect.Helpers;
import android.content.Context;
@@ -33,7 +13,7 @@ public class AppsHelper {
try {
PackageManager pm = context.getPackageManager();
ApplicationInfo ai = pm.getApplicationInfo(packageName, 0);
ApplicationInfo ai = pm.getApplicationInfo( packageName, 0);
return pm.getApplicationLabel(ai).toString();
@@ -69,4 +49,4 @@ public class AppsHelper {
}
}

View File

@@ -1,29 +1,11 @@
/*
* Copyright 2014 Albert Vaca Cintora <albertvaka@gmail.com>
*
* 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 the Free Software Foundation; either version 2 of
* the License or (at your option) version 3 or any later version
* accepted by the membership of KDE e.V. (or its successor approved
* by the membership of KDE e.V.), which shall act as a proxy
* defined in Section 14 of version 3 of the license.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.kde.kdeconnect.Helpers;
import android.content.Context;
import android.database.Cursor;
import android.net.Uri;
import android.provider.ContactsContract;
import android.provider.ContactsContract.PhoneLookup;
import android.util.Log;
public class ContactsHelper {
@@ -49,7 +31,7 @@ public class ContactsHelper {
// Take the first match only
if (cursor != null && cursor.moveToFirst()) {
int nameIndex = cursor.getColumnIndex(PhoneLookup.DISPLAY_NAME);
int nameIndex = cursor.getColumnIndex(ContactsContract.PhoneLookup.DISPLAY_NAME);
if (nameIndex != -1) {
String name = cursor.getString(nameIndex);
//Log.e("PhoneNumberLookup", "success: " + name);
@@ -63,4 +45,4 @@ public class ContactsHelper {
return number;
}
}
}

View File

@@ -1,23 +1,3 @@
/*
* Copyright 2014 Albert Vaca Cintora <albertvaka@gmail.com>
*
* 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 the Free Software Foundation; either version 2 of
* the License or (at your option) version 3 or any later version
* accepted by the membership of KDE e.V. (or its successor approved
* by the membership of KDE e.V.), which shall act as a proxy
* defined in Section 14 of version 3 of the license.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.kde.kdeconnect.Helpers;
import android.content.res.Configuration;
@@ -31,7 +11,7 @@ public class DeviceHelper {
//from https://github.com/meetup/android-device-names
//Converted to java using:
//cat android_models.properties | awk -F'=' '{sub(/ *$/, "", $1)} sub(/^ */, "", $2) { if ($2 != "") print "humanReadableNames.put(\""$1"\",\"" $2 "\");"}'
private final static HashMap<String,String> humanReadableNames = new HashMap<String,String>();
private static HashMap<String,String> humanReadableNames = new HashMap<String,String>();
static {
humanReadableNames.put("5860E","Coolpad Quattro 4G");
humanReadableNames.put("ADR6300","HTC Droid Incredible");
@@ -44,9 +24,6 @@ public class DeviceHelper {
humanReadableNames.put("C5155","Kyocera Rise");
humanReadableNames.put("C5170","Kyocera Hydro");
humanReadableNames.put("C6603","Sony Xperia Z");
humanReadableNames.put("C6606","Sony Xperia Z");
humanReadableNames.put("C6903","Sony Xperia Z1");
humanReadableNames.put("D6503","Sony Xperia Z2");
humanReadableNames.put("Desire_HD","HTC Desire HD");
humanReadableNames.put("DROID2_GLOBAL","Motorola Droid 2 Global");
humanReadableNames.put("DROID2","Motorola Droid 2");
@@ -63,45 +40,34 @@ public class DeviceHelper {
humanReadableNames.put("Galaxy_Nexus","Samsung Galaxy Nexus");
humanReadableNames.put("google_sdk","Android Emulator");
humanReadableNames.put("GT-I8160","Samsung Galaxy Ace 2");
humanReadableNames.put("GT-I8190N","Samsung Galaxy S III Mini");
humanReadableNames.put("GT-I8190","Samsung Galaxy S III Mini");
humanReadableNames.put("GT-I9000","Samsung Galaxy S");
humanReadableNames.put("GT-I9001","Samsung Galaxy S Plus");
humanReadableNames.put("GT-I9070","Samsung Galaxy S Advance");
humanReadableNames.put("GT-I9082","Samsung Galaxy Grand");
humanReadableNames.put("GT-I9100M","Samsung Galaxy S II");
humanReadableNames.put("GT-I9100P","Samsung Galaxy S II");
humanReadableNames.put("GT-I9100","Samsung Galaxy S II");
humanReadableNames.put("GT-I9100T","Samsung Galaxy S II");
humanReadableNames.put("GT-I9195","Samsung Galaxy S4 Mini");
humanReadableNames.put("GT-I9300","Samsung Galaxy S III");
humanReadableNames.put("GT-I9300T","Samsung Galaxy S III");
humanReadableNames.put("GT-I9305","Samsung Galaxy S III");
humanReadableNames.put("GT-I9305T","Samsung Galaxy S III");
humanReadableNames.put("GT-I9500","Samsung Galaxy S4");
humanReadableNames.put("GT-I9505","Samsung Galaxy S4");
humanReadableNames.put("GT-N5110","Samsung Galaxy Note 8.0");
humanReadableNames.put("GT-I9505","Samsung Galaxy S 4");
humanReadableNames.put("GT-N7000","Samsung Galaxy Note");
humanReadableNames.put("GT-N7100","Samsung Galaxy Note II");
humanReadableNames.put("GT-N7105","Samsung Galaxy Note II");
humanReadableNames.put("GT-N8013","Samsung Galaxy Note 10.1");
humanReadableNames.put("GT-P3113","Samsung Galaxy Tab 2 7.0");
humanReadableNames.put("GT-P5113","Samsnung Galaxy Tab 2 10.1");
humanReadableNames.put("GT-P5210","Samsung Galaxy Tab 3 10.1");
humanReadableNames.put("GT-P7510","Samsung Galaxy Tab 10.1");
humanReadableNames.put("GT-S5360","Samsung Galaxy Y");
humanReadableNames.put("GT-S5570","Samsung Galaxy Mini");
humanReadableNames.put("GT-S5830i","Samsung Galaxy Ace");
humanReadableNames.put("GT-S5830","Samsung Galaxy Ace");
humanReadableNames.put("GT-S7562","Samsung Galaxy S Duos");
humanReadableNames.put("HTC6435LVW","HTC Droid DNA");
humanReadableNames.put("HTC6500LVW","HTC One");
humanReadableNames.put("HTC_Desire_HD_A9191","HTC Desire HD");
humanReadableNames.put("HTCEVODesign4G","HTC Evo Design 4G");
humanReadableNames.put("HTCEVOV4G","HTC Evo V 4G");
humanReadableNames.put("HTCONE","HTC One");
humanReadableNames.put("HTC_PH39100","HTC Vivid 4G");
humanReadableNames.put("HTC_PN071","HTC One");
humanReadableNames.put("HTC_Sensation_Z710e","HTC Sensation");
humanReadableNames.put("HTC_VLE_U","HTC One S");
humanReadableNames.put("KFJWA","Kindle Fire HD 8.9");
@@ -109,17 +75,9 @@ public class DeviceHelper {
humanReadableNames.put("KFOT","Kindle Fire");
humanReadableNames.put("KFTT","Kindle Fire HD 7");
humanReadableNames.put("LG-C800","LG myTouch Q");
humanReadableNames.put("LG-D800","LG G2");
humanReadableNames.put("LG-D801","LG G2");
humanReadableNames.put("LG-D802","LG G2");
humanReadableNames.put("LG-E739","LG MyTouch e739");
humanReadableNames.put("LG-E970","LG Optimus G");
humanReadableNames.put("LG-E980","LG Optimus G Pro");
humanReadableNames.put("LGL55C","LG LGL55C");
humanReadableNames.put("LG-LS840","LG Viper");
humanReadableNames.put("LG-LS970","LG Optimus G");
humanReadableNames.put("LG-LS980","LG G2");
humanReadableNames.put("LGMS769","LG Optimus L9");
humanReadableNames.put("LG-MS770","LG Motion 4G");
humanReadableNames.put("LG-MS910","LG Esteem");
humanReadableNames.put("LG-P509","LG Optimus T");
@@ -135,20 +93,18 @@ public class DeviceHelper {
humanReadableNames.put("MOTWX435KT","Motorola Triumph");
humanReadableNames.put("myTouch_4G_Slide","HTC myTouch 4G Slide");
humanReadableNames.put("N860","ZTE Warp N860");
humanReadableNames.put("Nexus_10","Nexus 10");
humanReadableNames.put("Nexus_4","Nexus 4");
humanReadableNames.put("Nexus_5","Nexus 5");
humanReadableNames.put("Nexus_7","Nexus 7");
humanReadableNames.put("Nexus_S_4G","Nexus S 4G");
humanReadableNames.put("Nexus_S","Nexus S");
humanReadableNames.put("Nexus_10","Google Nexus 10");
humanReadableNames.put("Nexus_4","Google Nexus 4");
humanReadableNames.put("Nexus_7","Asus Nexus 7");
humanReadableNames.put("Nexus_S_4G","Samsung Nexus S 4G");
humanReadableNames.put("Nexus_S","Samsung Nexus S");
humanReadableNames.put("PantechP9070","Pantech Burst");
humanReadableNames.put("PC36100","HTC Evo 4G");
humanReadableNames.put("PG06100","HTC EVO Shift 4G");
humanReadableNames.put("PG86100","HTC Evo 3D");
humanReadableNames.put("PH44100","HTC Evo Design 4G");
humanReadableNames.put("SAMSUNG-SGH-I317","Samsung Galaxy Note II");
humanReadableNames.put("SAMSUNG-SGH-I337","Samsung Galaxy S4");
humanReadableNames.put("SAMSUNG-SGH-I537","Samsung Galaxy S4 Active");
humanReadableNames.put("SAMSUNG-SGH-I337","Samsung Galaxy S 4");
humanReadableNames.put("SAMSUNG-SGH-I717","Samsung Galaxy Note");
humanReadableNames.put("SAMSUNG-SGH-I727","Samsung Skyrocket");
humanReadableNames.put("SAMSUNG-SGH-I747","Samsung Galaxy S III");
@@ -156,27 +112,22 @@ public class DeviceHelper {
humanReadableNames.put("SAMSUNG-SGH-I897","Samsung Captivate");
humanReadableNames.put("SAMSUNG-SGH-I927","Samsung Captivate Glide");
humanReadableNames.put("SAMSUNG-SGH-I997","Samsung Infuse 4G");
humanReadableNames.put("SAMSUNG-SM-N900A","Samsung Galaxy Note 3");
humanReadableNames.put("SCH-I200","Samsung Galaxy Stellar");
humanReadableNames.put("SCH-I405","Samsung Stratosphere");
humanReadableNames.put("SCH-I415","Samsung Galaxy Stratosphere II");
humanReadableNames.put("SCH-I500","Samsung Fascinate");
humanReadableNames.put("SCH-I510","Samsung Droid Charge");
humanReadableNames.put("SCH-I535","Samsung Galaxy S III");
humanReadableNames.put("SCH-I545","Samsung Galaxy S4");
humanReadableNames.put("SCH-I545","Samsung Galaxy S 4");
humanReadableNames.put("SCH-I605","Samsung Galaxy Note II");
humanReadableNames.put("SCH-I800","Samsung Galaxy Tab 7.0");
humanReadableNames.put("SCH-R530M","Samsung Galaxy S III");
humanReadableNames.put("SCH-R530U","Samsung Galaxy S III");
humanReadableNames.put("SCH-R720","Samsung Admire");
humanReadableNames.put("SCH-S720C","Samsung Proclaim");
humanReadableNames.put("SCH-S738C","Samsung Galaxy Centura");
humanReadableNames.put("SGH-I317M","Samsung Galaxy Note II");
humanReadableNames.put("SGH-I337M","Samsung Galaxy S4");
humanReadableNames.put("SGH-I727R","Samsung Galaxy S II");
humanReadableNames.put("SGH-I747M","Samsung Galaxy S III");
humanReadableNames.put("SGH-M919","Samsung Galaxy S4");
humanReadableNames.put("SGH-T599N","Samsung Galaxy Exhibit");
humanReadableNames.put("SGH-M919","Samsung Galaxy S 4");
humanReadableNames.put("SGH-T679","Samsung Exhibit II");
humanReadableNames.put("SGH-T769","Samsung Galaxy S Blaze");
humanReadableNames.put("SGH-T889","Samsung Galaxy Note II");
@@ -184,44 +135,24 @@ public class DeviceHelper {
humanReadableNames.put("SGH-T959V","Samsung Galaxy S 4G");
humanReadableNames.put("SGH-T989D","Samsung Galaxy S II");
humanReadableNames.put("SGH-T989","Samsung Galaxy S II");
humanReadableNames.put("SGH-T999L","Samsung Galaxy S III");
humanReadableNames.put("SGH-T999","Samsung Galaxy S III");
humanReadableNames.put("SGH-T999V","Samsung Galaxy S III");
humanReadableNames.put("SHV-E210S","Samsung Galaxy S III");
humanReadableNames.put("SM-N9005","Samsung Galaxy Note 3");
humanReadableNames.put("SM-N900P","Samsung Galaxy Note 3");
humanReadableNames.put("SM-N900T","Samsung Galaxy Note 3");
humanReadableNames.put("SM-N900V","Samsung Galaxy Note 3");
humanReadableNames.put("SM-N900W8","Samsung Galaxy Note 3");
humanReadableNames.put("SM-T210R","Samsung Galaxy Tab 3 7.0");
humanReadableNames.put("SM-T310","Samsung Galaxy Tab 3 8.0");
humanReadableNames.put("SPH-D600","Samsung Conquer 4G");
humanReadableNames.put("SPH-D700","Samsung Epic 4G");
humanReadableNames.put("SPH-D710BST","Samsung Galaxy S II");
humanReadableNames.put("SPH-D710","Samsung Epic");
humanReadableNames.put("SPH-D710VMUB","Samsung Galaxy S II");
humanReadableNames.put("SPH-L300","Samsung Galaxy Victory");
humanReadableNames.put("SPH-L710","Samsung Galaxy S III");
humanReadableNames.put("SPH-L720","Samsung Galaxy S4");
humanReadableNames.put("SPH-L720","Samsung Galaxy S 4");
humanReadableNames.put("SPH-L900","Samsung Galaxy Note II");
humanReadableNames.put("SPH-M820-BST","Samsung Galaxy Prevail");
humanReadableNames.put("SPH-M830","Samsung Galaxy Rush");
humanReadableNames.put("SPH-M930BST","Samsung Transform Ultra");
humanReadableNames.put("ST25i","Sony Xperia U");
humanReadableNames.put("Transformer_Prime_TF201","Asus Eee Pad Transformer Prime");
humanReadableNames.put("Transformer_TF101","Asus Eee Pad Transformer");
humanReadableNames.put("VM670","LG Optimus V");
humanReadableNames.put("VS840_4G","LG Lucid 4G");
humanReadableNames.put("VS910_4G","LG Revolution 4G");
humanReadableNames.put("VS920_4G","LG Spectrum 4G");
humanReadableNames.put("VS980_4G","LG G2");
humanReadableNames.put("Xoom","Motorola Xoom");
humanReadableNames.put("XT1030","Motorola Droid Mini");
humanReadableNames.put("XT1032","Motorola Moto G");
humanReadableNames.put("XT1058","Motorola Moto X");
humanReadableNames.put("XT1060","Motorola Moto X");
humanReadableNames.put("XT1080","Motorola Droid Ultra");
humanReadableNames.put("XT897","Motorola Photo Q");
humanReadableNames.put("XT907","Motorola Droid Razr M");
}

View File

@@ -0,0 +1,23 @@
package org.kde.kdeconnect.Helpers;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
public class ImagesHelper {
public static Bitmap drawableToBitmap (Drawable drawable) {
if (drawable instanceof BitmapDrawable) {
return ((BitmapDrawable)drawable).getBitmap();
}
Bitmap bitmap = Bitmap.createBitmap(drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight(), Bitmap.Config.ARGB_8888);
Canvas canvas = new Canvas(bitmap);
drawable.setBounds(0, 0, canvas.getWidth(), canvas.getHeight());
drawable.draw(canvas);
return bitmap;
}
}

View File

@@ -1,23 +1,3 @@
/*
* Copyright 2014 Albert Vaca Cintora <albertvaka@gmail.com>
*
* 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 the Free Software Foundation; either version 2 of
* the License or (at your option) version 3 or any later version
* accepted by the membership of KDE e.V. (or its successor approved
* by the membership of KDE e.V.), which shall act as a proxy
* defined in Section 14 of version 3 of the license.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.kde.kdeconnect;
import android.content.BroadcastReceiver;

View File

@@ -1,23 +1,3 @@
/*
* Copyright 2014 Albert Vaca Cintora <albertvaka@gmail.com>
*
* 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 the Free Software Foundation; either version 2 of
* the License or (at your option) version 3 or any later version
* accepted by the membership of KDE e.V. (or its successor approved
* by the membership of KDE e.V.), which shall act as a proxy
* defined in Section 14 of version 3 of the license.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.kde.kdeconnect;
import android.content.Context;
@@ -28,6 +8,7 @@ import android.util.Base64;
import android.util.Log;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import org.kde.kdeconnect.Helpers.DeviceHelper;
import org.kde.kdeconnect.UserInterface.MainSettingsActivity;
@@ -56,7 +37,6 @@ public class NetworkPackage {
public final static String PACKAGE_TYPE_NOTIFICATION = "kdeconnect.notification";
public final static String PACKAGE_TYPE_CLIPBOARD = "kdeconnect.clipboard";
public final static String PACKAGE_TYPE_MPRIS = "kdeconnect.mpris";
public final static String PACKAGE_TYPE_MOUSEPAD = "kdeconnect.mousepad";
public final static String PACKAGE_TYPE_SHARE = "kdeconnect.share";
private long mId;

View File

@@ -1,23 +1,3 @@
/*
* Copyright 2014 Albert Vaca Cintora <albertvaka@gmail.com>
*
* 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 the Free Software Foundation; either version 2 of
* the License or (at your option) version 3 or any later version
* accepted by the membership of KDE e.V. (or its successor approved
* by the membership of KDE e.V.), which shall act as a proxy
* defined in Section 14 of version 3 of the license.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.kde.kdeconnect.Plugins.BatteryPlugin;
import android.app.Activity;
@@ -28,6 +8,7 @@ import android.content.Intent;
import android.content.IntentFilter;
import android.graphics.drawable.Drawable;
import android.os.BatteryManager;
import android.util.Log;
import android.widget.Button;
import org.kde.kdeconnect.NetworkPackage;
@@ -40,7 +21,11 @@ public class BatteryPlugin extends Plugin {
private static final int THRESHOLD_EVENT_NONE= 0;
private static final int THRESHOLD_EVENT_BATTERY_LOW = 1;
private NetworkPackage lastInfo = null;
NetworkPackage lastInfo = null;
/*static {
PluginFactory.registerPlugin(BatteryPlugin.class);
}*/
@Override
public String getPluginName() {
@@ -62,17 +47,12 @@ public class BatteryPlugin extends Plugin {
return context.getResources().getDrawable(R.drawable.icon);
}
@Override
public boolean hasSettings() {
return false;
}
@Override
public boolean isEnabledByDefault() {
return true;
}
private final BroadcastReceiver receiver = new BroadcastReceiver() {
private BroadcastReceiver receiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent batteryIntent) {
@@ -134,7 +114,7 @@ public class BatteryPlugin extends Plugin {
}
@Override
public AlertDialog getErrorDialog(Activity deviceActivity) {
public AlertDialog getErrorDialog(Context baseContext) {
return null;
}

View File

@@ -1,23 +1,3 @@
/*
* Copyright 2014 Albert Vaca Cintora <albertvaka@gmail.com>
*
* 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 the Free Software Foundation; either version 2 of
* the License or (at your option) version 3 or any later version
* accepted by the membership of KDE e.V. (or its successor approved
* by the membership of KDE e.V.), which shall act as a proxy
* defined in Section 14 of version 3 of the license.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.kde.kdeconnect.Plugins.ClibpoardPlugin;
import android.content.ClipData;
@@ -30,11 +10,11 @@ import org.kde.kdeconnect.NetworkPackage;
public class ClipboardListener {
private final Context context;
private Context context;
private String currentContent;
private ClipboardManager cm = null;
private ClipboardManager.OnPrimaryClipChangedListener listener;
ClipboardManager.OnPrimaryClipChangedListener listener;
ClipboardListener(final Context ctx, final Device device) {
context = ctx;

View File

@@ -1,28 +1,9 @@
/*
* Copyright 2014 Albert Vaca Cintora <albertvaka@gmail.com>
*
* 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 the Free Software Foundation; either version 2 of
* the License or (at your option) version 3 or any later version
* accepted by the membership of KDE e.V. (or its successor approved
* by the membership of KDE e.V.), which shall act as a proxy
* defined in Section 14 of version 3 of the license.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.kde.kdeconnect.Plugins.ClibpoardPlugin;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.graphics.drawable.Drawable;
import android.widget.Button;
@@ -32,6 +13,10 @@ import org.kde.kdeconnect_tp.R;
public class ClipboardPlugin extends Plugin {
/*static {
PluginFactory.registerPlugin(ClipboardPlugin.class);
}*/
@Override
public String getPluginName() {
return "plugin_clipboard";
@@ -51,11 +36,6 @@ public class ClipboardPlugin extends Plugin {
return context.getResources().getDrawable(R.drawable.icon);
}
@Override
public boolean hasSettings() {
return false;
}
@Override
public boolean isEnabledByDefault() {
//Disabled by default due to just one direction sync(incoming clipboard change) in early version of android.
@@ -88,7 +68,18 @@ public class ClipboardPlugin extends Plugin {
}
@Override
public AlertDialog getErrorDialog(Activity deviceActivity) { return null; }
public AlertDialog getErrorDialog(Context baseContext) {
return new AlertDialog.Builder(baseContext)
.setTitle(R.string.pref_plugin_clipboard)
.setMessage(R.string.plugin_not_available)
.setPositiveButton("Ok",new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
}
})
.create();
}
@Override
public Button getInterfaceButton(Activity activity) {

View File

@@ -1,34 +1,10 @@
/*
* Copyright 2014 Albert Vaca Cintora <albertvaka@gmail.com>
*
* 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 the Free Software Foundation; either version 2 of
* the License or (at your option) version 3 or any later version
* accepted by the membership of KDE e.V. (or its successor approved
* by the membership of KDE e.V.), which shall act as a proxy
* defined in Section 14 of version 3 of the license.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.kde.kdeconnect.Plugins.MprisPlugin;
import android.app.Activity;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.preference.PreferenceManager;
import android.support.v7.app.ActionBarActivity;
import android.util.Log;
import android.view.KeyEvent;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
@@ -46,13 +22,11 @@ import org.kde.kdeconnect_tp.R;
import java.util.ArrayList;
public class MprisActivity extends ActionBarActivity {
public class MprisActivity extends Activity {
//TODO: Add a loading spinner at the beginning (to distinguish the loading state from a no-players state).
//TODO: Add a loading spinner at the begginning (to distinguish the loading state from a no-players state).
//TODO 2: Add a message when no players are detected after loading completes
private String deviceId;
protected void connectToPlugin() {
final String deviceId = getIntent().getStringExtra("deviceId");
@@ -93,6 +67,8 @@ public class MprisActivity extends ActionBarActivity {
});
mpris.setPlayerListUpdatedHandler(new Handler() {
boolean firstLoad = true;
@Override
public void handleMessage(Message msg) {
final ArrayList<String> playerList = mpris.getPlayerList();
@@ -111,9 +87,6 @@ public class MprisActivity extends ActionBarActivity {
spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> arg0, View arg1, int pos, long id) {
if (pos >= playerList.size()) return;
((TextView) findViewById(R.id.now_playing_textview)).setText("");
String player = playerList.get(pos);
mpris.setPlayer(player);
@@ -131,18 +104,17 @@ public class MprisActivity extends ActionBarActivity {
@Override
public void onNothingSelected(AdapterView<?> arg0) {
mpris.setPlayer(null);
}
});
// restore the selected player
int position = adapter.getPosition(mpris.getPlayer());
if (position >= 0) {
spinner.setSelection(position);
}
}
});
if (firstLoad) {
firstLoad = false;
if (playerList.size() > 0) {
mpris.setPlayer(playerList.get(0));
}
}
}
});
@@ -151,7 +123,7 @@ public class MprisActivity extends ActionBarActivity {
}
private final BaseLinkProvider.ConnectionReceiver connectionReceiver = new BaseLinkProvider.ConnectionReceiver() {
BaseLinkProvider.ConnectionReceiver connectionReceiver = new BaseLinkProvider.ConnectionReceiver() {
@Override
public void onConnectionReceived(NetworkPackage identityPackage, BaseLink link) {
connectToPlugin();
@@ -174,78 +146,12 @@ public class MprisActivity extends ActionBarActivity {
});
}
/**
* Change current volume with provided step.
*
* @param mpris multimedia controller
* @param step step size volume change
*/
private void updateVolume(MprisPlugin mpris, int step) {
final int currentVolume = mpris.getVolume();
if(currentVolume < 100 || currentVolume > 0) {
int newVolume = currentVolume + step;
if(newVolume > 100) {
newVolume = 100;
} else if (newVolume <0 ) {
newVolume = 0;
}
mpris.setVolume(newVolume);
}
}
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
switch (keyCode) {
case KeyEvent.KEYCODE_VOLUME_UP:
BackgroundService.RunCommand(MprisActivity.this, new BackgroundService.InstanceCallback() {
@Override
public void onServiceStart(BackgroundService service) {
Device device = service.getDevice(deviceId);
MprisPlugin mpris = (MprisPlugin) device.getPlugin("plugin_mpris");
if (mpris == null) return;
updateVolume(mpris, 5);
}
});
return true;
case KeyEvent.KEYCODE_VOLUME_DOWN:
BackgroundService.RunCommand(MprisActivity.this, new BackgroundService.InstanceCallback() {
@Override
public void onServiceStart(BackgroundService service) {
Device device = service.getDevice(deviceId);
MprisPlugin mpris = (MprisPlugin) device.getPlugin("plugin_mpris");
if (mpris == null) return;
updateVolume(mpris, -5);
}
});
return true;
default:
return super.onKeyDown(keyCode, event);
}
}
@Override
public boolean onKeyUp(int keyCode, KeyEvent event) {
switch (keyCode) {
case KeyEvent.KEYCODE_VOLUME_UP:
return true;
case KeyEvent.KEYCODE_VOLUME_DOWN:
return true;
default:
return super.onKeyUp(keyCode, event);
}
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.mpris_control);
deviceId = getIntent().getStringExtra("deviceId");
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
String interval_time_str = prefs.getString(getString(R.string.mpris_time_key),
getString(R.string.mpris_time_default));
final int interval_time = Integer.parseInt(interval_time_str);
final String deviceId = getIntent().getStringExtra("deviceId");
BackgroundService.RunCommand(MprisActivity.this, new BackgroundService.InstanceCallback() {
@Override
@@ -294,7 +200,7 @@ public class MprisActivity extends ActionBarActivity {
Device device = service.getDevice(deviceId);
MprisPlugin mpris = (MprisPlugin)device.getPlugin("plugin_mpris");
if (mpris == null) return;
mpris.Seek(interval_time * -1);
mpris.Seek(-10000000); // -10 seconds. TODO: plugin settings UI?
}
});
}
@@ -309,7 +215,7 @@ public class MprisActivity extends ActionBarActivity {
Device device = service.getDevice(deviceId);
MprisPlugin mpris = (MprisPlugin)device.getPlugin("plugin_mpris");
if (mpris == null) return;
mpris.Seek(interval_time);
mpris.Seek(10000000); // 10 seconds. TODO: plugin settings UI?
}
});
}
@@ -332,12 +238,10 @@ public class MprisActivity extends ActionBarActivity {
((SeekBar)findViewById(R.id.volume_seek)).setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
@Override
public void onProgressChanged(SeekBar seekBar, int i, boolean b) {
}
public void onProgressChanged(SeekBar seekBar, int i, boolean b) { }
@Override
public void onStartTrackingTouch(SeekBar seekBar) {
}
public void onStartTrackingTouch(SeekBar seekBar) { }
@Override
public void onStopTrackingTouch(final SeekBar seekBar) {
@@ -349,14 +253,12 @@ public class MprisActivity extends ActionBarActivity {
if (mpris == null) return;
mpris.setVolume(seekBar.getProgress());
}
});
});
}
});
}
}

View File

@@ -1,23 +1,3 @@
/*
* Copyright 2014 Albert Vaca Cintora <albertvaka@gmail.com>
*
* 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 the Free Software Foundation; either version 2 of
* the License or (at your option) version 3 or any later version
* accepted by the membership of KDE e.V. (or its successor approved
* by the membership of KDE e.V.), which shall act as a proxy
* defined in Section 14 of version 3 of the license.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.kde.kdeconnect.Plugins.MprisPlugin;
import android.app.Activity;
@@ -50,6 +30,10 @@ public class MprisPlugin extends Plugin {
private String player = "";
private boolean playing = false;
/*static {
PluginFactory.registerPlugin(MprisPlugin.class);
}*/
@Override
public String getPluginName() {
return "plugin_mpris";
@@ -70,11 +54,6 @@ public class MprisPlugin extends Plugin {
return context.getResources().getDrawable(R.drawable.icon);
}
@Override
public boolean hasSettings() {
return true;
}
@Override
public boolean isEnabledByDefault() {
return true;
@@ -200,10 +179,6 @@ public class MprisPlugin extends Plugin {
requestPlayerStatus();
}
public String getPlayer() {
return player;
}
public int getVolume() {
return volume;
}
@@ -228,7 +203,7 @@ public class MprisPlugin extends Plugin {
}
@Override
public AlertDialog getErrorDialog(Activity deviceActivity) {
public AlertDialog getErrorDialog(Context baseContext) {
return null;
}

View File

@@ -1,23 +1,3 @@
/*
* Copyright 2014 Albert Vaca Cintora <albertvaka@gmail.com>
*
* 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 the Free Software Foundation; either version 2 of
* the License or (at your option) version 3 or any later version
* accepted by the membership of KDE e.V. (or its successor approved
* by the membership of KDE e.V.), which shall act as a proxy
* defined in Section 14 of version 3 of the license.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.kde.kdeconnect.Plugins.NotificationsPlugin;
import android.app.Service;
@@ -25,10 +5,9 @@ import android.content.Context;
import android.content.Intent;
import android.service.notification.NotificationListenerService;
import android.service.notification.StatusBarNotification;
import android.util.Log;
import java.util.ArrayList;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
public class NotificationReceiver extends NotificationListenerService {
@@ -37,7 +16,7 @@ public class NotificationReceiver extends NotificationListenerService {
void onNotificationRemoved(StatusBarNotification statusBarNotification);
}
private final ArrayList<NotificationListener> listeners = new ArrayList<NotificationListener>();
private ArrayList<NotificationListener> listeners = new ArrayList<NotificationListener>();
public void addListener(NotificationListener listener) {
listeners.add(listener);
@@ -67,38 +46,29 @@ public class NotificationReceiver extends NotificationListenerService {
//To use the service from the outer (name)space
public interface InstanceCallback {
void onServiceStart(NotificationReceiver service);
}
private final static ArrayList<InstanceCallback> callbacks = new ArrayList<InstanceCallback>();
private final static Lock mutex = new ReentrantLock(true);
//This will be called for each intent launch, even if the service is already started and is reused
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
//Log.e("NotificationReceiver", "onStartCommand");
mutex.lock();
for (InstanceCallback c : callbacks) {
c.onServiceStart(this);
}
callbacks.clear();
mutex.unlock();
return Service.START_STICKY;
}
public interface InstanceCallback {
void onServiceStart(NotificationReceiver service);
}
private static ArrayList<InstanceCallback> callbacks = new ArrayList<InstanceCallback>();
public static void Start(Context c) {
RunCommand(c, null);
}
public static void RunCommand(Context c, final InstanceCallback callback) {
if (callback != null) {
mutex.lock();
callbacks.add(callback);
mutex.unlock();
}
if (callback != null) callbacks.add(callback);
Intent serviceIntent = new Intent(c, NotificationReceiver.class);
c.startService(serviceIntent);
}

View File

@@ -1,23 +1,3 @@
/*
* Copyright 2014 Albert Vaca Cintora <albertvaka@gmail.com>
*
* 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 the Free Software Foundation; either version 2 of
* the License or (at your option) version 3 or any later version
* accepted by the membership of KDE e.V. (or its successor approved
* by the membership of KDE e.V.), which shall act as a proxy
* defined in Section 14 of version 3 of the license.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.kde.kdeconnect.Plugins.NotificationsPlugin;
import android.app.Activity;
@@ -26,22 +6,31 @@ import android.app.Notification;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.graphics.Bitmap;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.os.Bundle;
import android.provider.Settings;
import android.service.notification.StatusBarNotification;
import android.util.Base64;
import android.util.Log;
import android.widget.Button;
import org.kde.kdeconnect.Helpers.AppsHelper;
import org.kde.kdeconnect.Helpers.ImagesHelper;
import org.kde.kdeconnect.NetworkPackage;
import org.kde.kdeconnect.Plugins.Plugin;
import org.kde.kdeconnect.UserInterface.DeviceActivity;
import org.kde.kdeconnect_tp.R;
import java.io.ByteArrayOutputStream;
import java.nio.charset.Charset;
public class NotificationsPlugin extends Plugin implements NotificationReceiver.NotificationListener {
/*static {
PluginFactory.registerPlugin(NotificationsPlugin.class);
}*/
@Override
public String getPluginName() {
return "plugin_notifications";
@@ -62,11 +51,6 @@ public class NotificationsPlugin extends Plugin implements NotificationReceiver.
return context.getResources().getDrawable(R.drawable.icon);
}
@Override
public boolean hasSettings() {
return false;
}
@Override
public boolean isEnabledByDefault() {
return true;
@@ -132,9 +116,7 @@ public class NotificationsPlugin extends Plugin implements NotificationReceiver.
@Override
public boolean onCreate() {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR2) {
return false;
}
if (Build.VERSION.SDK_INT < 18) return false;
//Check for permissions
String notificationListenerList = Settings.Secure.getString(context.getContentResolver(), "enabled_notification_listeners");
@@ -164,11 +146,6 @@ public class NotificationsPlugin extends Plugin implements NotificationReceiver.
@Override
public void onDestroy() {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR2) {
return;
}
NotificationReceiver.RunCommand(context, new NotificationReceiver.InstanceCallback() {
@Override
public void onServiceStart(NotificationReceiver service) {
@@ -232,7 +209,7 @@ public class NotificationsPlugin extends Plugin implements NotificationReceiver.
np.set("id", id.serialize());
np.set("appName", appName == null? packageName : appName);
np.set("isClearable", statusBarNotification.isClearable());
np.set("ticker", getTickerText(notification));
np.set("ticker", (notification != null && notification.tickerText != null)? notification.tickerText.toString() : "");
np.set("time", Long.toString(statusBarNotification.getPostTime()));
if (requestAnswer) np.set("requestAnswer", true);
@@ -240,43 +217,7 @@ public class NotificationsPlugin extends Plugin implements NotificationReceiver.
}
/**
* Returns the ticker text of the notification.
* If device android version is KitKat or newer, the title and text of the notification is used
* instead the ticker text.
*/
private String getTickerText(Notification notification) {
final String TITLE_KEY = "android.title";
final String TEXT_KEY = "android.text";
String ticker = "";
if(notification != null) {
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
try {
Bundle extras = notification.extras;
String extraTitle = extras.getString(TITLE_KEY);
String extraText = extras.getString(TEXT_KEY);
if (extraTitle != null && extraText != null) {
ticker = extraTitle + " " + extraText;
} else if (extraTitle != null) {
ticker = extraTitle;
} else if (extraText != null) {
ticker = extraText;
}
} catch(Exception e) {
Log.w("NotificationPlugin","problem parsing notification extras");
e.printStackTrace();
}
}
if (ticker.isEmpty()) {
ticker = (notification.tickerText != null)? notification.tickerText.toString() : "";
}
}
return ticker;
}
@Override
@@ -340,10 +281,10 @@ public class NotificationsPlugin extends Plugin implements NotificationReceiver.
@Override
public AlertDialog getErrorDialog(final Activity deviceActivity) {
public AlertDialog getErrorDialog(final Context baseContext) {
if (Build.VERSION.SDK_INT < 18) {
return new AlertDialog.Builder(deviceActivity)
return new AlertDialog.Builder(baseContext)
.setTitle(R.string.pref_plugin_notifications)
.setMessage(R.string.plugin_not_available)
.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {
@@ -354,14 +295,14 @@ public class NotificationsPlugin extends Plugin implements NotificationReceiver.
})
.create();
} else {
return new AlertDialog.Builder(deviceActivity)
return new AlertDialog.Builder(baseContext)
.setTitle(R.string.pref_plugin_notifications)
.setMessage(R.string.no_permissions)
.setPositiveButton(R.string.open_settings, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
Intent intent = new Intent("android.settings.ACTION_NOTIFICATION_LISTENER_SETTINGS");
deviceActivity.startActivityForResult(intent, DeviceActivity.RESULT_NEEDS_RELOAD);
baseContext.startActivity(intent);
}
})
.setNegativeButton(R.string.cancel,new DialogInterface.OnClickListener() {

View File

@@ -1,23 +1,3 @@
/*
* Copyright 2014 Albert Vaca Cintora <albertvaka@gmail.com>
*
* 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 the Free Software Foundation; either version 2 of
* the License or (at your option) version 3 or any later version
* accepted by the membership of KDE e.V. (or its successor approved
* by the membership of KDE e.V.), which shall act as a proxy
* defined in Section 14 of version 3 of the license.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.kde.kdeconnect.Plugins.PingPlugin;
import android.app.Activity;
@@ -41,6 +21,10 @@ import org.kde.kdeconnect_tp.R;
public class PingPlugin extends Plugin {
/*static {
PluginFactory.registerPlugin(PingPlugin.class);
}*/
@Override
public String getPluginName() {
return "plugin_ping";
@@ -61,11 +45,6 @@ public class PingPlugin extends Plugin {
return context.getResources().getDrawable(R.drawable.icon);
}
@Override
public boolean hasSettings() {
return false;
}
@Override
public boolean isEnabledByDefault() {
return true;
@@ -96,28 +75,18 @@ public class PingPlugin extends Plugin {
PendingIntent.FLAG_UPDATE_CURRENT
);
int id;
String message;
if (np.has("message")) {
message = np.getString("message");
id = (int)System.currentTimeMillis();
} else {
message = "Ping!";
id = 42; //A unique id to create only one notification
}
Notification noti = new NotificationCompat.Builder(context)
.setContentTitle(device.getName())
.setContentText(message)
.setContentText("Ping!")
.setContentIntent(resultPendingIntent)
.setTicker(message)
.setTicker("Ping!")
.setSmallIcon(android.R.drawable.ic_dialog_alert)
.setAutoCancel(true)
.setDefaults(Notification.DEFAULT_ALL)
.setDefaults(Notification.DEFAULT_SOUND)
.build();
NotificationManager notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
notificationManager.notify(id, noti);
notificationManager.notify(42 /*a unique id to create only one notification*/, noti);
return true;
}
@@ -125,7 +94,7 @@ public class PingPlugin extends Plugin {
}
@Override
public AlertDialog getErrorDialog(Activity deviceActivity) {
public AlertDialog getErrorDialog(Context baseContext) {
return null;
}

View File

@@ -1,23 +1,3 @@
/*
* Copyright 2014 Albert Vaca Cintora <albertvaka@gmail.com>
*
* 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 the Free Software Foundation; either version 2 of
* the License or (at your option) version 3 or any later version
* accepted by the membership of KDE e.V. (or its successor approved
* by the membership of KDE e.V.), which shall act as a proxy
* defined in Section 14 of version 3 of the license.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.kde.kdeconnect.Plugins;
import android.app.Activity;
@@ -71,12 +51,6 @@ public abstract class Plugin {
*/
public abstract boolean isEnabledByDefault();
/**
* Return true if this plugin needs an specific UI settings.
*/
public abstract boolean hasSettings();
/**
* Initialize the listeners and structures in your plugin.
* Should return true if initialization was successful.
@@ -99,7 +73,7 @@ public abstract class Plugin {
* If onCreate returns false, should create a dialog explaining
* the problem (and how to fix it, if possible) to the user.
*/
public abstract AlertDialog getErrorDialog(Activity deviceActivity);
public abstract AlertDialog getErrorDialog(Context baseContext);
/**
* Creates a button that will be displayed in the user interface

View File

@@ -1,23 +1,3 @@
/*
* Copyright 2014 Albert Vaca Cintora <albertvaka@gmail.com>
*
* 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 the Free Software Foundation; either version 2 of
* the License or (at your option) version 3 or any later version
* accepted by the membership of KDE e.V. (or its successor approved
* by the membership of KDE e.V.), which shall act as a proxy
* defined in Section 14 of version 3 of the license.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.kde.kdeconnect.Plugins;
@@ -27,13 +7,11 @@ import android.util.Log;
import org.kde.kdeconnect.Device;
import org.kde.kdeconnect.Plugins.BatteryPlugin.BatteryPlugin;
import org.kde.kdeconnect.Plugins.MousePadPlugin.MousePadPlugin;
import org.kde.kdeconnect.Plugins.SftpPlugin.SftpPlugin;
import org.kde.kdeconnect.Plugins.ClibpoardPlugin.ClipboardPlugin;
import org.kde.kdeconnect.Plugins.MprisPlugin.MprisPlugin;
import org.kde.kdeconnect.Plugins.NotificationsPlugin.NotificationsPlugin;
import org.kde.kdeconnect.Plugins.PingPlugin.PingPlugin;
import org.kde.kdeconnect.Plugins.SharePlugin.SharePlugin;
import org.kde.kdeconnect.Plugins.TelephonyPlugin.TelephonyPlugin;
import java.util.Map;
@@ -44,14 +22,12 @@ public class PluginFactory {
public static class PluginInfo {
public PluginInfo(String pluginName, String displayName, String description, Drawable icon,
boolean enabledByDefault, boolean hasSettings) {
public PluginInfo(String pluginName, String displayName, String description, Drawable icon, boolean enabledByDefault) {
this.pluginName = pluginName;
this.displayName = displayName;
this.description = description;
this.icon = icon;
this.enabledByDefault = enabledByDefault;
this.hasSettings = hasSettings;
}
public String getPluginName() {
@@ -70,18 +46,15 @@ public class PluginFactory {
return icon;
}
public boolean hasSettings() { return hasSettings; }
public boolean isEnabledByDefault() {
return enabledByDefault;
}
private final String pluginName;
private final String displayName;
private final String description;
private String pluginName;
private String displayName;
private String description;
private final Drawable icon;
private final boolean enabledByDefault;
private final boolean hasSettings;
private boolean enabledByDefault;
}
@@ -89,7 +62,7 @@ public class PluginFactory {
private static final Map<String, PluginInfo> availablePluginsInfo = new TreeMap<String, PluginInfo>();
static {
//TODO: Use reflection to find all subclasses of Plugin, instead of adding them manually
//TODO: Avoid this factory having to know every plugin
PluginFactory.registerPlugin(TelephonyPlugin.class);
PluginFactory.registerPlugin(PingPlugin.class);
PluginFactory.registerPlugin(MprisPlugin.class);
@@ -97,8 +70,6 @@ public class PluginFactory {
PluginFactory.registerPlugin(BatteryPlugin.class);
PluginFactory.registerPlugin(SftpPlugin.class);
PluginFactory.registerPlugin(NotificationsPlugin.class);
PluginFactory.registerPlugin(MousePadPlugin.class);
PluginFactory.registerPlugin(SharePlugin.class);
}
public static PluginInfo getPluginInfo(Context context, String pluginName) {
@@ -107,8 +78,7 @@ public class PluginFactory {
try {
Plugin p = ((Plugin)availablePlugins.get(pluginName).newInstance());
p.setContext(context, null);
info = new PluginInfo(pluginName, p.getDisplayName(), p.getDescription(), p.getIcon(),
p.isEnabledByDefault(), p.hasSettings());
info = new PluginInfo(pluginName, p.getDisplayName(), p.getDescription(), p.getIcon(), p.isEnabledByDefault());
availablePluginsInfo.put(pluginName, info); //Cache it
return info;
} catch(Exception e) {
@@ -141,10 +111,10 @@ public class PluginFactory {
}
public static void registerPlugin(Class<? extends Plugin> pluginClass) {
public static void registerPlugin(Class pluginClass) {
try {
//I hate this but I need to create an instance because abstract static functions can't be declared
String pluginName = (pluginClass.newInstance()).getPluginName();
String pluginName = ((Plugin)pluginClass.newInstance()).getPluginName();
availablePlugins.put(pluginName, pluginClass);
} catch(Exception e) {
Log.e("PluginFactory","addPlugin exception");

View File

@@ -1,23 +1,3 @@
/*
* Copyright 2014 Samoilenko Yuri <kinnalru@gmail.com>
*
* 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 the Free Software Foundation; either version 2 of
* the License or (at your option) version 3 or any later version
* accepted by the membership of KDE e.V. (or its successor approved
* by the membership of KDE e.V.), which shall act as a proxy
* defined in Section 14 of version 3 of the license.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.kde.kdeconnect.Plugins.SftpPlugin;
import android.content.Context;
@@ -227,4 +207,4 @@ class SimpleSftpServer {
public SecureSshFile(final SecureFileSystemView view, final String fileName, final File file, final String userName) {
super(fileName, file, userName);
}
}
}

View File

@@ -0,0 +1,79 @@
package org.kde.kdeconnect.Plugins.SftpPlugin;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.os.Environment;
import android.widget.Button;
import org.kde.kdeconnect.NetworkPackage;
import org.kde.kdeconnect.Plugins.Plugin;
import org.kde.kdeconnect_tp.R;
public class SftpPlugin extends Plugin {
private static final SimpleSftpServer server = new SimpleSftpServer();
/*static {
PluginFactory.registerPlugin(SftpPlugin.class);
}*/
@Override
public String getPluginName() {return "plugin_sftp";}
@Override
public String getDisplayName() {
return context.getResources().getString(R.string.pref_plugin_sftp);
}
@Override
public String getDescription() {
return context.getResources().getString(R.string.pref_plugin_sftp_desc);
}
@Override
public Drawable getIcon() {
return context.getResources().getDrawable(R.drawable.icon);
}
@Override
public boolean isEnabledByDefault() {return true;}
@Override
public boolean onCreate() {
server.init(context, device);
return true;
}
@Override
public void onDestroy() {
server.stop();
}
@Override
public boolean onPackageReceived(NetworkPackage np) {
if (!np.getType().equals(NetworkPackage.PACKAGE_TYPE_SFTP)) return false;
if (np.getBoolean("startBrowsing")) {
if (server.start()) {
NetworkPackage np2 = new NetworkPackage(NetworkPackage.PACKAGE_TYPE_SFTP);
np2.set("ip", server.getLocalIpAddress());
np2.set("port", server.port);
np2.set("user", server.passwordAuth.getUser());
np2.set("password", server.passwordAuth.getPassword());
np2.set("path", Environment.getExternalStorageDirectory().getAbsolutePath());
device.sendPackage(np2);
return true;
}
}
return false;
}
@Override
public AlertDialog getErrorDialog(Context baseContext) {return null;}
@Override
public Button getInterfaceButton(Activity activity) {return null;}
}

View File

@@ -1,23 +1,3 @@
/*
* Copyright 2014 Albert Vaca Cintora <albertvaka@gmail.com>
*
* 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 the Free Software Foundation; either version 2 of
* the License or (at your option) version 3 or any later version
* accepted by the membership of KDE e.V. (or its successor approved
* by the membership of KDE e.V.), which shall act as a proxy
* defined in Section 14 of version 3 of the license.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.kde.kdeconnect.Plugins.TelephonyPlugin;
import android.app.Activity;
@@ -30,6 +10,7 @@ import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.telephony.SmsMessage;
import android.telephony.TelephonyManager;
import android.util.Log;
import android.widget.Button;
import org.kde.kdeconnect.Helpers.ContactsHelper;
@@ -39,6 +20,10 @@ import org.kde.kdeconnect_tp.R;
public class TelephonyPlugin extends Plugin {
/*static {
PluginFactory.registerPlugin(TelephonyPlugin.class);
}*/
@Override
public String getPluginName() {
return "plugin_telephony";
@@ -64,12 +49,7 @@ public class TelephonyPlugin extends Plugin {
return true;
}
@Override
public boolean hasSettings() {
return false;
}
private final BroadcastReceiver receiver = new BroadcastReceiver() {
private BroadcastReceiver receiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
@@ -203,7 +183,7 @@ public class TelephonyPlugin extends Plugin {
}
@Override
public AlertDialog getErrorDialog(Activity deviceActivity) {
public AlertDialog getErrorDialog(Context baseContext) {
return null;
}

View File

@@ -0,0 +1,159 @@
package org.kde.kdeconnect.UserInterface;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.ActionBar;
import android.support.v7.app.ActionBarActivity;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.ListView;
import android.widget.TextView;
import org.kde.kdeconnect.BackgroundService;
import org.kde.kdeconnect.Device;
import org.kde.kdeconnect.Plugins.Plugin;
import org.kde.kdeconnect.UserInterface.List.ButtonItem;
import org.kde.kdeconnect.UserInterface.List.ListAdapter;
import org.kde.kdeconnect.UserInterface.List.SectionItem;
import org.kde.kdeconnect_tp.R;
import java.util.ArrayList;
import java.util.Collection;
import java.util.ConcurrentModificationException;
import java.util.HashMap;
public class DeviceActivity extends ActionBarActivity {
static private String deviceId; //Static because if we get here by using the back button in the action bar, the extra deviceId will not be set.
private Device device;
private Device.PluginsChangedListener pluginsChangedListener = new Device.PluginsChangedListener() {
@Override
public void onPluginsChanged(final Device device) {
runOnUiThread(new Runnable() {
@Override
public void run() {
//Errors list
final HashMap<String, Plugin> failedPlugins = device.getFailedPlugins();
final String[] ids = failedPlugins.keySet().toArray(new String[failedPlugins.size()]);
String[] names = new String[failedPlugins.size()];
for(int i = 0; i < ids.length; i++) {
Plugin p = failedPlugins.get(ids[i]);
names[i] = p.getDisplayName();
}
ListView errorList = (ListView)findViewById(R.id.errors_list);
if (!failedPlugins.isEmpty() && errorList.getHeaderViewsCount() == 0) {
TextView header = new TextView(DeviceActivity.this);
header.setPadding(0,24,0,0);
header.setText(getResources().getString(R.string.plugins_failed_to_load));
errorList.addHeaderView(header);
}
errorList.setAdapter(new ArrayAdapter<String>(DeviceActivity.this, android.R.layout.simple_list_item_1, names));
errorList.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> adapterView, View view, int position, long id) {
Plugin p = failedPlugins.get(ids[position - 1]); //Header is position 0, so we have to subtract one
p.getErrorDialog(DeviceActivity.this).show();
}
});
try {
//Buttons list
ArrayList<ListAdapter.Item> items = new ArrayList<ListAdapter.Item>();
final Collection<Plugin> plugins = device.getLoadedPlugins().values();
for (Plugin p : plugins) {
Button b = p.getInterfaceButton(DeviceActivity.this);
if (b != null) {
items.add(new SectionItem(p.getDisplayName()));
items.add(new ButtonItem(b));
}
}
ListView buttonsList = (ListView)findViewById(R.id.buttons_list);
buttonsList.setAdapter(new ListAdapter(DeviceActivity.this, items));
} catch(ConcurrentModificationException e) {
Log.e("DeviceActivity", "ConcurrentModificationException");
this.run(); //Try again
}
}
});
}
};
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_device);
ActionBar actionBar = getSupportActionBar();
actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_HOME | ActionBar.DISPLAY_SHOW_TITLE);
actionBar.setDisplayHomeAsUpEnabled(true);
if (getIntent().hasExtra("deviceId")) {
deviceId = getIntent().getStringExtra("deviceId");
}
BackgroundService.RunCommand(DeviceActivity.this, new BackgroundService.InstanceCallback() {
@Override
public void onServiceStart(BackgroundService service) {
device = service.getDevice(deviceId);
if (device == null) return;
setTitle(device.getName());
device.addPluginsChangedListener(pluginsChangedListener);
pluginsChangedListener.onPluginsChanged(device);
}
});
}
@Override
protected void onDestroy() {
BackgroundService.RunCommand(DeviceActivity.this, new BackgroundService.InstanceCallback() {
@Override
public void onServiceStart(BackgroundService service) {
Device device = service.getDevice(deviceId);
device.removePluginsChangedListener(pluginsChangedListener);
}
});
super.onDestroy();
}
@Override
public boolean onPrepareOptionsMenu(Menu menu) {
super.onPrepareOptionsMenu(menu);
menu.clear();
if (device.isPaired()) {
menu.add(R.string.device_menu_plugins).setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
@Override
public boolean onMenuItemClick(MenuItem menuItem) {
Intent intent = new Intent(DeviceActivity.this, SettingsActivity.class);
intent.putExtra("deviceId", deviceId);
startActivity(intent);
return true;
}
});
menu.add(R.string.device_menu_unpair).setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
@Override
public boolean onMenuItemClick(MenuItem menuItem) {
device.unpair();
finish();
return true;
}
});
return true;
} else {
return false;
}
}
}

View File

@@ -0,0 +1,20 @@
package org.kde.kdeconnect.UserInterface.List;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.Button;
public class ButtonItem implements ListAdapter.Item {
private final Button button;
public ButtonItem(Button b) {
this.button = b;
}
@Override
public View inflateView(LayoutInflater layoutInflater) {
return button;
}
}

View File

@@ -1,23 +1,3 @@
/*
* Copyright 2014 Albert Vaca Cintora <albertvaka@gmail.com>
*
* 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 the Free Software Foundation; either version 2 of
* the License or (at your option) version 3 or any later version
* accepted by the membership of KDE e.V. (or its successor approved
* by the membership of KDE e.V.), which shall act as a proxy
* defined in Section 14 of version 3 of the license.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.kde.kdeconnect.UserInterface.List;
@@ -44,7 +24,7 @@ public class DeviceItem implements ListAdapter.Item {
@Override
public View inflateView(LayoutInflater layoutInflater) {
final View v = layoutInflater.inflate(R.layout.list_item_entry, null);
View v = layoutInflater.inflate(R.layout.list_item_entry, null);
TextView titleView = (TextView)v.findViewById(R.id.list_item_entry_title);
if (titleView != null) titleView.setText(device.getName());

View File

@@ -0,0 +1,33 @@
package org.kde.kdeconnect.UserInterface.List;
import android.app.Activity;
import android.content.Intent;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.TextView;
import org.kde.kdeconnect.Device;
import org.kde.kdeconnect.UserInterface.DeviceActivity;
import org.kde.kdeconnect.UserInterface.PairActivity;
import org.kde.kdeconnect_tp.R;
public class EntryItem implements ListAdapter.Item {
private final String title;
public EntryItem(String title) {
this.title = title;
}
@Override
public View inflateView(LayoutInflater layoutInflater) {
View v = layoutInflater.inflate(R.layout.list_item_entry, null);
TextView titleView = (TextView)v.findViewById(R.id.list_item_entry_title);
if (titleView != null) titleView.setText(title);
return v;
}
}

View File

@@ -0,0 +1,33 @@
package org.kde.kdeconnect.UserInterface.List;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import java.util.ArrayList;
public class ListAdapter extends ArrayAdapter<ListAdapter.Item> {
public interface Item {
public View inflateView(LayoutInflater layoutInflater);
}
private ArrayList<Item> items;
private LayoutInflater layoutInflater;
public ListAdapter(Context context, ArrayList<Item> items) {
super(context, 0, items);
this.items = items;
layoutInflater = (LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
final Item i = items.get(position);
return i.inflateView(layoutInflater);
}
}

View File

@@ -0,0 +1,38 @@
package org.kde.kdeconnect.UserInterface.List;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.TextView;
import org.kde.kdeconnect_tp.R;
public class SectionItem implements ListAdapter.Item {
private final String title;
public boolean isEmpty;
public SectionItem(String title) {
this.title = title;
this.isEmpty = false;
}
@Override
public View inflateView(LayoutInflater layoutInflater) {
View v = layoutInflater.inflate(R.layout.list_item_category, null);
v.setOnClickListener(null);
v.setOnLongClickListener(null);
v.setLongClickable(false);
TextView sectionView = (TextView) v.findViewById(R.id.list_item_category_text);
sectionView.setText(title);
if (isEmpty) {
v.findViewById(R.id.list_item_category_empty_placeholder).setVisibility(View.VISIBLE);
}
return v;
}
}

View File

@@ -1,23 +1,3 @@
/*
* Copyright 2014 Albert Vaca Cintora <albertvaka@gmail.com>
*
* 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 the Free Software Foundation; either version 2 of
* the License or (at your option) version 3 or any later version
* accepted by the membership of KDE e.V. (or its successor approved
* by the membership of KDE e.V.), which shall act as a proxy
* defined in Section 14 of version 3 of the license.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.kde.kdeconnect.UserInterface;
@@ -26,6 +6,7 @@ import android.content.res.Resources;
import android.os.Bundle;
import android.support.v7.app.ActionBar;
import android.support.v7.app.ActionBarActivity;
import android.util.Log;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
@@ -89,9 +70,6 @@ public class MainActivity extends ActionBarActivity {
case R.id.menu_settings:
startActivity(new Intent(this,MainSettingsActivity.class));
break;
case R.id.menu_custom_device_list:
startActivity(new Intent(this, CustomDevicesActivity.class));
break;
default:
break;
}
@@ -127,36 +105,36 @@ public class MainActivity extends ActionBarActivity {
Resources res = getResources();
section = new SectionItem(res.getString(R.string.category_connected_devices));
section.isSectionEmpty = true;
section.isEmpty = true;
items.add(section);
for(Device d : devices) {
if (d.isReachable() && d.isPaired()) {
items.add(new DeviceItem(MainActivity.this, d));
section.isSectionEmpty = false;
section.isEmpty = false;
}
}
section = new SectionItem(res.getString(R.string.category_not_paired_devices));
section.isSectionEmpty = true;
section.isEmpty = true;
items.add(section);
for(Device d : devices) {
if (d.isReachable() && !d.isPaired()) {
items.add(new DeviceItem(MainActivity.this, d));
section.isSectionEmpty = false;
section.isEmpty = false;
}
}
section = new SectionItem(res.getString(R.string.category_remembered_devices));
section.isSectionEmpty = true;
section.isEmpty = true;
items.add(section);
for(Device d : devices) {
if (!d.isReachable() && d.isPaired()) {
items.add(new DeviceItem(MainActivity.this, d));
section.isSectionEmpty = false;
section.isEmpty = false;
}
}
if (section.isSectionEmpty) {
items.remove(items.size()-1); //Remove remembered devices section if empty
if (section.isEmpty) {
items.remove(items.size()-1); //Remove section
}
runOnUiThread(new Runnable() {
@@ -167,13 +145,12 @@ public class MainActivity extends ActionBarActivity {
list.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
view.performClick();
view.callOnClick();
}
});
}
});
}
});
}

View File

@@ -1,23 +1,3 @@
/*
* Copyright 2014 Albert Vaca Cintora <albertvaka@gmail.com>
*
* 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 the Free Software Foundation; either version 2 of
* the License or (at your option) version 3 or any later version
* accepted by the membership of KDE e.V. (or its successor approved
* by the membership of KDE e.V.), which shall act as a proxy
* defined in Section 14 of version 3 of the license.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.kde.kdeconnect.UserInterface;
import android.annotation.TargetApi;
@@ -33,11 +13,10 @@ import android.preference.PreferenceManager;
import android.util.Log;
import android.widget.Toast;
import org.kde.kdeconnect.BackgroundService;
import org.kde.kdeconnect.Helpers.DeviceHelper;
import org.kde.kdeconnect_tp.R;
public class MainSettingsActivity extends PreferenceActivity {
public class MainSettingsActivity extends PreferenceActivity{
public static final String KEY_DEVICE_NAME_PREFERENCE = "device_name_preference";
@@ -76,14 +55,6 @@ public class MainSettingsActivity extends PreferenceActivity {
deviceNamePref.setSummary(getString(
R.string.device_name_preference_summary,
newDeviceName.toString()));
//Broadcast the device information again since it has changed
BackgroundService.RunCommand(MainSettingsActivity.this, new BackgroundService.InstanceCallback() {
@Override
public void onServiceStart(BackgroundService service) {
service.onNetworkChange();
}
});
return true;
}
}
@@ -96,7 +67,7 @@ public class MainSettingsActivity extends PreferenceActivity {
/**
* Until now it sets only the default deviceName (if not already set).
* It's safe to call this multiple time because doesn't override any previous value.
* @param context the application context
* @param context
*/
public static void initializeDeviceName(Context context){
// I could have used getDefaultSharedPreferences(context).contains but we need to check

View File

@@ -1,23 +1,3 @@
/*
* Copyright 2014 Albert Vaca Cintora <albertvaka@gmail.com>
*
* 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 the Free Software Foundation; either version 2 of
* the License or (at your option) version 3 or any later version
* accepted by the membership of KDE e.V. (or its successor approved
* by the membership of KDE e.V.), which shall act as a proxy
* defined in Section 14 of version 3 of the license.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.kde.kdeconnect.UserInterface;
import android.app.NotificationManager;
@@ -38,7 +18,7 @@ public class PairActivity extends ActionBarActivity {
private String deviceId;
private Device device = null;
private final Device.PairingCallback pairingCallback = new Device.PairingCallback() {
private Device.PairingCallback pairingCallback = new Device.PairingCallback() {
@Override
public void incomingRequest() {
@@ -96,7 +76,6 @@ public class PairActivity extends ActionBarActivity {
@Override
public void onServiceStart(BackgroundService service) {
device = service.getDevice(deviceId);
if (device == null) return;
setTitle(device.getName());
NotificationManager notificationManager = (NotificationManager)getSystemService(Context.NOTIFICATION_SERVICE);
notificationManager.cancel(device.getNotificationId());
@@ -115,7 +94,6 @@ public class PairActivity extends ActionBarActivity {
@Override
public void onServiceStart(BackgroundService service) {
device = service.getDevice(deviceId);
if (device == null) return;
device.requestPairing();
}
});
@@ -156,8 +134,6 @@ public class PairActivity extends ActionBarActivity {
BackgroundService.RunCommand(PairActivity.this, new BackgroundService.InstanceCallback() {
@Override
public void onServiceStart(BackgroundService service) {
device = service.getDevice(deviceId);
if (device == null) return;
device.addPairingCallback(pairingCallback);
}
});
@@ -169,4 +145,4 @@ public class PairActivity extends ActionBarActivity {
super.onStop();
}
}
}

View File

@@ -0,0 +1,28 @@
package org.kde.kdeconnect.UserInterface;
import android.content.Context;
import android.preference.Preference;
import android.util.Log;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import java.util.ArrayList;
public class PreferenceListAdapter extends ArrayAdapter<Preference> {
private ArrayList<Preference> localList;
public PreferenceListAdapter(Context context, ArrayList<Preference> items) {
super(context,0, items);
localList = items;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
Preference preference = localList.get(position);
return preference.getView(convertView, parent);
}
}

View File

@@ -0,0 +1,70 @@
package org.kde.kdeconnect.UserInterface;
import android.app.ListActivity;
import android.os.Bundle;
import android.preference.CheckBoxPreference;
import android.preference.Preference;
import android.util.Log;
import android.view.View;
import android.widget.AdapterView;
import org.kde.kdeconnect.BackgroundService;
import org.kde.kdeconnect.Device;
import org.kde.kdeconnect.Plugins.PluginFactory;
import java.util.ArrayList;
import java.util.Set;
public class SettingsActivity extends ListActivity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
final String deviceId = getIntent().getStringExtra("deviceId");
BackgroundService.RunCommand(getApplicationContext(), new BackgroundService.InstanceCallback() {
@Override
public void onServiceStart(BackgroundService service) {
final Device device = service.getDevice(deviceId);
Set<String> plugins = PluginFactory.getAvailablePlugins();
final ArrayList<Preference> preferences = new ArrayList<Preference>();
for (final String pluginName : plugins) {
CheckBoxPreference pref = new CheckBoxPreference(getBaseContext());
PluginFactory.PluginInfo info = PluginFactory.getPluginInfo(getBaseContext(), pluginName);
pref.setKey(pluginName);
pref.setTitle(info.getDisplayName());
pref.setSummary(info.getDescription());
pref.setChecked(device.isPluginEnabled(pluginName));
preferences.add(pref);
}
setListAdapter(new PreferenceListAdapter(SettingsActivity.this, preferences));
getListView().setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
CheckBoxPreference pref = (CheckBoxPreference)preferences.get(i);
boolean enabled = device.isPluginEnabled(pref.getKey());
device.setPluginEnabled(pref.getKey(), !enabled);
pref.setChecked(!enabled);
getListAdapter().getView(i, view, null); //This will refresh the view (yes, this is the way to do it)
}
});
getListView().setPadding(16,16,16,16);
}
});
}
}

View File

@@ -1,23 +1,3 @@
/*
* Copyright 2014 Albert Vaca Cintora <albertvaka@gmail.com>
*
* 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 the Free Software Foundation; either version 2 of
* the License or (at your option) version 3 or any later version
* accepted by the membership of KDE e.V. (or its successor approved
* by the membership of KDE e.V.), which shall act as a proxy
* defined in Section 14 of version 3 of the license.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.kde.kdeconnect.UserInterface;
import android.content.ContentResolver;
@@ -156,8 +136,7 @@ public class ShareToReceiver extends ActionBarActivity {
queuedSendUriList(device, uriList);
} catch (Exception e) {
e.printStackTrace();
Log.e("ShareToReceiver", "Exception");
Log.e(this.getClass().getName(), e.toString());
}
} else if (extras.containsKey(Intent.EXTRA_TEXT)) {
@@ -224,7 +203,7 @@ public class ShareToReceiver extends ActionBarActivity {
String path = cursor.getString(column_index);
np.set("filename", Uri.parse(path).getLastPathSegment());
np.set("size", (int)new File(path).length());
} catch(Exception unused) {
} catch(Exception _) {
Log.e("ShareToReceiver", "Could not resolve media to a file, trying to get info as media");

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 557 B

After

Width:  |  Height:  |  Size: 557 B

View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

Before

Width:  |  Height:  |  Size: 750 B

After

Width:  |  Height:  |  Size: 750 B

View File

Before

Width:  |  Height:  |  Size: 365 B

After

Width:  |  Height:  |  Size: 365 B

View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Before

Width:  |  Height:  |  Size: 713 B

After

Width:  |  Height:  |  Size: 713 B

View File

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

View File

@@ -0,0 +1,26 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
tools:context=".MainActivity"
android:orientation="vertical">
<ListView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/buttons_list"
android:layout_weight="1"
/>
<ListView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/errors_list"
android:layout_weight="1"
/>
</LinearLayout>

View File

@@ -4,14 +4,11 @@
android:layout_width="fill_parent"
android:baselineAligned="false"
android:layout_height="wrap_content"
android:paddingLeft="12dip"
android:minHeight="?android:attr/listPreferredItemHeight"
android:gravity="center_vertical"
android:paddingRight="?android:attr/scrollbarSize"
android:background="@drawable/abc_list_selector_holo_dark"
android:orientation="vertical">
<!-- We should use android:background="@android:/listChoiceBackgroundIndicator"
instead of abc_list_selector_holo_dark but that's only supported from API11 -->
<TextView android:id="@+id/list_item_entry_title"
android:layout_width="wrap_content"

View File

@@ -1,52 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/mpris_control_view"
android:gravity="center"
android:paddingLeft="60dip"
android:paddingTop="5dip"
android:paddingRight="60dip"
android:paddingBottom="5dip">
android:gravity="center">
<Spinner
android:layout_width="match_parent"
android:layout_width="200dip"
android:layout_height="wrap_content"
android:id="@+id/player_spinner"
android:layout_gravity="center"
/>
<TextView
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:id="@+id/now_playing_textview"
android:singleLine="true"
android:gravity="center"
android:padding="8dip"
android:padding="5dip"
android:layout_gravity="center"
/>
<org.kde.kdeconnect.UserInterface.MaxWidthImageButton
android:layout_width="fill_parent"
<ImageButton
android:layout_width="200dip"
android:layout_height="75dip"
app:maxWidth="300dip"
android:id="@+id/play_button"
android:src="@android:drawable/ic_media_play"
android:contentDescription="@string/mpris_play"
android:layout_gravity="center"
android:layout_weight="0"
android:clickable="false"
android:adjustViewBounds="false"
android:baselineAlignBottom="true" />
/>
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="60dip"
android:layout_width="200dip"
android:layout_height="50dip"
android:layout_gravity="center"
>
@@ -90,18 +81,17 @@
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_width="200dip"
android:layout_height="70dip"
android:id="@+id/volume_layout"
android:layout_gravity="center">
<ImageView
android:layout_width="30dip"
android:layout_height="30dip"
android:maxWidth="30dip"
android:layout_width="50dip"
android:layout_height="50dip"
android:layout_marginRight="10dip"
android:id="@+id/imageView"
android:layout_weight="0"
android:layout_weight="1"
android:layout_gravity="left|center_vertical"
android:contentDescription="@string/mpris_volume"
android:src="@drawable/ic_volume"
@@ -109,7 +99,7 @@
<SeekBar
android:layout_width="wrap_content"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/volume_seek"
android:layout_weight="1"

View File

@@ -5,7 +5,7 @@
android:id="@+id/menu_refresh"
android:icon="@drawable/ic_action_refresh"
android:orderInCategory="200"
kdeconnect:showAsAction="ifRoom"
kdeconnect:showAsAction="always"
android:title="@string/reconnect"
/>
@@ -13,7 +13,7 @@
android:id="@+id/menu_progress"
android:orderInCategory="200"
android:visible="false"
kdeconnect:showAsAction="ifRoom"
kdeconnect:showAsAction="always"
kdeconnect:actionViewClass="android.widget.ProgressBar"
/>
@@ -24,13 +24,4 @@
android:title="@string/settings"
kdeconnect:showAsAction="never"
/>
<item
android:id="@+id/menu_custom_device_list"
android:icon="@drawable/ic_action_settings"
android:orderInCategory="900"
android:title="@string/custom_device_list"
kdeconnect:showAsAction="never"
/>
</menu>
</menu>

View File

@@ -5,12 +5,4 @@
<string name="pref_plugin_ping">Ping</string>
<string name="pref_plugin_ping_desc">Šalji i primaj ping-ove</string>
<string name="pref_plugin_notifications">Sinhronizovano obavještenje</string>
<string name="share_notification_preference">Sinhronizovano obavještenje</string>
<string-array name="mpris_time_entries">
<item>10 seconds</item>
<item>20 seconds</item>
<item>30 seconds</item>
<item>1 minute</item>
<item>2 minutes</item>
</string-array>
</resources>

View File

@@ -0,0 +1,33 @@
<?xml version='1.0' encoding='utf-8'?>
<resources>
<string name="pref_plugin_battery">Hlášení baterie</string>
<string name="pref_plugin_ping">Ping</string>
<string name="pref_plugin_ping_desc">Posílat a přijímat ping</string>
<string name="device_list_empty">Žádná zařízení</string>
<string name="ok">OK</string>
<string name="cancel">Zrušit</string>
<string name="open_settings">Otevřít nastavení</string>
<string name="send_ping">Poslat ping</string>
<string name="category_connected_devices">Připojená zařízení</string>
<string name="category_not_paired_devices">Nespárovaná zařízení</string>
<string name="category_remembered_devices">Zapamatovaná zařízení</string>
<string name="device_menu_plugins">Vyberte moduly</string>
<string name="unknown_device">Neznámé zařízení</string>
<string name="error_timed_out">Čas vypršel</string>
<string name="error_canceled_by_user">Přerušeno uživatelem</string>
<string name="reconnect">Znovu připojit</string>
<string name="pairing_accept">Přijmout</string>
<string name="pairing_reject">Odmítnout</string>
<string name="device">Zařízení</string>
<string name="remote_control">Vzdálené ovládání</string>
<string name="mpris_play">Přehrát</string>
<string name="mpris_previous">Předchozí</string>
<string name="mpris_rew">Přetočit zpět</string>
<string name="mpris_ff">Rychle vpřed</string>
<string name="mpris_next">Následující</string>
<string name="mpris_volume">Hlasitost</string>
<string name="general_settings">Obecná nastavení</string>
<string name="device_name">Název zařízení</string>
<string name="device_name_preference_summary">%s</string>
<string name="invalid_device_name">Neplatný název zařízení</string>
</resources>

Some files were not shown because too many files have changed in this diff Show More