From b982c30218d6d5ded408f896436555a316550b97 Mon Sep 17 00:00:00 2001 From: pyrossh Date: Mon, 21 Aug 2023 23:45:36 +0530 Subject: [PATCH] add privacy policy --- README.md | 8 +- assets/privacy-policy.md | 76 +++++++++++++++++++ ios/Podfile.lock | 6 ++ lib/main.dart | 3 + lib/providers/app_model.dart | 9 +++ lib/screens/privacy_policy_screen.dart | 34 +++++++++ lib/widgets/highlight_button.dart | 2 +- lib/widgets/settings_sheet.dart | 16 +++- macos/Flutter/GeneratedPluginRegistrant.swift | 2 + pubspec.lock | 50 +++++++++++- pubspec.yaml | 3 + 11 files changed, 198 insertions(+), 11 deletions(-) create mode 100644 assets/privacy-policy.md create mode 100644 lib/screens/privacy_policy_screen.dart diff --git a/README.md b/README.md index 3ffce715..14e9dc5d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Only Bible App -The only bible app you will ever need. No ads, No in-app purchases, No unwanted menus, No images, No Additional downloads, +The only bible app you will ever need. No ads, No in-app purchases, No distractions. Optimized for reading and highlighting. Just the bibles which are freely available in the public domain. Verse by verse audio is also supported for some of the languages generated using Azure TTS. @@ -72,7 +72,5 @@ Note: ## Todo -1. Add Sqlite for highlighting, notes, chapter verses -2. Custom Selection should show action bar instead of tooltip/popup menu -3. Figure out history -4. Add more text options compact/loose, line spacing \ No newline at end of file +1. Figure out history +2. Add more text options compact/loose, line spacing \ No newline at end of file diff --git a/assets/privacy-policy.md b/assets/privacy-policy.md new file mode 100644 index 00000000..d7e7aa0f --- /dev/null +++ b/assets/privacy-policy.md @@ -0,0 +1,76 @@ +Peter John built the Only Bible App app as a Free app. This SERVICE is provided by Peter John at no cost and is intended +for use as is. + +This page is used to inform visitors regarding my policies with the collection, use, and disclosure of Personal +Information if anyone decided to use my Service. + +If you choose to use my Service, then you agree to the collection and use of information in relation to this policy. The +Personal Information that I collect is used for providing and improving the Service. I will not use or share your +information with anyone except as described in this Privacy Policy. + +The terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, which are accessible at +Only Bible App unless otherwise defined in this Privacy Policy. + +**Information Collection and Use** + +For a better experience, while using our Service, I may require you to provide us with certain personally identifiable +information. The information that I request will be retained on your device and is not collected by me in any way. + +The app does use third-party services that may collect information used to identify you. + +Link to the privacy policy of third-party service providers used by the app + +* [Google Play Services](https://www.google.com/policies/privacy/) +* [Firebase Crashlytics](https://firebase.google.com/support/privacy/) +* [Firebase Performance Monitoring](https://firebase.google.com/support/privacy/) + +**Log Data** + +I want to inform you that whenever you use my Service, in a case of an error in the app I collect data and information ( +through third-party products) on your phone called Log Data. This Log Data may include information such as your device +Internet Protocol (“IP”) address, device name, operating system version, the configuration of the app when utilizing my +Service, the time and date of your use of the Service, and other statistics. + +**Service Providers** + +I may employ third-party companies and individuals due to the following reasons: + +* To facilitate our Service; +* To provide the Service on our behalf; +* To perform Service-related services; or +* To assist us in analyzing how our Service is used. + +I want to inform users of this Service that these third parties have access to their Personal Information. The reason is +to perform the tasks assigned to them on our behalf. However, they are obligated not to disclose or use the information +for any other purpose. + +**Security** + +I value your trust in providing us your Personal Information, thus we are striving to use commercially acceptable means +of protecting it. But remember that no method of transmission over the internet, or method of electronic storage is 100% +secure and reliable, and I cannot guarantee its absolute security. + +**Links to Other Sites** + +This Service may contain links to other sites. If you click on a third-party link, you will be directed to that site. +Note that these external sites are not operated by me. Therefore, I strongly advise you to review the Privacy Policy of +these websites. I have no control over and assume no responsibility for the content, privacy policies, or practices of +any third-party sites or services. + +**Children’s Privacy** + +These Services do not address anyone under the age of 13. I do not knowingly collect personally identifiable information +from children under 13 years of age. In the case I discover that a child under 13 has provided me with personal +information, I immediately delete this from our servers. If you are a parent or guardian and you are aware that your +child has provided us with personal information, please contact me so that I will be able to do the necessary actions. + +**Changes to This Privacy Policy** + +I may update our Privacy Policy from time to time. Thus, you are advised to review this page periodically for any +changes. I will notify you of any changes by posting the new Privacy Policy on this page. + +This policy is effective as of 2023-08-21 + +**Contact Us** + +If you have any questions or suggestions about my Privacy Policy, do not hesitate to contact me at pyros2097@gmail.com. diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 101f5d0f..4713d3a0 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -120,6 +120,8 @@ PODS: - shared_preferences_foundation (0.0.1): - Flutter - FlutterMacOS + - url_launcher_ios (0.0.1): + - Flutter DEPENDENCIES: - audio_session (from `.symlinks/plugins/audio_session/ios`) @@ -134,6 +136,7 @@ DEPENDENCIES: - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`) - share_plus (from `.symlinks/plugins/share_plus/ios`) - shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`) + - url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`) SPEC REPOS: trunk: @@ -182,6 +185,8 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/share_plus/ios" shared_preferences_foundation: :path: ".symlinks/plugins/shared_preferences_foundation/darwin" + url_launcher_ios: + :path: ".symlinks/plugins/url_launcher_ios/ios" SPEC CHECKSUMS: audio_session: 4f3e461722055d21515cf3261b64c973c062f345 @@ -215,6 +220,7 @@ SPEC CHECKSUMS: PromisesSwift: 28dca69a9c40779916ac2d6985a0192a5cb4a265 share_plus: 599aa54e4ea31d4b4c0e9c911bcc26c55e791028 shared_preferences_foundation: 5b919d13b803cadd15ed2dc053125c68730e5126 + url_launcher_ios: 08a3dfac5fb39e8759aeb0abbd5d9480f30fc8b4 PODFILE CHECKSUM: 70d9d25280d0dd177a5f637cdb0f0b0b12c6a189 diff --git a/lib/main.dart b/lib/main.dart index 71d4a551..a163a2fd 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,5 +1,6 @@ import "package:flutter/material.dart"; import "package:flutter/foundation.dart"; +import 'package:flutter_web_plugins/url_strategy.dart'; import "package:firebase_core/firebase_core.dart"; import "package:firebase_crashlytics/firebase_crashlytics.dart"; import "package:only_bible_app/firebase_options.dart"; @@ -9,11 +10,13 @@ import "package:only_bible_app/providers/app_model.dart"; import "package:provider/provider.dart"; void main() async { + usePathUrlStrategy(); WidgetsBinding widgetsBinding = WidgetsFlutterBinding.ensureInitialized(); await Firebase.initializeApp( options: DefaultFirebaseOptions.currentPlatform, ); FlutterError.onError = (errorDetails) { + FlutterError.presentError(errorDetails); FirebaseCrashlytics.instance.recordFlutterError(errorDetails); }; PlatformDispatcher.instance.onError = (error, stack) { diff --git a/lib/providers/app_model.dart b/lib/providers/app_model.dart index 218de0dd..1062dbf8 100644 --- a/lib/providers/app_model.dart +++ b/lib/providers/app_model.dart @@ -4,6 +4,7 @@ import "package:flutter/material.dart"; import "package:only_bible_app/screens/bible_select_screen.dart"; import "package:only_bible_app/screens/book_select_screen.dart"; import "package:only_bible_app/models.dart"; +import "package:only_bible_app/screens/privacy_policy_screen.dart"; import "package:only_bible_app/widgets/actions_sheet.dart"; import "package:only_bible_app/widgets/highlight_button.dart"; import "package:only_bible_app/widgets/note_sheet.dart"; @@ -98,6 +99,14 @@ class AppModel extends ChangeNotifier { ); } + void showPrivacyPolicy(BuildContext context) { + Navigator.of(context).push( + createNoTransitionPageRoute( + const PrivacyPolicyScreen(), + ), + ); + } + updateCurrentBible(BuildContext context, int id) async { // TODO: maybe use a future as the bible needs to load bible = await loadBible(id); diff --git a/lib/screens/privacy_policy_screen.dart b/lib/screens/privacy_policy_screen.dart new file mode 100644 index 00000000..b956103c --- /dev/null +++ b/lib/screens/privacy_policy_screen.dart @@ -0,0 +1,34 @@ +import "package:flutter/material.dart"; +import "package:flutter_markdown/flutter_markdown.dart"; +import "package:url_launcher/url_launcher.dart"; + +class PrivacyPolicyScreen extends StatelessWidget { + const PrivacyPolicyScreen({super.key}); + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: const Text("Privacy Policy"), + ), + body: SafeArea( + child: FutureBuilder( + future: DefaultAssetBundle.of(context).loadString("assets/privacy-policy.md"), + builder: (context, snapshot) { + if (snapshot.hasData) { + return Markdown( + data: snapshot.data!, + onTapLink: (text, href, title) { + launchUrl(Uri.parse(href!)); + }, + ); + } + return const Center( + child: CircularProgressIndicator(), + ); + }, + ), + ), + ); + } +} diff --git a/lib/widgets/highlight_button.dart b/lib/widgets/highlight_button.dart index 6c33971b..4feb7e1f 100644 --- a/lib/widgets/highlight_button.dart +++ b/lib/widgets/highlight_button.dart @@ -11,7 +11,7 @@ class HighlightButton extends StatelessWidget { return InkWell( onTap: () => onColorSelected(color), child: Container( - padding: EdgeInsets.symmetric(horizontal: 10), + padding: const EdgeInsets.symmetric(horizontal: 10), decoration: BoxDecoration( color: color.withOpacity(1), shape: BoxShape.circle, diff --git a/lib/widgets/settings_sheet.dart b/lib/widgets/settings_sheet.dart index d3f37b88..cf1d58b2 100644 --- a/lib/widgets/settings_sheet.dart +++ b/lib/widgets/settings_sheet.dart @@ -44,10 +44,7 @@ class SettingsSheet extends StatelessWidget { leading: const Icon(Icons.book_outlined, color: Colors.blueAccent), title: const Text("Bible"), value: Text(selectedBible.name), - onPressed: (c) { - app.changeBible(c); - return null; - }, + onPressed: app.changeBible, ), SettingsTile.switchTile( onToggle: (value) { @@ -83,6 +80,17 @@ class SettingsSheet extends StatelessWidget { ), ], ), + SettingsSection( + margin: const EdgeInsetsDirectional.symmetric(horizontal: 20, vertical: 20), + title: const Text("About"), + tiles: [ + SettingsTile.navigation( + leading: const Icon(Icons.info_outline, color: Colors.grey), + title: const Text("Privacy Policy"), + onPressed: app.showPrivacyPolicy, + ), + ], + ), ], ), ), diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift index 819c8e2c..c89a418a 100644 --- a/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/macos/Flutter/GeneratedPluginRegistrant.swift @@ -13,6 +13,7 @@ import just_audio import path_provider_foundation import share_plus import shared_preferences_foundation +import url_launcher_macos func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { AudioSessionPlugin.register(with: registry.registrar(forPlugin: "AudioSessionPlugin")) @@ -23,4 +24,5 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) SharePlusMacosPlugin.register(with: registry.registrar(forPlugin: "SharePlusMacosPlugin")) SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) + UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin")) } diff --git a/pubspec.lock b/pubspec.lock index 912e48db..b9b00cb1 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -392,6 +392,14 @@ packages: description: flutter source: sdk version: "0.0.0" + flutter_markdown: + dependency: "direct main" + description: + name: flutter_markdown + sha256: "2b206d397dd7836ea60035b2d43825c8a303a76a5098e66f42d55a753e18d431" + url: "https://pub.dev" + source: hosted + version: "0.6.17+1" flutter_native_splash: dependency: "direct main" description: @@ -580,6 +588,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.2.0" + markdown: + dependency: transitive + description: + name: markdown + sha256: acf35edccc0463a9d7384e437c015a3535772e09714cf60e07eeef3a15870dcd + url: "https://pub.dev" + source: hosted + version: "7.1.1" matcher: dependency: transitive description: @@ -953,6 +969,30 @@ packages: url: "https://pub.dev" source: hosted version: "2.2.2" + url_launcher: + dependency: "direct main" + description: + name: url_launcher + sha256: "781bd58a1eb16069412365c98597726cd8810ae27435f04b3b4d3a470bacd61e" + url: "https://pub.dev" + source: hosted + version: "6.1.12" + url_launcher_android: + dependency: transitive + description: + name: url_launcher_android + sha256: "3dd2388cc0c42912eee04434531a26a82512b9cb1827e0214430c9bcbddfe025" + url: "https://pub.dev" + source: hosted + version: "6.0.38" + url_launcher_ios: + dependency: transitive + description: + name: url_launcher_ios + sha256: "9af7ea73259886b92199f9e42c116072f05ff9bea2dcb339ab935dfc957392c2" + url: "https://pub.dev" + source: hosted + version: "6.1.4" url_launcher_linux: dependency: transitive description: @@ -961,6 +1001,14 @@ packages: url: "https://pub.dev" source: hosted version: "3.0.5" + url_launcher_macos: + dependency: transitive + description: + name: url_launcher_macos + sha256: "1c4fdc0bfea61a70792ce97157e5cc17260f61abbe4f39354513f39ec6fd73b1" + url: "https://pub.dev" + source: hosted + version: "3.0.6" url_launcher_platform_interface: dependency: transitive description: @@ -1067,4 +1115,4 @@ packages: version: "3.1.2" sdks: dart: ">=3.0.6 <4.0.0" - flutter: ">=3.3.0" + flutter: ">=3.10.0" diff --git a/pubspec.yaml b/pubspec.yaml index 9e8f0d1c..b51966e1 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -26,6 +26,8 @@ dependencies: settings_ui: ^2.0.2 get_storage: ^2.1.1 share_plus: ^7.1.0 + flutter_markdown: ^0.6.17+1 + url_launcher: ^6.1.12 dev_dependencies: flutter_test: @@ -42,6 +44,7 @@ flutter: assets: - assets/bibles/ - assets/fonts/ + - assets/privacy-policy.md fonts: - family: Roboto fonts: