Search in sources :

Example 16 with NetworkPackage

use of org.kde.kdeconnect.NetworkPackage in project kdeconnect-android by KDE.

the class LanPairingHandler method rejectPairing.

@Override
public void rejectPairing() {
    hidePairingNotification();
    mPairStatus = PairStatus.NotPaired;
    NetworkPackage np = new NetworkPackage(NetworkPackage.PACKAGE_TYPE_PAIR);
    np.set("pair", false);
    mDevice.sendPackage(np);
}
Also used : NetworkPackage(org.kde.kdeconnect.NetworkPackage)

Example 17 with NetworkPackage

use of org.kde.kdeconnect.NetworkPackage in project kdeconnect-android by KDE.

the class LoopbackLinkProvider method onNetworkChange.

@Override
public void onNetworkChange() {
    NetworkPackage np = NetworkPackage.createIdentityPackage(context);
    connectionAccepted(np, new LoopbackLink(context, this));
}
Also used : NetworkPackage(org.kde.kdeconnect.NetworkPackage)

Example 18 with NetworkPackage

use of org.kde.kdeconnect.NetworkPackage in project kdeconnect-android by KDE.

the class BluetoothPairingHandler method unpair.

@Override
public void unpair() {
    mPairStatus = PairStatus.NotPaired;
    NetworkPackage np = new NetworkPackage(NetworkPackage.PACKAGE_TYPE_PAIR);
    np.set("pair", false);
    mDevice.sendPackage(np);
}
Also used : NetworkPackage(org.kde.kdeconnect.NetworkPackage)

Example 19 with NetworkPackage

use of org.kde.kdeconnect.NetworkPackage in project kdeconnect-android by KDE.

the class BluetoothPairingHandler method rejectPairing.

@Override
public void rejectPairing() {
    hidePairingNotification();
    mPairStatus = PairStatus.NotPaired;
    NetworkPackage np = new NetworkPackage(NetworkPackage.PACKAGE_TYPE_PAIR);
    np.set("pair", false);
    mDevice.sendPackage(np);
}
Also used : NetworkPackage(org.kde.kdeconnect.NetworkPackage)

Example 20 with NetworkPackage

use of org.kde.kdeconnect.NetworkPackage in project kdeconnect-android by KDE.

the class BluetoothPairingHandler method createPairPackage.

//    @Override
public NetworkPackage createPairPackage() {
    NetworkPackage np = new NetworkPackage(NetworkPackage.PACKAGE_TYPE_PAIR);
    np.set("pair", true);
    return np;
}
Also used : NetworkPackage(org.kde.kdeconnect.NetworkPackage)

Aggregations

NetworkPackage (org.kde.kdeconnect.NetworkPackage)41 IOException (java.io.IOException)4 ArrayList (java.util.ArrayList)4 SocketException (java.net.SocketException)3 Uri (android.net.Uri)2 BufferedReader (java.io.BufferedReader)2 File (java.io.File)2 InputStreamReader (java.io.InputStreamReader)2 DatagramSocket (java.net.DatagramSocket)2 InetAddress (java.net.InetAddress)2 ServerSocket (java.net.ServerSocket)2 Socket (java.net.Socket)2 Timer (java.util.Timer)2 TimerTask (java.util.TimerTask)2 Cipher (javax.crypto.Cipher)2 SSLSocket (javax.net.ssl.SSLSocket)2 JSONArray (org.json.JSONArray)2 Notification (android.app.Notification)1 ContentResolver (android.content.ContentResolver)1 Intent (android.content.Intent)1