diff --git a/AndroidManifest.xml b/AndroidManifest.xml
new file mode 100644
index 0000000..ce22437
--- /dev/null
+++ b/AndroidManifest.xml
@@ -0,0 +1,98 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..1ebc771
--- /dev/null
+++ b/README.md
@@ -0,0 +1,40 @@
+DeskCon
+-------
+
+integrates your Android Device in the Desktop. Receive Notifications, Files
+and Commands from your mobile Device on your Desktop PC. The Data is send via a
+secure TLS Connection. The Connection is encrypted and authenticated with
+self-signed Certificates (RSA-2048 PK).
+
+Warning: This Project is still in development (beta) and may contain some Bugs or
+ Security Holes. If you find any, please report them ^^
+
+This Project uses Libraries from Spongy Castle.
+
+
+Information:
+------------
+ - Project Website http://www.screenfreeze.net/deskcon
+ - Source https://github.com/screenfreeze/deskcon-desktop
+ - Google Play Store https://play.google.com/store/apps/details?id=net.screenfreeze.deskcon
+
+
+Requirements (Android):
+------------------------------
+ - Version >= 2.3.3
+
+
+Install:
+--------
+ - compile this Source and sideload
+ - or buy in Google Play Store and support the Developer
+
+
+Usage:
+------
+ - start the DeskCon Desktop Server
+ - (optional) change config File in ~/.deskcon
+ - start DeskCon App on your Android Device
+ - select Network > Desktop Hosts
+ - click the + Button and enter the IP of your Desktop PC
+ - check whether the Fingerprints match
diff --git a/bin/AndroidManifest.xml b/bin/AndroidManifest.xml
new file mode 100644
index 0000000..ce22437
--- /dev/null
+++ b/bin/AndroidManifest.xml
@@ -0,0 +1,98 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/bin/DeskCon.apk b/bin/DeskCon.apk
new file mode 100644
index 0000000..e6b093a
Binary files /dev/null and b/bin/DeskCon.apk differ
diff --git a/bin/classes.dex b/bin/classes.dex
new file mode 100644
index 0000000..ee2aa55
Binary files /dev/null and b/bin/classes.dex differ
diff --git a/bin/classes/net/screenfreeze/deskcon/AuthenticationManager$1.class b/bin/classes/net/screenfreeze/deskcon/AuthenticationManager$1.class
new file mode 100644
index 0000000..4461d54
Binary files /dev/null and b/bin/classes/net/screenfreeze/deskcon/AuthenticationManager$1.class differ
diff --git a/bin/classes/net/screenfreeze/deskcon/AuthenticationManager$2.class b/bin/classes/net/screenfreeze/deskcon/AuthenticationManager$2.class
new file mode 100644
index 0000000..db99e48
Binary files /dev/null and b/bin/classes/net/screenfreeze/deskcon/AuthenticationManager$2.class differ
diff --git a/bin/classes/net/screenfreeze/deskcon/AuthenticationManager$ParingTask.class b/bin/classes/net/screenfreeze/deskcon/AuthenticationManager$ParingTask.class
new file mode 100644
index 0000000..c00d080
Binary files /dev/null and b/bin/classes/net/screenfreeze/deskcon/AuthenticationManager$ParingTask.class differ
diff --git a/bin/classes/net/screenfreeze/deskcon/AuthenticationManager.class b/bin/classes/net/screenfreeze/deskcon/AuthenticationManager.class
new file mode 100644
index 0000000..4a30305
Binary files /dev/null and b/bin/classes/net/screenfreeze/deskcon/AuthenticationManager.class differ
diff --git a/bin/classes/net/screenfreeze/deskcon/BootCompleteBroadcastReceiver.class b/bin/classes/net/screenfreeze/deskcon/BootCompleteBroadcastReceiver.class
new file mode 100644
index 0000000..8002fe8
Binary files /dev/null and b/bin/classes/net/screenfreeze/deskcon/BootCompleteBroadcastReceiver.class differ
diff --git a/bin/classes/net/screenfreeze/deskcon/BuildConfig.class b/bin/classes/net/screenfreeze/deskcon/BuildConfig.class
new file mode 100644
index 0000000..a64a318
Binary files /dev/null and b/bin/classes/net/screenfreeze/deskcon/BuildConfig.class differ
diff --git a/bin/classes/net/screenfreeze/deskcon/Connection.class b/bin/classes/net/screenfreeze/deskcon/Connection.class
new file mode 100644
index 0000000..f7c4032
Binary files /dev/null and b/bin/classes/net/screenfreeze/deskcon/Connection.class differ
diff --git a/bin/classes/net/screenfreeze/deskcon/ControlService$ControlServer.class b/bin/classes/net/screenfreeze/deskcon/ControlService$ControlServer.class
new file mode 100644
index 0000000..7d0c1ae
Binary files /dev/null and b/bin/classes/net/screenfreeze/deskcon/ControlService$ControlServer.class differ
diff --git a/bin/classes/net/screenfreeze/deskcon/ControlService.class b/bin/classes/net/screenfreeze/deskcon/ControlService.class
new file mode 100644
index 0000000..0671a0c
Binary files /dev/null and b/bin/classes/net/screenfreeze/deskcon/ControlService.class differ
diff --git a/bin/classes/net/screenfreeze/deskcon/DesktopHostsActivity$1.class b/bin/classes/net/screenfreeze/deskcon/DesktopHostsActivity$1.class
new file mode 100644
index 0000000..1eb7069
Binary files /dev/null and b/bin/classes/net/screenfreeze/deskcon/DesktopHostsActivity$1.class differ
diff --git a/bin/classes/net/screenfreeze/deskcon/DesktopHostsActivity$2.class b/bin/classes/net/screenfreeze/deskcon/DesktopHostsActivity$2.class
new file mode 100644
index 0000000..3430674
Binary files /dev/null and b/bin/classes/net/screenfreeze/deskcon/DesktopHostsActivity$2.class differ
diff --git a/bin/classes/net/screenfreeze/deskcon/DesktopHostsActivity$3.class b/bin/classes/net/screenfreeze/deskcon/DesktopHostsActivity$3.class
new file mode 100644
index 0000000..ed2ee4e
Binary files /dev/null and b/bin/classes/net/screenfreeze/deskcon/DesktopHostsActivity$3.class differ
diff --git a/bin/classes/net/screenfreeze/deskcon/DesktopHostsActivity$4.class b/bin/classes/net/screenfreeze/deskcon/DesktopHostsActivity$4.class
new file mode 100644
index 0000000..cd9502b
Binary files /dev/null and b/bin/classes/net/screenfreeze/deskcon/DesktopHostsActivity$4.class differ
diff --git a/bin/classes/net/screenfreeze/deskcon/DesktopHostsActivity$5.class b/bin/classes/net/screenfreeze/deskcon/DesktopHostsActivity$5.class
new file mode 100644
index 0000000..b3035f7
Binary files /dev/null and b/bin/classes/net/screenfreeze/deskcon/DesktopHostsActivity$5.class differ
diff --git a/bin/classes/net/screenfreeze/deskcon/DesktopHostsActivity$6.class b/bin/classes/net/screenfreeze/deskcon/DesktopHostsActivity$6.class
new file mode 100644
index 0000000..34ba0f5
Binary files /dev/null and b/bin/classes/net/screenfreeze/deskcon/DesktopHostsActivity$6.class differ
diff --git a/bin/classes/net/screenfreeze/deskcon/DesktopHostsActivity$HostsAdapter$1.class b/bin/classes/net/screenfreeze/deskcon/DesktopHostsActivity$HostsAdapter$1.class
new file mode 100644
index 0000000..19d70e0
Binary files /dev/null and b/bin/classes/net/screenfreeze/deskcon/DesktopHostsActivity$HostsAdapter$1.class differ
diff --git a/bin/classes/net/screenfreeze/deskcon/DesktopHostsActivity$HostsAdapter$2.class b/bin/classes/net/screenfreeze/deskcon/DesktopHostsActivity$HostsAdapter$2.class
new file mode 100644
index 0000000..9ba6aa5
Binary files /dev/null and b/bin/classes/net/screenfreeze/deskcon/DesktopHostsActivity$HostsAdapter$2.class differ
diff --git a/bin/classes/net/screenfreeze/deskcon/DesktopHostsActivity$HostsAdapter$3.class b/bin/classes/net/screenfreeze/deskcon/DesktopHostsActivity$HostsAdapter$3.class
new file mode 100644
index 0000000..6a3e6de
Binary files /dev/null and b/bin/classes/net/screenfreeze/deskcon/DesktopHostsActivity$HostsAdapter$3.class differ
diff --git a/bin/classes/net/screenfreeze/deskcon/DesktopHostsActivity$HostsAdapter.class b/bin/classes/net/screenfreeze/deskcon/DesktopHostsActivity$HostsAdapter.class
new file mode 100644
index 0000000..fe0f46a
Binary files /dev/null and b/bin/classes/net/screenfreeze/deskcon/DesktopHostsActivity$HostsAdapter.class differ
diff --git a/bin/classes/net/screenfreeze/deskcon/DesktopHostsActivity$OnPairCallback.class b/bin/classes/net/screenfreeze/deskcon/DesktopHostsActivity$OnPairCallback.class
new file mode 100644
index 0000000..2f95491
Binary files /dev/null and b/bin/classes/net/screenfreeze/deskcon/DesktopHostsActivity$OnPairCallback.class differ
diff --git a/bin/classes/net/screenfreeze/deskcon/DesktopHostsActivity$OnPairListener.class b/bin/classes/net/screenfreeze/deskcon/DesktopHostsActivity$OnPairListener.class
new file mode 100644
index 0000000..cf33277
Binary files /dev/null and b/bin/classes/net/screenfreeze/deskcon/DesktopHostsActivity$OnPairListener.class differ
diff --git a/bin/classes/net/screenfreeze/deskcon/DesktopHostsActivity.class b/bin/classes/net/screenfreeze/deskcon/DesktopHostsActivity.class
new file mode 100644
index 0000000..c6f2458
Binary files /dev/null and b/bin/classes/net/screenfreeze/deskcon/DesktopHostsActivity.class differ
diff --git a/bin/classes/net/screenfreeze/deskcon/DesktopHostsDBHelper.class b/bin/classes/net/screenfreeze/deskcon/DesktopHostsDBHelper.class
new file mode 100644
index 0000000..7ba72de
Binary files /dev/null and b/bin/classes/net/screenfreeze/deskcon/DesktopHostsDBHelper.class differ
diff --git a/bin/classes/net/screenfreeze/deskcon/EventBroadcastReceiver.class b/bin/classes/net/screenfreeze/deskcon/EventBroadcastReceiver.class
new file mode 100644
index 0000000..3330bf3
Binary files /dev/null and b/bin/classes/net/screenfreeze/deskcon/EventBroadcastReceiver.class differ
diff --git a/bin/classes/net/screenfreeze/deskcon/MainActivity$1.class b/bin/classes/net/screenfreeze/deskcon/MainActivity$1.class
new file mode 100644
index 0000000..fa403bc
Binary files /dev/null and b/bin/classes/net/screenfreeze/deskcon/MainActivity$1.class differ
diff --git a/bin/classes/net/screenfreeze/deskcon/MainActivity$10.class b/bin/classes/net/screenfreeze/deskcon/MainActivity$10.class
new file mode 100644
index 0000000..b91326b
Binary files /dev/null and b/bin/classes/net/screenfreeze/deskcon/MainActivity$10.class differ
diff --git a/bin/classes/net/screenfreeze/deskcon/MainActivity$11.class b/bin/classes/net/screenfreeze/deskcon/MainActivity$11.class
new file mode 100644
index 0000000..4e3692b
Binary files /dev/null and b/bin/classes/net/screenfreeze/deskcon/MainActivity$11.class differ
diff --git a/bin/classes/net/screenfreeze/deskcon/MainActivity$2.class b/bin/classes/net/screenfreeze/deskcon/MainActivity$2.class
new file mode 100644
index 0000000..3895e4d
Binary files /dev/null and b/bin/classes/net/screenfreeze/deskcon/MainActivity$2.class differ
diff --git a/bin/classes/net/screenfreeze/deskcon/MainActivity$3.class b/bin/classes/net/screenfreeze/deskcon/MainActivity$3.class
new file mode 100644
index 0000000..0615c7a
Binary files /dev/null and b/bin/classes/net/screenfreeze/deskcon/MainActivity$3.class differ
diff --git a/bin/classes/net/screenfreeze/deskcon/MainActivity$4.class b/bin/classes/net/screenfreeze/deskcon/MainActivity$4.class
new file mode 100644
index 0000000..1b59890
Binary files /dev/null and b/bin/classes/net/screenfreeze/deskcon/MainActivity$4.class differ
diff --git a/bin/classes/net/screenfreeze/deskcon/MainActivity$5.class b/bin/classes/net/screenfreeze/deskcon/MainActivity$5.class
new file mode 100644
index 0000000..5e22645
Binary files /dev/null and b/bin/classes/net/screenfreeze/deskcon/MainActivity$5.class differ
diff --git a/bin/classes/net/screenfreeze/deskcon/MainActivity$6.class b/bin/classes/net/screenfreeze/deskcon/MainActivity$6.class
new file mode 100644
index 0000000..8d1474a
Binary files /dev/null and b/bin/classes/net/screenfreeze/deskcon/MainActivity$6.class differ
diff --git a/bin/classes/net/screenfreeze/deskcon/MainActivity$7.class b/bin/classes/net/screenfreeze/deskcon/MainActivity$7.class
new file mode 100644
index 0000000..21faee9
Binary files /dev/null and b/bin/classes/net/screenfreeze/deskcon/MainActivity$7.class differ
diff --git a/bin/classes/net/screenfreeze/deskcon/MainActivity$8.class b/bin/classes/net/screenfreeze/deskcon/MainActivity$8.class
new file mode 100644
index 0000000..29bcb63
Binary files /dev/null and b/bin/classes/net/screenfreeze/deskcon/MainActivity$8.class differ
diff --git a/bin/classes/net/screenfreeze/deskcon/MainActivity$9.class b/bin/classes/net/screenfreeze/deskcon/MainActivity$9.class
new file mode 100644
index 0000000..412c9ed
Binary files /dev/null and b/bin/classes/net/screenfreeze/deskcon/MainActivity$9.class differ
diff --git a/bin/classes/net/screenfreeze/deskcon/MainActivity$KeypairgenerationTask.class b/bin/classes/net/screenfreeze/deskcon/MainActivity$KeypairgenerationTask.class
new file mode 100644
index 0000000..dc02fe3
Binary files /dev/null and b/bin/classes/net/screenfreeze/deskcon/MainActivity$KeypairgenerationTask.class differ
diff --git a/bin/classes/net/screenfreeze/deskcon/MainActivity.class b/bin/classes/net/screenfreeze/deskcon/MainActivity.class
new file mode 100644
index 0000000..fd2ba0f
Binary files /dev/null and b/bin/classes/net/screenfreeze/deskcon/MainActivity.class differ
diff --git a/bin/classes/net/screenfreeze/deskcon/NotificationUpdateService.class b/bin/classes/net/screenfreeze/deskcon/NotificationUpdateService.class
new file mode 100644
index 0000000..2013c82
Binary files /dev/null and b/bin/classes/net/screenfreeze/deskcon/NotificationUpdateService.class differ
diff --git a/bin/classes/net/screenfreeze/deskcon/NotificationUpdateServiceOld.class b/bin/classes/net/screenfreeze/deskcon/NotificationUpdateServiceOld.class
new file mode 100644
index 0000000..3e9aabd
Binary files /dev/null and b/bin/classes/net/screenfreeze/deskcon/NotificationUpdateServiceOld.class differ
diff --git a/bin/classes/net/screenfreeze/deskcon/NotificationWhitelistActivity$ApplicationAdapter$1.class b/bin/classes/net/screenfreeze/deskcon/NotificationWhitelistActivity$ApplicationAdapter$1.class
new file mode 100644
index 0000000..a8afe30
Binary files /dev/null and b/bin/classes/net/screenfreeze/deskcon/NotificationWhitelistActivity$ApplicationAdapter$1.class differ
diff --git a/bin/classes/net/screenfreeze/deskcon/NotificationWhitelistActivity$ApplicationAdapter.class b/bin/classes/net/screenfreeze/deskcon/NotificationWhitelistActivity$ApplicationAdapter.class
new file mode 100644
index 0000000..41ce62e
Binary files /dev/null and b/bin/classes/net/screenfreeze/deskcon/NotificationWhitelistActivity$ApplicationAdapter.class differ
diff --git a/bin/classes/net/screenfreeze/deskcon/NotificationWhitelistActivity$LoadApplications.class b/bin/classes/net/screenfreeze/deskcon/NotificationWhitelistActivity$LoadApplications.class
new file mode 100644
index 0000000..6c8413d
Binary files /dev/null and b/bin/classes/net/screenfreeze/deskcon/NotificationWhitelistActivity$LoadApplications.class differ
diff --git a/bin/classes/net/screenfreeze/deskcon/NotificationWhitelistActivity.class b/bin/classes/net/screenfreeze/deskcon/NotificationWhitelistActivity.class
new file mode 100644
index 0000000..dcac4a8
Binary files /dev/null and b/bin/classes/net/screenfreeze/deskcon/NotificationWhitelistActivity.class differ
diff --git a/bin/classes/net/screenfreeze/deskcon/R$attr.class b/bin/classes/net/screenfreeze/deskcon/R$attr.class
new file mode 100644
index 0000000..7ab1c02
Binary files /dev/null and b/bin/classes/net/screenfreeze/deskcon/R$attr.class differ
diff --git a/bin/classes/net/screenfreeze/deskcon/R$bool.class b/bin/classes/net/screenfreeze/deskcon/R$bool.class
new file mode 100644
index 0000000..34ec173
Binary files /dev/null and b/bin/classes/net/screenfreeze/deskcon/R$bool.class differ
diff --git a/bin/classes/net/screenfreeze/deskcon/R$dimen.class b/bin/classes/net/screenfreeze/deskcon/R$dimen.class
new file mode 100644
index 0000000..1e5ed36
Binary files /dev/null and b/bin/classes/net/screenfreeze/deskcon/R$dimen.class differ
diff --git a/bin/classes/net/screenfreeze/deskcon/R$drawable.class b/bin/classes/net/screenfreeze/deskcon/R$drawable.class
new file mode 100644
index 0000000..d7a61ba
Binary files /dev/null and b/bin/classes/net/screenfreeze/deskcon/R$drawable.class differ
diff --git a/bin/classes/net/screenfreeze/deskcon/R$id.class b/bin/classes/net/screenfreeze/deskcon/R$id.class
new file mode 100644
index 0000000..dd321c5
Binary files /dev/null and b/bin/classes/net/screenfreeze/deskcon/R$id.class differ
diff --git a/bin/classes/net/screenfreeze/deskcon/R$layout.class b/bin/classes/net/screenfreeze/deskcon/R$layout.class
new file mode 100644
index 0000000..8235080
Binary files /dev/null and b/bin/classes/net/screenfreeze/deskcon/R$layout.class differ
diff --git a/bin/classes/net/screenfreeze/deskcon/R$menu.class b/bin/classes/net/screenfreeze/deskcon/R$menu.class
new file mode 100644
index 0000000..d4eeab4
Binary files /dev/null and b/bin/classes/net/screenfreeze/deskcon/R$menu.class differ
diff --git a/bin/classes/net/screenfreeze/deskcon/R$raw.class b/bin/classes/net/screenfreeze/deskcon/R$raw.class
new file mode 100644
index 0000000..bbfd05d
Binary files /dev/null and b/bin/classes/net/screenfreeze/deskcon/R$raw.class differ
diff --git a/bin/classes/net/screenfreeze/deskcon/R$string.class b/bin/classes/net/screenfreeze/deskcon/R$string.class
new file mode 100644
index 0000000..c1be6a0
Binary files /dev/null and b/bin/classes/net/screenfreeze/deskcon/R$string.class differ
diff --git a/bin/classes/net/screenfreeze/deskcon/R$style.class b/bin/classes/net/screenfreeze/deskcon/R$style.class
new file mode 100644
index 0000000..fe07323
Binary files /dev/null and b/bin/classes/net/screenfreeze/deskcon/R$style.class differ
diff --git a/bin/classes/net/screenfreeze/deskcon/R$xml.class b/bin/classes/net/screenfreeze/deskcon/R$xml.class
new file mode 100644
index 0000000..09e3cdb
Binary files /dev/null and b/bin/classes/net/screenfreeze/deskcon/R$xml.class differ
diff --git a/bin/classes/net/screenfreeze/deskcon/R.class b/bin/classes/net/screenfreeze/deskcon/R.class
new file mode 100644
index 0000000..999998a
Binary files /dev/null and b/bin/classes/net/screenfreeze/deskcon/R.class differ
diff --git a/bin/classes/net/screenfreeze/deskcon/SendFilesService$SendFilesClient.class b/bin/classes/net/screenfreeze/deskcon/SendFilesService$SendFilesClient.class
new file mode 100644
index 0000000..60e55f1
Binary files /dev/null and b/bin/classes/net/screenfreeze/deskcon/SendFilesService$SendFilesClient.class differ
diff --git a/bin/classes/net/screenfreeze/deskcon/SendFilesService.class b/bin/classes/net/screenfreeze/deskcon/SendFilesService.class
new file mode 100644
index 0000000..9701627
Binary files /dev/null and b/bin/classes/net/screenfreeze/deskcon/SendFilesService.class differ
diff --git a/bin/classes/net/screenfreeze/deskcon/ShareActivity$1.class b/bin/classes/net/screenfreeze/deskcon/ShareActivity$1.class
new file mode 100644
index 0000000..282d8d6
Binary files /dev/null and b/bin/classes/net/screenfreeze/deskcon/ShareActivity$1.class differ
diff --git a/bin/classes/net/screenfreeze/deskcon/ShareActivity$HostsAdapter.class b/bin/classes/net/screenfreeze/deskcon/ShareActivity$HostsAdapter.class
new file mode 100644
index 0000000..2a3437e
Binary files /dev/null and b/bin/classes/net/screenfreeze/deskcon/ShareActivity$HostsAdapter.class differ
diff --git a/bin/classes/net/screenfreeze/deskcon/ShareActivity.class b/bin/classes/net/screenfreeze/deskcon/ShareActivity.class
new file mode 100644
index 0000000..f263d2a
Binary files /dev/null and b/bin/classes/net/screenfreeze/deskcon/ShareActivity.class differ
diff --git a/bin/classes/net/screenfreeze/deskcon/StatusUpdateService$SendDataClient.class b/bin/classes/net/screenfreeze/deskcon/StatusUpdateService$SendDataClient.class
new file mode 100644
index 0000000..c0017b9
Binary files /dev/null and b/bin/classes/net/screenfreeze/deskcon/StatusUpdateService$SendDataClient.class differ
diff --git a/bin/classes/net/screenfreeze/deskcon/StatusUpdateService.class b/bin/classes/net/screenfreeze/deskcon/StatusUpdateService.class
new file mode 100644
index 0000000..742ae7e
Binary files /dev/null and b/bin/classes/net/screenfreeze/deskcon/StatusUpdateService.class differ
diff --git a/bin/dexedLibs/android-support-v4-2161c19d414767c136cb16967211a641.jar b/bin/dexedLibs/android-support-v4-2161c19d414767c136cb16967211a641.jar
new file mode 100644
index 0000000..3af50fe
Binary files /dev/null and b/bin/dexedLibs/android-support-v4-2161c19d414767c136cb16967211a641.jar differ
diff --git a/bin/dexedLibs/android-support-v4-44d3010707893077384254c29bff51e5.jar b/bin/dexedLibs/android-support-v4-44d3010707893077384254c29bff51e5.jar
new file mode 100644
index 0000000..5527f3e
Binary files /dev/null and b/bin/dexedLibs/android-support-v4-44d3010707893077384254c29bff51e5.jar differ
diff --git a/bin/dexedLibs/android-support-v4-8aaad23f96817416028316522251a21b.jar b/bin/dexedLibs/android-support-v4-8aaad23f96817416028316522251a21b.jar
new file mode 100644
index 0000000..13e0f34
Binary files /dev/null and b/bin/dexedLibs/android-support-v4-8aaad23f96817416028316522251a21b.jar differ
diff --git a/bin/dexedLibs/android-support-v4-91b260f22c5b097ce616a79d77fdc383.jar b/bin/dexedLibs/android-support-v4-91b260f22c5b097ce616a79d77fdc383.jar
new file mode 100644
index 0000000..f48d67f
Binary files /dev/null and b/bin/dexedLibs/android-support-v4-91b260f22c5b097ce616a79d77fdc383.jar differ
diff --git a/bin/dexedLibs/android-support-v4-a72bc5e68b398c18bab2387df75c1085.jar b/bin/dexedLibs/android-support-v4-a72bc5e68b398c18bab2387df75c1085.jar
new file mode 100644
index 0000000..8260e61
Binary files /dev/null and b/bin/dexedLibs/android-support-v4-a72bc5e68b398c18bab2387df75c1085.jar differ
diff --git a/bin/dexedLibs/sc-light-jdk15on-1.47.0.3-1c59f0cb50873405ed7ae28d26b49fa6.jar b/bin/dexedLibs/sc-light-jdk15on-1.47.0.3-1c59f0cb50873405ed7ae28d26b49fa6.jar
new file mode 100644
index 0000000..6709cea
Binary files /dev/null and b/bin/dexedLibs/sc-light-jdk15on-1.47.0.3-1c59f0cb50873405ed7ae28d26b49fa6.jar differ
diff --git a/bin/dexedLibs/sc-light-jdk15on-1.47.0.3-5628eabd6ec63c1ba5e59c1877e25b3d.jar b/bin/dexedLibs/sc-light-jdk15on-1.47.0.3-5628eabd6ec63c1ba5e59c1877e25b3d.jar
new file mode 100644
index 0000000..8c9be47
Binary files /dev/null and b/bin/dexedLibs/sc-light-jdk15on-1.47.0.3-5628eabd6ec63c1ba5e59c1877e25b3d.jar differ
diff --git a/bin/dexedLibs/sc-light-jdk15on-1.47.0.3-79f5a33892fad77bfa0df64657c4089a.jar b/bin/dexedLibs/sc-light-jdk15on-1.47.0.3-79f5a33892fad77bfa0df64657c4089a.jar
new file mode 100644
index 0000000..be96988
Binary files /dev/null and b/bin/dexedLibs/sc-light-jdk15on-1.47.0.3-79f5a33892fad77bfa0df64657c4089a.jar differ
diff --git a/bin/dexedLibs/sc-light-jdk15on-1.47.0.3-e52bca2200f18aef0913aa5a4175cf87.jar b/bin/dexedLibs/sc-light-jdk15on-1.47.0.3-e52bca2200f18aef0913aa5a4175cf87.jar
new file mode 100644
index 0000000..ebd6b34
Binary files /dev/null and b/bin/dexedLibs/sc-light-jdk15on-1.47.0.3-e52bca2200f18aef0913aa5a4175cf87.jar differ
diff --git a/bin/dexedLibs/scprov-jdk15on-1.47.0.3-045bef9deb40b7578f94d0e5850db279.jar b/bin/dexedLibs/scprov-jdk15on-1.47.0.3-045bef9deb40b7578f94d0e5850db279.jar
new file mode 100644
index 0000000..f75b26c
Binary files /dev/null and b/bin/dexedLibs/scprov-jdk15on-1.47.0.3-045bef9deb40b7578f94d0e5850db279.jar differ
diff --git a/bin/dexedLibs/scprov-jdk15on-1.47.0.3-830979b27aacf66e8ca2426289fef679.jar b/bin/dexedLibs/scprov-jdk15on-1.47.0.3-830979b27aacf66e8ca2426289fef679.jar
new file mode 100644
index 0000000..d6b20ff
Binary files /dev/null and b/bin/dexedLibs/scprov-jdk15on-1.47.0.3-830979b27aacf66e8ca2426289fef679.jar differ
diff --git a/bin/dexedLibs/scprov-jdk15on-1.47.0.3-9fe9fbc130c5ec8df333404433bc3522.jar b/bin/dexedLibs/scprov-jdk15on-1.47.0.3-9fe9fbc130c5ec8df333404433bc3522.jar
new file mode 100644
index 0000000..26d5621
Binary files /dev/null and b/bin/dexedLibs/scprov-jdk15on-1.47.0.3-9fe9fbc130c5ec8df333404433bc3522.jar differ
diff --git a/bin/dexedLibs/scprov-jdk15on-1.47.0.3-f2be2e3da9ea4c33c50293a1f41b7695.jar b/bin/dexedLibs/scprov-jdk15on-1.47.0.3-f2be2e3da9ea4c33c50293a1f41b7695.jar
new file mode 100644
index 0000000..167e604
Binary files /dev/null and b/bin/dexedLibs/scprov-jdk15on-1.47.0.3-f2be2e3da9ea4c33c50293a1f41b7695.jar differ
diff --git a/bin/jarlist.cache b/bin/jarlist.cache
new file mode 100644
index 0000000..0565465
--- /dev/null
+++ b/bin/jarlist.cache
@@ -0,0 +1,3 @@
+# cache for current jar dependency. DO NOT EDIT.
+# format is
+# Encoding is UTF-8
diff --git a/bin/res/crunch/drawable-hdpi/connector_launcher.png b/bin/res/crunch/drawable-hdpi/connector_launcher.png
new file mode 100644
index 0000000..8df8e4e
Binary files /dev/null and b/bin/res/crunch/drawable-hdpi/connector_launcher.png differ
diff --git a/bin/res/crunch/drawable-mdpi/connector_launcher.png b/bin/res/crunch/drawable-mdpi/connector_launcher.png
new file mode 100644
index 0000000..1c7d316
Binary files /dev/null and b/bin/res/crunch/drawable-mdpi/connector_launcher.png differ
diff --git a/bin/res/crunch/drawable-xhdpi/connector_launcher.png b/bin/res/crunch/drawable-xhdpi/connector_launcher.png
new file mode 100644
index 0000000..ed50e2a
Binary files /dev/null and b/bin/res/crunch/drawable-xhdpi/connector_launcher.png differ
diff --git a/bin/res/crunch/drawable-xxhdpi/connector_launcher.png b/bin/res/crunch/drawable-xxhdpi/connector_launcher.png
new file mode 100644
index 0000000..ef7373b
Binary files /dev/null and b/bin/res/crunch/drawable-xxhdpi/connector_launcher.png differ
diff --git a/bin/resources.ap_ b/bin/resources.ap_
new file mode 100644
index 0000000..d3805e6
Binary files /dev/null and b/bin/resources.ap_ differ
diff --git a/connector_launcher-web.png b/connector_launcher-web.png
new file mode 100644
index 0000000..cfdb8b2
Binary files /dev/null and b/connector_launcher-web.png differ
diff --git a/gen/net/screenfreeze/deskcon/BuildConfig.java b/gen/net/screenfreeze/deskcon/BuildConfig.java
new file mode 100644
index 0000000..5c99fd5
--- /dev/null
+++ b/gen/net/screenfreeze/deskcon/BuildConfig.java
@@ -0,0 +1,6 @@
+/** Automatically generated file. DO NOT MODIFY */
+package net.screenfreeze.deskcon;
+
+public final class BuildConfig {
+ public final static boolean DEBUG = true;
+}
\ No newline at end of file
diff --git a/gen/net/screenfreeze/deskcon/R.java b/gen/net/screenfreeze/deskcon/R.java
new file mode 100644
index 0000000..9f25f60
--- /dev/null
+++ b/gen/net/screenfreeze/deskcon/R.java
@@ -0,0 +1,122 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * aapt tool from the resource data it found. It
+ * should not be modified by hand.
+ */
+
+package net.screenfreeze.deskcon;
+
+public final class R {
+ public static final class attr {
+ }
+ public static final class bool {
+ public static final int has18=0x7f060000;
+ public static final int pre18=0x7f060001;
+ }
+ public static final class dimen {
+ /** Default screen margins, per the Android Design guidelines.
+
+ Customize dimensions originally defined in res/values/dimens.xml (such as
+ screen margins) for sw720dp devices (e.g. 10" tablets) in landscape here.
+
+ */
+ public static final int activity_horizontal_margin=0x7f070000;
+ public static final int activity_vertical_margin=0x7f070001;
+ }
+ public static final class drawable {
+ public static final int connector_launcher=0x7f020000;
+ }
+ public static final class id {
+ public static final int action_settings=0x7f0b0022;
+ public static final int app_icon=0x7f0b0009;
+ public static final int app_name=0x7f0b000a;
+ public static final int app_package=0x7f0b000b;
+ public static final int applistview=0x7f0b001d;
+ public static final int changelogView=0x7f0b0002;
+ public static final int checkBox=0x7f0b000c;
+ public static final int deletehostimageView=0x7f0b0016;
+ public static final int hostidtextView=0x7f0b0015;
+ public static final int hostiptextView=0x7f0b0011;
+ public static final int hostmactextView=0x7f0b0003;
+ public static final int hostnametextView=0x7f0b0001;
+ public static final int hosts_cancel_button=0x7f0b001b;
+ public static final int hosts_editText=0x7f0b0019;
+ public static final int hosts_save_button=0x7f0b001c;
+ public static final int hostsaddimageView=0x7f0b000e;
+ public static final int hostslistView=0x7f0b000f;
+ public static final int layout_root=0x7f0b0000;
+ public static final int linearLayout1=0x7f0b0010;
+ public static final int linearLayout2=0x7f0b0012;
+ public static final int linearLayout3=0x7f0b0013;
+ public static final int myfptextView=0x7f0b0014;
+ public static final int newipeditText=0x7f0b0005;
+ public static final int newporteditText=0x7f0b0007;
+ public static final int ping_button=0x7f0b001a;
+ public static final int scrollView1=0x7f0b000d;
+ public static final int serverfptextView=0x7f0b0020;
+ public static final int sharehostslistView=0x7f0b001e;
+ public static final int ssid_spinner=0x7f0b0018;
+ public static final int textView1=0x7f0b0004;
+ public static final int textView2=0x7f0b0006;
+ public static final int textView3=0x7f0b001f;
+ public static final int textView4=0x7f0b0021;
+ public static final int wifilockcheckBox=0x7f0b0008;
+ public static final int wifitextView=0x7f0b0017;
+ }
+ public static final class layout {
+ public static final int about=0x7f030000;
+ public static final int add_host_dialog=0x7f030001;
+ public static final int app_list_row=0x7f030002;
+ public static final int changelog=0x7f030003;
+ public static final int desktop_hosts=0x7f030004;
+ public static final int edit_host_dialog=0x7f030005;
+ public static final int host_list_row=0x7f030006;
+ public static final int network_conf_layout=0x7f030007;
+ public static final int notification_whitelist=0x7f030008;
+ public static final int share_desktop_hosts=0x7f030009;
+ public static final int verify_fingerprint_dialog=0x7f03000a;
+ }
+ public static final class menu {
+ public static final int main=0x7f0a0000;
+ }
+ public static final class raw {
+ public static final int defaultkeystore=0x7f050000;
+ public static final int defaultnotificationwl=0x7f050001;
+ }
+ public static final class string {
+ public static final int action_settings=0x7f080001;
+ public static final int app_name=0x7f080000;
+ }
+ public static final class style {
+ /**
+ Base application theme, dependent on API level. This theme is replaced
+ by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
+
+
+ Theme customizations available in newer API levels can go in
+ res/values-vXX/styles.xml, while customizations related to
+ backward-compatibility can go here.
+
+
+ Base application theme for API 11+. This theme completely replaces
+ AppBaseTheme from res/values/styles.xml on API 11+ devices.
+
+ API 11 theme customizations can go here.
+
+ Base application theme for API 14+. This theme completely replaces
+ AppBaseTheme from BOTH res/values/styles.xml and
+ res/values-v11/styles.xml on API 14+ devices.
+
+ API 14 theme customizations can go here.
+ */
+ public static final int AppBaseTheme=0x7f090000;
+ /** Application theme.
+ All customizations that are NOT specific to a particular API-level can go here.
+ */
+ public static final int AppTheme=0x7f090001;
+ }
+ public static final class xml {
+ public static final int preferences=0x7f040000;
+ }
+}
diff --git a/libs/android-support-v4.jar b/libs/android-support-v4.jar
new file mode 100644
index 0000000..9056828
Binary files /dev/null and b/libs/android-support-v4.jar differ
diff --git a/libs/sc-light-jdk15on-1.47.0.3.jar b/libs/sc-light-jdk15on-1.47.0.3.jar
new file mode 100644
index 0000000..ed5325b
Binary files /dev/null and b/libs/sc-light-jdk15on-1.47.0.3.jar differ
diff --git a/libs/scprov-jdk15on-1.47.0.3.jar b/libs/scprov-jdk15on-1.47.0.3.jar
new file mode 100644
index 0000000..1434f3a
Binary files /dev/null and b/libs/scprov-jdk15on-1.47.0.3.jar differ
diff --git a/proguard-project.txt b/proguard-project.txt
new file mode 100644
index 0000000..f2fe155
--- /dev/null
+++ b/proguard-project.txt
@@ -0,0 +1,20 @@
+# To enable ProGuard in your project, edit project.properties
+# to define the proguard.config property as described in that file.
+#
+# Add project specific ProGuard rules here.
+# By default, the flags in this file are appended to flags specified
+# in ${sdk.dir}/tools/proguard/proguard-android.txt
+# You can edit the include path and order by changing the ProGuard
+# include property in project.properties.
+#
+# For more details, see
+# http://developer.android.com/guide/developing/tools/proguard.html
+
+# Add any project specific keep options here:
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+# public *;
+#}
diff --git a/project.properties b/project.properties
new file mode 100644
index 0000000..ce39f2d
--- /dev/null
+++ b/project.properties
@@ -0,0 +1,14 @@
+# This file is automatically generated by Android Tools.
+# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
+#
+# This file must be checked in Version Control Systems.
+#
+# To customize properties used by the Ant build system edit
+# "ant.properties", and override values to adapt the script to your
+# project structure.
+#
+# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
+#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
+
+# Project target.
+target=android-18
diff --git a/res/drawable-hdpi/connector_launcher.png b/res/drawable-hdpi/connector_launcher.png
new file mode 100644
index 0000000..4a054a1
Binary files /dev/null and b/res/drawable-hdpi/connector_launcher.png differ
diff --git a/res/drawable-mdpi/connector_launcher.png b/res/drawable-mdpi/connector_launcher.png
new file mode 100644
index 0000000..d0c9b73
Binary files /dev/null and b/res/drawable-mdpi/connector_launcher.png differ
diff --git a/res/drawable-xhdpi/connector_launcher.png b/res/drawable-xhdpi/connector_launcher.png
new file mode 100644
index 0000000..36dceb9
Binary files /dev/null and b/res/drawable-xhdpi/connector_launcher.png differ
diff --git a/res/drawable-xxhdpi/connector_launcher.png b/res/drawable-xxhdpi/connector_launcher.png
new file mode 100644
index 0000000..7af2fed
Binary files /dev/null and b/res/drawable-xxhdpi/connector_launcher.png differ
diff --git a/res/layout/about.xml b/res/layout/about.xml
new file mode 100644
index 0000000..265d73d
--- /dev/null
+++ b/res/layout/about.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/res/layout/add_host_dialog.xml b/res/layout/add_host_dialog.xml
new file mode 100644
index 0000000..b479e82
--- /dev/null
+++ b/res/layout/add_host_dialog.xml
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/res/layout/app_list_row.xml b/res/layout/app_list_row.xml
new file mode 100644
index 0000000..be3ff24
--- /dev/null
+++ b/res/layout/app_list_row.xml
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/res/layout/changelog.xml b/res/layout/changelog.xml
new file mode 100644
index 0000000..f81538c
--- /dev/null
+++ b/res/layout/changelog.xml
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/res/layout/desktop_hosts.xml b/res/layout/desktop_hosts.xml
new file mode 100644
index 0000000..017c119
--- /dev/null
+++ b/res/layout/desktop_hosts.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/res/layout/edit_host_dialog.xml b/res/layout/edit_host_dialog.xml
new file mode 100644
index 0000000..05fb02a
--- /dev/null
+++ b/res/layout/edit_host_dialog.xml
@@ -0,0 +1,49 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/res/layout/host_list_row.xml b/res/layout/host_list_row.xml
new file mode 100644
index 0000000..c166a1d
--- /dev/null
+++ b/res/layout/host_list_row.xml
@@ -0,0 +1,103 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/res/layout/network_conf_layout.xml b/res/layout/network_conf_layout.xml
new file mode 100644
index 0000000..79f7fbc
--- /dev/null
+++ b/res/layout/network_conf_layout.xml
@@ -0,0 +1,83 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/res/layout/notification_whitelist.xml b/res/layout/notification_whitelist.xml
new file mode 100644
index 0000000..fdd6623
--- /dev/null
+++ b/res/layout/notification_whitelist.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/res/layout/share_desktop_hosts.xml b/res/layout/share_desktop_hosts.xml
new file mode 100644
index 0000000..c135fa3
--- /dev/null
+++ b/res/layout/share_desktop_hosts.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
diff --git a/res/layout/verify_fingerprint_dialog.xml b/res/layout/verify_fingerprint_dialog.xml
new file mode 100644
index 0000000..d209165
--- /dev/null
+++ b/res/layout/verify_fingerprint_dialog.xml
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/res/menu/main.xml b/res/menu/main.xml
new file mode 100644
index 0000000..c002028
--- /dev/null
+++ b/res/menu/main.xml
@@ -0,0 +1,9 @@
+
diff --git a/res/raw/defaultkeystore.bks b/res/raw/defaultkeystore.bks
new file mode 100644
index 0000000..b2045e7
Binary files /dev/null and b/res/raw/defaultkeystore.bks differ
diff --git a/res/raw/defaultnotificationwl b/res/raw/defaultnotificationwl
new file mode 100644
index 0000000..8df41fb
--- /dev/null
+++ b/res/raw/defaultnotificationwl
@@ -0,0 +1 @@
+com.android.calendar, com.android.email, com.google.android.email, com.facebook.katana, com.google.android.talk, com.google.android.apps.plus, com.google.android.keep, com.google.android.gm, com.google.android.calendar, com.google.android.youtube, com.whatsapp
diff --git a/res/values-sw600dp/dimens.xml b/res/values-sw600dp/dimens.xml
new file mode 100644
index 0000000..44f01db
--- /dev/null
+++ b/res/values-sw600dp/dimens.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
diff --git a/res/values-sw720dp-land/dimens.xml b/res/values-sw720dp-land/dimens.xml
new file mode 100644
index 0000000..61e3fa8
--- /dev/null
+++ b/res/values-sw720dp-land/dimens.xml
@@ -0,0 +1,9 @@
+
+
+
+ 128dp
+
+
diff --git a/res/values-v11/styles.xml b/res/values-v11/styles.xml
new file mode 100644
index 0000000..4460dcf
--- /dev/null
+++ b/res/values-v11/styles.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
diff --git a/res/values-v14/styles.xml b/res/values-v14/styles.xml
new file mode 100644
index 0000000..3e61a52
--- /dev/null
+++ b/res/values-v14/styles.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
diff --git a/res/values-v18/bools.xml b/res/values-v18/bools.xml
new file mode 100644
index 0000000..8575723
--- /dev/null
+++ b/res/values-v18/bools.xml
@@ -0,0 +1,5 @@
+
+
+ true
+ false
+
diff --git a/res/values/bools.xml b/res/values/bools.xml
new file mode 100644
index 0000000..1184626
--- /dev/null
+++ b/res/values/bools.xml
@@ -0,0 +1,5 @@
+
+
+ false
+ true
+
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
new file mode 100644
index 0000000..55c1e59
--- /dev/null
+++ b/res/values/dimens.xml
@@ -0,0 +1,7 @@
+
+
+
+ 16dp
+ 16dp
+
+
diff --git a/res/values/strings.xml b/res/values/strings.xml
new file mode 100644
index 0000000..6f2f212
--- /dev/null
+++ b/res/values/strings.xml
@@ -0,0 +1,7 @@
+
+
+
+ DeskCon
+ Settings
+
+
diff --git a/res/values/styles.xml b/res/values/styles.xml
new file mode 100644
index 0000000..c1fa616
--- /dev/null
+++ b/res/values/styles.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
diff --git a/res/xml/preferences.xml b/res/xml/preferences.xml
new file mode 100644
index 0000000..6f00000
--- /dev/null
+++ b/res/xml/preferences.xml
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/net/screenfreeze/deskcon/AuthenticationManager.java b/src/net/screenfreeze/deskcon/AuthenticationManager.java
new file mode 100644
index 0000000..f23eba7
--- /dev/null
+++ b/src/net/screenfreeze/deskcon/AuthenticationManager.java
@@ -0,0 +1,341 @@
+package net.screenfreeze.deskcon;
+
+import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.net.InetAddress;
+import java.net.NetworkInterface;
+import java.net.Socket;
+import java.security.KeyStore;
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
+import java.security.cert.CertificateFactory;
+import java.security.cert.X509Certificate;
+import java.util.Locale;
+
+import net.screenfreeze.deskcon.DesktopHostsActivity.OnPairListener;
+import android.annotation.SuppressLint;
+import android.app.Activity;
+import android.app.AlertDialog;
+import android.app.ProgressDialog;
+import android.content.Context;
+import android.content.DialogInterface;
+import android.os.AsyncTask;
+import android.os.Build;
+import android.util.Base64;
+import android.util.Log;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.widget.TextView;
+import android.widget.Toast;
+
+@SuppressLint("ShowToast")
+public class AuthenticationManager {
+ private Context context;
+ private DesktopHostsDBHelper dbhelper;
+ private static Toast ConnectionError;
+
+ public AuthenticationManager(Context context) {
+ this.context = context;
+ dbhelper = new DesktopHostsDBHelper(context);
+
+ ConnectionError = Toast.makeText(this.context, "could not connect",
+ Toast.LENGTH_SHORT);
+ }
+
+ @SuppressLint("NewApi")
+ public void pairWithHost(String ip, int port, String ssid, OnPairListener onpairlistener) {
+ Log.d("Pairing: ", "start");
+ // set UI Callback
+ ParingTask pairingTask = new ParingTask();
+ pairingTask.setOnPairListener(onpairlistener);
+
+ // start pairing
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
+ pairingTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, ip, port, ssid);
+ } else {
+ pairingTask.execute(ip, port, ssid);
+ }
+ }
+
+ private AlertDialog buildValidateFingerprintDialog(String myfp, String serverfp, final ParingTask pairingtask) {
+ LayoutInflater li = ((Activity) context).getLayoutInflater();
+ View verifyFpView = li.inflate(R.layout.verify_fingerprint_dialog, null);
+
+
+ AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(context);
+ alertDialogBuilder.setView(verifyFpView);
+
+ alertDialogBuilder.setTitle("Pairing");
+ final TextView serverfptextview = (TextView) verifyFpView.findViewById(R.id.serverfptextView);
+ final TextView myfptextview = (TextView) verifyFpView.findViewById(R.id.myfptextView);
+
+ serverfptextview.setText(serverfp);
+ myfptextview.setText(myfp);
+
+ alertDialogBuilder.setPositiveButton("yes", new DialogInterface.OnClickListener(){
+
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+ pairingtask.setFingerprintsValid(true);
+ dialog.cancel();
+ }});
+ alertDialogBuilder.setNegativeButton("no", new DialogInterface.OnClickListener(){
+
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+ pairingtask.setFingerprintsValid(false);
+ dialog.cancel();
+ }});
+
+ AlertDialog alertDialog = alertDialogBuilder.create();
+
+ return alertDialog;
+ }
+
+ private AlertDialog buildPairingFailedDialog() {
+ AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(context);
+ alertDialogBuilder.setTitle("Pairing");
+ alertDialogBuilder.setMessage("The pairing Process failed!");
+ alertDialogBuilder.setCancelable(true);
+
+ AlertDialog alertDialog = alertDialogBuilder.create();
+
+ return alertDialog;
+ }
+
+
+ private class ParingTask extends AsyncTask