import os from weasyprint import HTML # Create the beautiful HTML structure for the Privacy Policy html_content = """ Privacy Policy - Deprem Takip
Mobile Application

Privacy Policy for Deprem Takip

Last Updated: May 2026

Deprem Takip ("the Application", "we", "our", or "us") is committed to protecting the privacy and security of its users. This Privacy Policy explains what information is collected, how it is used, stored, shared, and protected when you use the Deprem Takip mobile application. By using the Application, you agree to the collection and use of information in accordance with this Privacy Policy.

Information We Collect

We process different types of information depending on how you interact with the application. Below is a detailed breakdown of the data categories involved:

Account Information

When you create or use an account, we may collect your email address, unique user identifier, and authentication credentials securely handled through Firebase Authentication.

Location Information

The Application may request access to your device's location. This information is strictly utilized to calculate the distance between your current location and registered earthquake events, provide location-based earthquake alerts, and improve notification accuracy. Location access is fully optional and is strictly initiated after explicit user permission is granted.

Device & Technical Information

We may automatically collect technical diagnostics, including your specific device model, operating system version, system language settings, unique device identifiers, active application version, and standard mobile network information.

Notification Information

To provide responsive, real-time earthquake alerts and push notifications, we collect and store your Firebase Cloud Messaging (FCM) token alongside your customized notification preferences and user-configured alert thresholds.

Advertising & Analytics Information

If advertisements are displayed within the Application, Google AdMob may collect operational advertising identifiers, technical device data, and interaction metrics. This data is used solely to render relevant ads and evaluate monetization performance. Additionally, usage data such as features accessed, error logs, diagnostic data, and general performance statistics are monitored to maintain application stability.

How We Use Your Information

Collected information is strictly mapped to vital application activities, including:

Location Data Usage

Location data is used solely for earthquake-related services. Specifically, location information may be used to determine proximity to earthquake events, trigger location-based alerts, and display earthquake distance calculations.

The Application does not continuously track users in the background beyond what is explicitly required for the core notification functionality selected by the user. Users retain full autonomy and may disable location permissions at any time through their native device settings.

Third-Party Services

The Application securely interfaces with established industry-standard third-party services that process data independently according to their own strict privacy terms:

Firebase Authentication & Firestore

Utilized for secure user registration, tokenized login sessions, and structured storage of application-specific user configurations.

Firebase Cloud Messaging (FCM)

Responsible for routing instantaneous, time-critical earthquake warning notifications to user devices globally.

Google AdMob & Play Services

AdMob provides non-intrusive ad placements to fund maintenance, while Google Play Services powers core platform integration and Android background optimization.

Data Sharing & Retention

We do not sell user personal information. Information may only be shared in exceptional situations, such as when required by law, to protect immediate user safety, or to protect the baseline legal rights and infrastructure safety of the Application.

User information is retained only for as long as necessary to provide services, comply with legal obligations, resolve operational disputes, and enforce our core structural agreements. Retention metrics automatically vary depending on the technical classification of the logged data.

Account & Data Deletion

Users maintain complete data sovereignty and can request complete deletion of their account profile natively through the Application settings interface. Upon trigger, account records are scrubbed from our active servers, and associated application metadata is permanently deleted or securely anonymized. Minimal log snapshots may be securely archived if strictly demanded by active legal compliance frameworks.

Data Security & Children's Privacy

We implement strict technical and organizational safety measures designed to prevent unauthorized access, unexpected disclosure, data loss, or structural alteration. However, please note that no digital storage method or transmission over the internet can be guaranteed as 100% immune to sophisticated threats.

Furthermore, the Application is not intentionally designed for children under the age thresholds defined by regional laws. We do not knowingly harvest identifiable information from children. If unauthorized data collection is identified, immediate corrective measures are taken to remove the data from all production pipelines.

International Transfers & Policy Changes

Information may be dynamically processed and stored across distributed cloud infrastructure where our service providers operate. By interacting with the app, you acknowledge these compliant international transfers. We reserve the right to update this policy at any time, with modifications taking immediate effect upon publication. Continuous check-ins are recommended.

""" # Write HTML file with open("privacy_policy.html", "w", encoding="utf-8") as f: f.write(html_content) # Convert to PDF using WeasyPrint HTML("privacy_policy.html").write_pdf("deprem_takip_privacy_policy.pdf") print("PDF and HTML generated successfully.")