use of org.kde.kdeconnect.NetworkPacket in project kdeconnect-android by KDE.
the class MousePadPlugin method sendDoubleClick.
public void sendDoubleClick() {
NetworkPacket np = new NetworkPacket(PACKET_TYPE_MOUSEPAD_REQUEST);
np.set("doubleclick", true);
device.sendPacket(np);
}
use of org.kde.kdeconnect.NetworkPacket in project kdeconnect-android by KDE.
the class BatteryPlugin method onCreate.
@Override
public boolean onCreate() {
IntentFilter intentFilter = new IntentFilter();
intentFilter.addAction(Intent.ACTION_BATTERY_CHANGED);
intentFilter.addAction(Intent.ACTION_BATTERY_LOW);
intentFilter.addAction(Intent.ACTION_BATTERY_OKAY);
Intent currentState = context.registerReceiver(receiver, intentFilter);
receiver.onReceive(context, currentState);
// Request new battery info from the linked device
NetworkPacket np = new NetworkPacket(PACKET_TYPE_BATTERY_REQUEST);
np.set("request", true);
device.sendPacket(np);
return true;
}
use of org.kde.kdeconnect.NetworkPacket in project kdeconnect-android by KDE.
the class BigscreenPlugin method sendRight.
public void sendRight() {
NetworkPacket np = new NetworkPacket(PACKET_TYPE_MOUSEPAD_REQUEST);
np.set("specialKey", SpecialKeysMap.get(KeyEvent.KEYCODE_DPAD_RIGHT));
device.sendPacket(np);
}
use of org.kde.kdeconnect.NetworkPacket in project kdeconnect-android by KDE.
the class BigscreenPlugin method sendSTT.
public void sendSTT(String content) {
NetworkPacket np = new NetworkPacket(PACKET_TYPE_BIGSCREEN_STT);
np.set("type", "stt");
np.set("content", content);
device.sendPacket(np);
}
use of org.kde.kdeconnect.NetworkPacket in project kdeconnect-android by KDE.
the class MprisPlugin method requestPlayerStatus.
private void requestPlayerStatus(String player) {
NetworkPacket np = new NetworkPacket(PACKET_TYPE_MPRIS_REQUEST);
np.set("player", player);
np.set("requestNowPlaying", true);
np.set("requestVolume", true);
device.sendPacket(np);
}
Aggregations