mirror of
https://github.com/DanielPollithy/flashwifi.git
synced 2025-10-16 11:45:32 +00:00
License & Agreement + Pending funds notice
-Added user agreement and licenses dialogs -Added pendings funds notice -Removed units and network timeout from settings for now
This commit is contained in:
parent
3b0da47ee1
commit
37c2d9330c
@ -46,7 +46,7 @@ public class SettingsFragment extends PreferenceFragment implements SharedPrefer
|
||||
addPreferencesFromResource(R.xml.preferences);
|
||||
|
||||
// Set version text
|
||||
Preference version = findPreference("pref_key_reset_version");
|
||||
Preference version = findPreference("pref_key_app_version");
|
||||
String curTitle = version.getTitle().toString();
|
||||
version.setTitle("Version: "+curTitle);
|
||||
|
||||
@ -165,16 +165,49 @@ public class SettingsFragment extends PreferenceFragment implements SharedPrefer
|
||||
}
|
||||
break;
|
||||
case "pref_key_reset_password":
|
||||
makeToastSettingsFragment( "Reset Password");
|
||||
askPassword();
|
||||
break;
|
||||
case "pref_key_reset_wallet":
|
||||
makeToastSettingsFragment("Reset Wallet.");
|
||||
makeToastSettingsFragment("To reset wallet please uninstall and re-install app.");
|
||||
break;
|
||||
case "pref_key_license":
|
||||
showLicense();
|
||||
break;
|
||||
case "pref_key_agreement":
|
||||
showAgreement();
|
||||
break;
|
||||
}
|
||||
return super.onPreferenceTreeClick(preferenceScreen, preference);
|
||||
}
|
||||
|
||||
private void showLicense() {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
|
||||
builder.setTitle("License");
|
||||
builder.setView(R.layout.license_dialog);
|
||||
builder.setNegativeButton("Close", new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialogInterface, int i) {
|
||||
// dismiss dialog
|
||||
dialogInterface.dismiss();
|
||||
}
|
||||
});
|
||||
builder.show();
|
||||
}
|
||||
|
||||
private void showAgreement() {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
|
||||
builder.setTitle("Agreement");
|
||||
builder.setView(R.layout.agreement_dialog);
|
||||
builder.setNegativeButton("Close", new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialogInterface, int i) {
|
||||
// dismiss dialog
|
||||
dialogInterface.dismiss();
|
||||
}
|
||||
});
|
||||
builder.show();
|
||||
}
|
||||
|
||||
private void askPassword() {
|
||||
Context context = getActivity();
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(context);
|
||||
|
||||
@ -166,7 +166,15 @@ public class WalletBalanceChecker extends AsyncTask<Void, Void, Void> {
|
||||
}
|
||||
String currentDateTimeString = DateFormat.getDateTimeInstance().format(new Date());
|
||||
putSharedPrefBalanceDateUpdate(currentDateTimeString);
|
||||
return updatedBalanceString+"i";
|
||||
|
||||
if(containsPendingTransactions){
|
||||
updatedBalanceString = updatedBalanceString+"i (+ pending transactions)";
|
||||
}
|
||||
else{
|
||||
updatedBalanceString = updatedBalanceString+"i" ;
|
||||
}
|
||||
|
||||
return updatedBalanceString;
|
||||
}
|
||||
|
||||
private void putSharedPrefBalanceDateUpdate(String currentDateTimeString) {
|
||||
|
||||
20
app/src/main/res/layout/agreement_dialog.xml
Normal file
20
app/src/main/res/layout/agreement_dialog.xml
Normal file
@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="16dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/about_app"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/userAgreement"/>
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
20
app/src/main/res/layout/license_dialog.xml
Normal file
20
app/src/main/res/layout/license_dialog.xml
Normal file
@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="16dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/about_app"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/license"/>
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
18
app/src/main/res/values/licenseApache.xml
Normal file
18
app/src/main/res/values/licenseApache.xml
Normal file
@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="license" formatted="true">
|
||||
Copyright 2018 Wifiota - Tobias Woerthle, Daniel Pollithy, Wlad Meixner.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
</string>
|
||||
</resources>
|
||||
@ -72,6 +72,7 @@
|
||||
<string name="stopAP">Stop Hotspot</string>
|
||||
<string name="startAPText">Start Hotspot</string>
|
||||
|
||||
<!-- Settings Fragment -->
|
||||
|
||||
<!-- Welcome Slideshow -->
|
||||
<!-- Page 1 -->
|
||||
|
||||
48
app/src/main/res/values/userAgreement.xml
Normal file
48
app/src/main/res/values/userAgreement.xml
Normal file
@ -0,0 +1,48 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<string name="userAgreement" formatted="true">
|
||||
WiFiota
|
||||
Terms and Conditions ("Terms")
|
||||
|
||||
Last updated: January 25, 2018
|
||||
|
||||
Please read these Terms and Conditions ("Terms", "Terms and Conditions") carefully before using the WiFiota (the "Service") operated by WiFiota ("us", "we", or "our").
|
||||
|
||||
Your access to and use of the Service is conditioned on your acceptance of and compliance with these Terms. These Terms apply to all visitors, users and others who access or use the Service.
|
||||
|
||||
By accessing or using the Service you agree to be bound by these Terms. If you disagree with any part of the terms then you may not access the Service.
|
||||
|
||||
Funds and Wallet - WiFiota has no control over, and assumes no responsibility for any wallet actions including sending or receiving any amount of iota cryptocurrency/distributed ledger currency by any means. You are responsible for keeping your password secret and secure. You agree that you will not solicit, collect or use the login credentials of other WiFiota users. You may not use the Service for any illegal or unauthorized purpose. You agree to comply with all laws, rules and regulations (for example, federal, state, local and provincial) applicable to your use of the Service and your Content (defined below), including but not limited to, copyright laws.
|
||||
|
||||
Connection Activity - WiFiota has no control over, and assumes no responsibility for any activity and traffic that occurs over any type of connection. This includes any activity and traffic to iota nodes and other users. You must not interfere or disrupt the Service or servers or networks connected to the Service, including by transmitting any worms, viruses, spyware, malware or any other code of a destructive or disruptive nature. You may not inject content or code or otherwise alter or interfere with the way any WiFiota page or the app is rendered or displayed in a user\'s browser or device.
|
||||
|
||||
Links To Other Location -
|
||||
Our Service may contain links to third-party web sites or services that are not owned or controlled by WiFiota.
|
||||
|
||||
WiFiota has no control over, and assumes no responsibility for, the content, privacy policies, or practices of any third party web sites or services. You further acknowledge and agree that WiFiota shall not be responsible or liable, directly or indirectly, for any damage or loss caused or alleged to be caused by or in connection with use of or reliance on any such content, goods or services available on or through any such web sites or services.
|
||||
|
||||
We strongly advise you to read the terms and conditions and privacy policies of any third-party web sites or services that you visit.
|
||||
|
||||
Termination -
|
||||
We may terminate or suspend access to our Service immediately, without prior notice or liability, for any reason whatsoever, including without limitation if you breach the Terms.
|
||||
|
||||
All provisions of the Terms which by their nature should survive termination shall survive termination, including, without limitation, ownership provisions, warranty disclaimers, indemnity and limitations of liability.
|
||||
|
||||
Governing Law -
|
||||
These Terms shall be governed and construed in accordance with the laws of Bavaria, Germany and/or Ontario, Canada, without regard to its conflict of law provisions.
|
||||
|
||||
Our failure to enforce any right or provision of these Terms will not be considered a waiver of those rights. If any provision of these Terms is held to be invalid or unenforceable by a court, the remaining provisions of these Terms will remain in effect. These Terms constitute the entire agreement between us regarding our Service, and supersede and replace any prior agreements we might have between us regarding the Service.
|
||||
Changes
|
||||
|
||||
We reserve the right, at our sole discretion, to modify or replace these Terms at any time without notice. If a revision is material we will try to provide at least 30 days notice prior to any new terms taking effect. What constitutes a material change will be determined at our sole discretion.
|
||||
|
||||
By continuing to access or use our Service after those revisions become effective, you agree to be bound by the revised terms. If you do not agree to the new terms, please stop using the Service.
|
||||
|
||||
Contact Us - https://github.com/DanielPollithy/flashwifi + https://tobywoerthle.github.io/flashWiFiSite/
|
||||
|
||||
If you have any questions about these Terms, please contact us.
|
||||
Terms and Conditions of WiFiota
|
||||
</string>
|
||||
|
||||
</resources>
|
||||
@ -30,17 +30,21 @@
|
||||
android:entryValues="@array/securityPref"
|
||||
android:title="Security pk/address" />
|
||||
|
||||
<!--
|
||||
<ListPreference
|
||||
android:key="pref_key_network_timeout"
|
||||
android:entries="@array/networkTimeoutPref"
|
||||
android:entryValues="@array/networkTimeoutPref"
|
||||
android:title="Network timeout" />
|
||||
-->
|
||||
|
||||
<!--
|
||||
<ListPreference
|
||||
android:key="pref_key_units"
|
||||
android:entries="@array/unitsPref"
|
||||
android:entryValues="@array/unitsPref"
|
||||
android:title="Units" />
|
||||
-->
|
||||
|
||||
|
||||
<SwitchPreference
|
||||
@ -138,7 +142,7 @@
|
||||
<Preference
|
||||
android:divider="@null"
|
||||
android:dividerHeight="0dp"
|
||||
android:key="pref_key_reset_version"
|
||||
android:key="pref_key_app_version"
|
||||
android:title="@string/app_version"/>
|
||||
|
||||
<Preference
|
||||
|
||||
Loading…
Reference in New Issue
Block a user