From d543ac756d6c9f6c4582a626aa50847a3bc2e148 Mon Sep 17 00:00:00 2001 From: Toby Date: Thu, 25 Jan 2018 22:48:45 -0500 Subject: [PATCH 1/4] Added SUBMISSION.MD --- SUBMISSION.MD | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 SUBMISSION.MD diff --git a/SUBMISSION.MD b/SUBMISSION.MD new file mode 100644 index 0000000..81aaa3a --- /dev/null +++ b/SUBMISSION.MD @@ -0,0 +1,17 @@ +**Email Address**: tobiaswoerthle@gmail.com, [Daniel's email], [Wlad's email] + +**Full Name**: Tobias Woerthle, Daniel Pollithy, Wlad Meixner + +**Name of Project**: Wifiota + +**Description of your project**: Buy and sell data from your android device with WiFi direct paired peers through a generated hotspot. Transactions occur via the iota tangle and flash channels. + +**Link to demo of project**: https://tobywoerthle.github.io/flashWiFiSite/ + +**Type of Project**: Peer to Peer Payments + +**Any further comments**: +GitHub - https://github.com/DanielPollithy/flashwifi + +**Submisison Form**: +https://docs.google.com/forms/d/e/1FAIpQLSe28W7jk-y4iEd8kN0mznk7oEs6ZtxQNL49R6tpc4bGN04UBA/viewform From 348e59f06dd45ec0add73ec2e580de7020eaa036 Mon Sep 17 00:00:00 2001 From: Toby Woerthle Date: Thu, 25 Jan 2018 23:05:57 -0500 Subject: [PATCH 2/4] getNextAddress() and getNextKeyIndex() -Added next address and key index functions to WalletAddressChecker -Note that WalletAddressChecker is not extend AsyncTask, you'll need to call it from an asyc class if needed to be run in background. Example usage: WalletAdressChecker addressChecker = new WalletAddressChecker(getActivity, getActivity().getString(R.string.preference_file_key)); addressChecker.getAddress(seed); int nextKey = addressChecker.getNextKeyIndex(); String nextAddress = addressChecker.getNextAddress(); --- .../Requests/WalletAddressChecker.java | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/flashwifi/wifip2p/iotaAPI/Requests/WalletAddressChecker.java b/app/src/main/java/com/flashwifi/wifip2p/iotaAPI/Requests/WalletAddressChecker.java index 617d633..63337c2 100644 --- a/app/src/main/java/com/flashwifi/wifip2p/iotaAPI/Requests/WalletAddressChecker.java +++ b/app/src/main/java/com/flashwifi/wifip2p/iotaAPI/Requests/WalletAddressChecker.java @@ -21,8 +21,11 @@ public class WalletAddressChecker { private Context context; private String prefFile; - boolean containsPendingTransaction = false; - boolean keyIndexChanged = false; + private boolean containsPendingTransaction = false; + private boolean keyIndexChanged = false; + private int keyIndex; + private String nextAddress; + public WalletAddressChecker(Context inContext, String inPrefFile){ @@ -62,11 +65,13 @@ public class WalletAddressChecker { } } + + public List getAddress(String seed) { Boolean foundAddress = false; List addressList = new ArrayList<>(); - int keyIndex = getKeyIndex(); + keyIndex = getKeyIndex(); ArrayList hashStringList = new ArrayList<>(); while(foundAddress == false){ @@ -102,6 +107,7 @@ public class WalletAddressChecker { if(transactionsForAddress == null || transactionsForAddress.isEmpty() || (transactionsForAddress.size() == 0)){ //Transactions not found, use this address + nextAddress = addressResponse.getAddresses().get(0); foundAddress = true; } else{ @@ -151,6 +157,14 @@ public class WalletAddressChecker { return addressList; } + public int getNextKeyIndex(){ + return keyIndex; + } + + public String getNextAddress(){ + return nextAddress; + } + private int getKeyIndex() { SharedPreferences sharedPref = context.getSharedPreferences(prefFile, Context.MODE_PRIVATE); int keyIndex = sharedPref.getInt("keyIndex",0); From 24c73ee17f11fb64dca1f6b53538a06e4e7bfc6b Mon Sep 17 00:00:00 2001 From: Daniel Date: Fri, 26 Jan 2018 05:39:52 +0100 Subject: [PATCH 3/4] Update SUBMISSION.MD --- SUBMISSION.MD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SUBMISSION.MD b/SUBMISSION.MD index 81aaa3a..89d8963 100644 --- a/SUBMISSION.MD +++ b/SUBMISSION.MD @@ -1,4 +1,4 @@ -**Email Address**: tobiaswoerthle@gmail.com, [Daniel's email], [Wlad's email] +**Email Address**: tobiaswoerthle@gmail.com, daniel@pollithy.com, [Wlad's email] **Full Name**: Tobias Woerthle, Daniel Pollithy, Wlad Meixner From 350dd862d10a302cc58fba903661ff38f17c5a0d Mon Sep 17 00:00:00 2001 From: Toby Date: Fri, 26 Jan 2018 00:54:21 -0500 Subject: [PATCH 4/4] IOTA capitalization --- SUBMISSION.MD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SUBMISSION.MD b/SUBMISSION.MD index 89d8963..aa6a9bd 100644 --- a/SUBMISSION.MD +++ b/SUBMISSION.MD @@ -4,7 +4,7 @@ **Name of Project**: Wifiota -**Description of your project**: Buy and sell data from your android device with WiFi direct paired peers through a generated hotspot. Transactions occur via the iota tangle and flash channels. +**Description of your project**: Buy and sell data from your android device with WiFi direct paired peers through a generated hotspot. Transactions occur via the IOTA tangle and Flash Channels. **Link to demo of project**: https://tobywoerthle.github.io/flashWiFiSite/