mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-09-01 06:35:09 +00:00
Compare commits
9 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
45bbed6d72 | ||
|
42f2f425a1 | ||
|
801c7cbd45 | ||
|
366aaea282 | ||
|
02f5ce2581 | ||
|
a360ca0a01 | ||
|
d356a9e964 | ||
|
e588428812 | ||
|
db0f6288ff |
@@ -1,8 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="org.kde.kdeconnect_tp"
|
package="org.kde.kdeconnect_tp"
|
||||||
android:versionCode="806"
|
android:versionCode="807"
|
||||||
android:versionName="0.8f">
|
android:versionName="0.8g">
|
||||||
|
|
||||||
<uses-sdk android:minSdkVersion="9"
|
<uses-sdk android:minSdkVersion="9"
|
||||||
android:targetSdkVersion="21" />
|
android:targetSdkVersion="21" />
|
||||||
|
@@ -62,6 +62,7 @@
|
|||||||
<string name="outgoing_file_title">S\'està enviant el fitxer a %1s</string>
|
<string name="outgoing_file_title">S\'està enviant el fitxer a %1s</string>
|
||||||
<string name="outgoing_file_text">%1s</string>
|
<string name="outgoing_file_text">%1s</string>
|
||||||
<string name="received_file_title">Fitxer rebut des de %1s</string>
|
<string name="received_file_title">Fitxer rebut des de %1s</string>
|
||||||
|
<string name="received_file_fail_title">Ha fallat en rebre el fitxer des de %1s</string>
|
||||||
<string name="received_file_text">Puntegeu per obrir «%1s»</string>
|
<string name="received_file_text">Puntegeu per obrir «%1s»</string>
|
||||||
<string name="sent_file_title">Envia el fitxer a %1s</string>
|
<string name="sent_file_title">Envia el fitxer a %1s</string>
|
||||||
<string name="sent_file_text">%1s</string>
|
<string name="sent_file_text">%1s</string>
|
||||||
|
@@ -62,6 +62,7 @@
|
|||||||
<string name="outgoing_file_title">Odesílám soubor do %1s</string>
|
<string name="outgoing_file_title">Odesílám soubor do %1s</string>
|
||||||
<string name="outgoing_file_text">%1s</string>
|
<string name="outgoing_file_text">%1s</string>
|
||||||
<string name="received_file_title">Přijat soubor od %1s</string>
|
<string name="received_file_title">Přijat soubor od %1s</string>
|
||||||
|
<string name="received_file_fail_title">Selhalo přijímání souboru od %1s</string>
|
||||||
<string name="received_file_text">Ťukněte pro otevření \'%1s\'</string>
|
<string name="received_file_text">Ťukněte pro otevření \'%1s\'</string>
|
||||||
<string name="sent_file_title">Soubor byl odeslán do %1s</string>
|
<string name="sent_file_title">Soubor byl odeslán do %1s</string>
|
||||||
<string name="sent_file_text">%1s</string>
|
<string name="sent_file_text">%1s</string>
|
||||||
|
@@ -62,6 +62,7 @@
|
|||||||
<string name="outgoing_file_title">Lähetetään tiedostoa laitteeseen %1s</string>
|
<string name="outgoing_file_title">Lähetetään tiedostoa laitteeseen %1s</string>
|
||||||
<string name="outgoing_file_text">%1s</string>
|
<string name="outgoing_file_text">%1s</string>
|
||||||
<string name="received_file_title">Vastaanotettiin tiedosto lähettäjältä %1s</string>
|
<string name="received_file_title">Vastaanotettiin tiedosto lähettäjältä %1s</string>
|
||||||
|
<string name="received_file_fail_title">Ei voitu vastaanottaa tiedostoa lähettäjältä %1s</string>
|
||||||
<string name="received_file_text">Avaa ”%1s” napauttamalla</string>
|
<string name="received_file_text">Avaa ”%1s” napauttamalla</string>
|
||||||
<string name="sent_file_title">Tiedosto lähetetty laitteeseen %1s</string>
|
<string name="sent_file_title">Tiedosto lähetetty laitteeseen %1s</string>
|
||||||
<string name="sent_file_text">%1s</string>
|
<string name="sent_file_text">%1s</string>
|
||||||
|
@@ -62,6 +62,7 @@
|
|||||||
<string name="outgoing_file_title">Invio file a %1s</string>
|
<string name="outgoing_file_title">Invio file a %1s</string>
|
||||||
<string name="outgoing_file_text">%1s</string>
|
<string name="outgoing_file_text">%1s</string>
|
||||||
<string name="received_file_title">File ricevuto da %1s</string>
|
<string name="received_file_title">File ricevuto da %1s</string>
|
||||||
|
<string name="received_file_fail_title">Ricezione file da %1s non riuscita</string>
|
||||||
<string name="received_file_text">Tocca per aprire «%1s»</string>
|
<string name="received_file_text">Tocca per aprire «%1s»</string>
|
||||||
<string name="sent_file_title">File inviato a %1s</string>
|
<string name="sent_file_title">File inviato a %1s</string>
|
||||||
<string name="sent_file_text">%1s</string>
|
<string name="sent_file_text">%1s</string>
|
||||||
|
@@ -62,6 +62,7 @@
|
|||||||
<string name="outgoing_file_title">Bezig bestand te verzenden naar %1s</string>
|
<string name="outgoing_file_title">Bezig bestand te verzenden naar %1s</string>
|
||||||
<string name="outgoing_file_text">%1s</string>
|
<string name="outgoing_file_text">%1s</string>
|
||||||
<string name="received_file_title">Bestand ontvangen van %1s</string>
|
<string name="received_file_title">Bestand ontvangen van %1s</string>
|
||||||
|
<string name="received_file_fail_title">Bestand ontvangen van %1s is mislukt</string>
|
||||||
<string name="received_file_text">Tap om \'%1s\' te openen</string>
|
<string name="received_file_text">Tap om \'%1s\' te openen</string>
|
||||||
<string name="sent_file_title">Bestand verzonden naar %1s</string>
|
<string name="sent_file_title">Bestand verzonden naar %1s</string>
|
||||||
<string name="sent_file_text">%1s</string>
|
<string name="sent_file_text">%1s</string>
|
||||||
|
@@ -62,6 +62,7 @@
|
|||||||
<string name="outgoing_file_title">Enviando arquivo para %1s</string>
|
<string name="outgoing_file_title">Enviando arquivo para %1s</string>
|
||||||
<string name="outgoing_file_text">%1s</string>
|
<string name="outgoing_file_text">%1s</string>
|
||||||
<string name="received_file_title">Arquivo recebido de %1s</string>
|
<string name="received_file_title">Arquivo recebido de %1s</string>
|
||||||
|
<string name="received_file_fail_title">Falha ao receber o arquivo de %1s</string>
|
||||||
<string name="received_file_text">Toque para abrir o \'%1s\'</string>
|
<string name="received_file_text">Toque para abrir o \'%1s\'</string>
|
||||||
<string name="sent_file_title">Enviar arquivo para %1s</string>
|
<string name="sent_file_title">Enviar arquivo para %1s</string>
|
||||||
<string name="sent_file_text">%1s</string>
|
<string name="sent_file_text">%1s</string>
|
||||||
|
@@ -62,6 +62,7 @@
|
|||||||
<string name="outgoing_file_title">A enviar o ficheiro para o %1s</string>
|
<string name="outgoing_file_title">A enviar o ficheiro para o %1s</string>
|
||||||
<string name="outgoing_file_text">%1s</string>
|
<string name="outgoing_file_text">%1s</string>
|
||||||
<string name="received_file_title">Ficheiro recebido de %1s</string>
|
<string name="received_file_title">Ficheiro recebido de %1s</string>
|
||||||
|
<string name="received_file_fail_title">Falhou a recepção do ficheiro de %1s</string>
|
||||||
<string name="received_file_text">Toque para abrir o \'%1s\'</string>
|
<string name="received_file_text">Toque para abrir o \'%1s\'</string>
|
||||||
<string name="sent_file_title">O ficheiro foi enviado para %1s</string>
|
<string name="sent_file_title">O ficheiro foi enviado para %1s</string>
|
||||||
<string name="sent_file_text">%1s</string>
|
<string name="sent_file_text">%1s</string>
|
||||||
|
@@ -62,6 +62,7 @@
|
|||||||
<string name="outgoing_file_title">Posielam súbor pre %1s</string>
|
<string name="outgoing_file_title">Posielam súbor pre %1s</string>
|
||||||
<string name="outgoing_file_text">%1s</string>
|
<string name="outgoing_file_text">%1s</string>
|
||||||
<string name="received_file_title">Prijatý súbor od %1s</string>
|
<string name="received_file_title">Prijatý súbor od %1s</string>
|
||||||
|
<string name="received_file_fail_title">Zlyhalo prijatie súboru od %1s</string>
|
||||||
<string name="received_file_text">Ťuknite na otvorenie \'%1s\'</string>
|
<string name="received_file_text">Ťuknite na otvorenie \'%1s\'</string>
|
||||||
<string name="sent_file_title">Poslať súbor pre %1s</string>
|
<string name="sent_file_title">Poslať súbor pre %1s</string>
|
||||||
<string name="sent_file_text">%1s</string>
|
<string name="sent_file_text">%1s</string>
|
||||||
|
@@ -62,6 +62,7 @@
|
|||||||
<string name="outgoing_file_title">Skickar fil till %1s</string>
|
<string name="outgoing_file_title">Skickar fil till %1s</string>
|
||||||
<string name="outgoing_file_text">%1s</string>
|
<string name="outgoing_file_text">%1s</string>
|
||||||
<string name="received_file_title">Tog emot fil från %1s</string>
|
<string name="received_file_title">Tog emot fil från %1s</string>
|
||||||
|
<string name="received_file_fail_title">Misslyckades ta emot fil från %1s</string>
|
||||||
<string name="received_file_text">Rör för att öppna \'%1s\'</string>
|
<string name="received_file_text">Rör för att öppna \'%1s\'</string>
|
||||||
<string name="sent_file_title">Skickade fil till %1s</string>
|
<string name="sent_file_title">Skickade fil till %1s</string>
|
||||||
<string name="sent_file_text">%1s</string>
|
<string name="sent_file_text">%1s</string>
|
||||||
|
@@ -62,6 +62,7 @@
|
|||||||
<string name="outgoing_file_title">Надсилаємо файл до %1s</string>
|
<string name="outgoing_file_title">Надсилаємо файл до %1s</string>
|
||||||
<string name="outgoing_file_text">%1s</string>
|
<string name="outgoing_file_text">%1s</string>
|
||||||
<string name="received_file_title">Отримано файл з %1s</string>
|
<string name="received_file_title">Отримано файл з %1s</string>
|
||||||
|
<string name="received_file_fail_title">Не вдалося отримати файл з %1s</string>
|
||||||
<string name="received_file_text">Натисніть, щоб відкрити «%1s»</string>
|
<string name="received_file_text">Натисніть, щоб відкрити «%1s»</string>
|
||||||
<string name="sent_file_title">Файл надіслано до %1s</string>
|
<string name="sent_file_title">Файл надіслано до %1s</string>
|
||||||
<string name="sent_file_text">%1s</string>
|
<string name="sent_file_text">%1s</string>
|
||||||
|
@@ -1,11 +0,0 @@
|
|||||||
<resources>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
Base application theme for API 11+. This theme completely replaces
|
|
||||||
AppBaseTheme from res/values/styles.xml on API 11+ devices.
|
|
||||||
-->
|
|
||||||
<style name="AppBaseTheme" parent="android:Theme.Holo">
|
|
||||||
<!-- API 11 theme customizations can go here. -->
|
|
||||||
</style>
|
|
||||||
|
|
||||||
</resources>
|
|
@@ -99,17 +99,8 @@ public class LanLink extends BaseLink {
|
|||||||
OutputStream socket = null;
|
OutputStream socket = null;
|
||||||
try {
|
try {
|
||||||
//Wait a maximum of 10 seconds for the other end to establish a connection with our socket, close it afterwards
|
//Wait a maximum of 10 seconds for the other end to establish a connection with our socket, close it afterwards
|
||||||
Timer timeout = new Timer();
|
server.setSoTimeout(10*1000);
|
||||||
timeout.schedule(new TimerTask() {
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
Log.e("KDE/sendPackage","Timeout");
|
|
||||||
try { server.close(); } catch (Exception e) { }
|
|
||||||
callback.sendFailure(new TimeoutException("Timed out waiting for other end to establish a connection to receive the payload."));
|
|
||||||
}
|
|
||||||
},10*1000);
|
|
||||||
socket = server.accept().getOutputStream();
|
socket = server.accept().getOutputStream();
|
||||||
timeout.cancel();
|
|
||||||
|
|
||||||
Log.i("KDE/LanLink", "Beginning to send payload");
|
Log.i("KDE/LanLink", "Beginning to send payload");
|
||||||
|
|
||||||
@@ -127,7 +118,7 @@ public class LanLink extends BaseLink {
|
|||||||
}
|
}
|
||||||
socket.flush();
|
socket.flush();
|
||||||
stream.close();
|
stream.close();
|
||||||
Log.i("KDE/LanLink", "Finished sending payload");
|
Log.i("KDE/LanLink", "Finished sending payload ("+progress+" bytes written)");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Log.e("KDE/sendPackage", "Exception: "+e);
|
Log.e("KDE/sendPackage", "Exception: "+e);
|
||||||
callback.sendFailure(e);
|
callback.sendFailure(e);
|
||||||
|
@@ -25,7 +25,6 @@ import android.app.AlertDialog;
|
|||||||
import android.app.Notification;
|
import android.app.Notification;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.graphics.Bitmap;
|
|
||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
@@ -35,19 +34,16 @@ import android.util.Log;
|
|||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
|
|
||||||
import org.kde.kdeconnect.Helpers.AppsHelper;
|
import org.kde.kdeconnect.Helpers.AppsHelper;
|
||||||
import org.kde.kdeconnect.Helpers.ImagesHelper;
|
|
||||||
import org.kde.kdeconnect.NetworkPackage;
|
import org.kde.kdeconnect.NetworkPackage;
|
||||||
import org.kde.kdeconnect.Plugins.Plugin;
|
import org.kde.kdeconnect.Plugins.Plugin;
|
||||||
import org.kde.kdeconnect.UserInterface.DeviceActivity;
|
import org.kde.kdeconnect.UserInterface.DeviceActivity;
|
||||||
import org.kde.kdeconnect.UserInterface.SettingsActivity;
|
import org.kde.kdeconnect.UserInterface.SettingsActivity;
|
||||||
import org.kde.kdeconnect_tp.R;
|
import org.kde.kdeconnect_tp.R;
|
||||||
|
|
||||||
import java.io.ByteArrayOutputStream;
|
|
||||||
|
|
||||||
public class NotificationsPlugin extends Plugin implements NotificationReceiver.NotificationListener {
|
public class NotificationsPlugin extends Plugin implements NotificationReceiver.NotificationListener {
|
||||||
|
/*
|
||||||
private boolean sendIcons = false;
|
private boolean sendIcons = false;
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String getPluginName() {
|
public String getPluginName() {
|
||||||
return "plugin_notifications";
|
return "plugin_notifications";
|
||||||
@@ -253,7 +249,7 @@ public class NotificationsPlugin extends Plugin implements NotificationReceiver.
|
|||||||
np.set("silent", true);
|
np.set("silent", true);
|
||||||
np.set("requestAnswer", true); //For compatibility with old desktop versions of KDE Connect that don't support "silent"
|
np.set("requestAnswer", true); //For compatibility with old desktop versions of KDE Connect that don't support "silent"
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
if (sendIcons) {
|
if (sendIcons) {
|
||||||
try {
|
try {
|
||||||
Drawable drawableAppIcon = AppsHelper.appIconLookup(context, packageName);
|
Drawable drawableAppIcon = AppsHelper.appIconLookup(context, packageName);
|
||||||
@@ -270,7 +266,7 @@ public class NotificationsPlugin extends Plugin implements NotificationReceiver.
|
|||||||
Log.e("NotificationsPlugin", "Error retrieving icon");
|
Log.e("NotificationsPlugin", "Error retrieving icon");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
np.set("id", id.serialize());
|
np.set("id", id.serialize());
|
||||||
np.set("appName", appName == null? packageName : appName);
|
np.set("appName", appName == null? packageName : appName);
|
||||||
np.set("isClearable", statusBarNotification.isClearable());
|
np.set("isClearable", statusBarNotification.isClearable());
|
||||||
@@ -329,11 +325,11 @@ public class NotificationsPlugin extends Plugin implements NotificationReceiver.
|
|||||||
@Override
|
@Override
|
||||||
public boolean onPackageReceived(final NetworkPackage np) {
|
public boolean onPackageReceived(final NetworkPackage np) {
|
||||||
if (!np.getType().equals(NetworkPackage.PACKAGE_TYPE_NOTIFICATION)) return false;
|
if (!np.getType().equals(NetworkPackage.PACKAGE_TYPE_NOTIFICATION)) return false;
|
||||||
|
/*
|
||||||
if (np.getBoolean("sendIcons")) {
|
if (np.getBoolean("sendIcons")) {
|
||||||
sendIcons = true;
|
sendIcons = true;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
if (np.getBoolean("request")) {
|
if (np.getBoolean("request")) {
|
||||||
|
|
||||||
NotificationReceiver.RunCommand(context, new NotificationReceiver.InstanceCallback() {
|
NotificationReceiver.RunCommand(context, new NotificationReceiver.InstanceCallback() {
|
||||||
|
@@ -207,6 +207,7 @@ public class TelephonyPlugin extends Plugin {
|
|||||||
public boolean onCreate() {
|
public boolean onCreate() {
|
||||||
//Log.e("TelephonyPlugin", "onCreate");
|
//Log.e("TelephonyPlugin", "onCreate");
|
||||||
IntentFilter filter = new IntentFilter("android.provider.Telephony.SMS_RECEIVED");
|
IntentFilter filter = new IntentFilter("android.provider.Telephony.SMS_RECEIVED");
|
||||||
|
filter.setPriority(500);
|
||||||
filter.addAction(TelephonyManager.ACTION_PHONE_STATE_CHANGED);
|
filter.addAction(TelephonyManager.ACTION_PHONE_STATE_CHANGED);
|
||||||
context.registerReceiver(receiver, filter);
|
context.registerReceiver(receiver, filter);
|
||||||
return true;
|
return true;
|
||||||
|
@@ -45,10 +45,6 @@ import java.util.Collection;
|
|||||||
|
|
||||||
public class MainActivity extends ActionBarActivity {
|
public class MainActivity extends ActionBarActivity {
|
||||||
|
|
||||||
//
|
|
||||||
// Action bar
|
|
||||||
//
|
|
||||||
|
|
||||||
private MenuItem menuProgress;
|
private MenuItem menuProgress;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Reference in New Issue
Block a user