Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add background service and API for URL monitoring system #166

Merged
merged 5 commits into from
Nov 19, 2024

Conversation

DevT75
Copy link
Contributor

@DevT75 DevT75 commented Nov 18, 2024

Background Service Implementation for URL Monitoring

Overview

This PR implements a background service system for monitoring URLs with periodic checks. The implementation includes native C++ APIs and Android service components for reliable background execution.

Key Changes

1. Background Service Implementation

  • Added WootzAppBackgroundService.java for handling background URL monitoring
  • Implemented periodic URL fetching with configurable intervals (currently set to 1 minute)
  • Added proper error handling and logging for background operations

2. API Extensions

Added new API endpoints in the wootz namespace:

  • setJob: Start monitoring a URL
  • removeJob: Stop monitoring a URL
  • getJobs: Retrieve monitoring results
  • listJobs: List all monitored URLs
  • cleanJobs: Clear all jobs and results

3. Storage and Persistence

  • Implemented shared preferences-based storage for jobs and results
  • Proper cleanup mechanisms for managing stored data

4. Android Manifest Updates

  • Added required permissions:
    • FOREGROUND_SERVICE
    • POST_NOTIFICATIONS
  • Registered new background service component

5. Extension WebView Optimization & UI Improvements

  • Replaced multiple WebView instances with a single reusable WebView container
  • Removed unnecessary padding from WebView container for better space utilization
  • Optimized margins and padding for better visual appearance

Documentation

The new APIs are documented in wootz.json with proper type definitions and descriptions.

@pandey019 pandey019 merged commit d1bac3b into wootzapp:chromium Nov 19, 2024
1 check passed
@github-actions github-actions bot locked and limited conversation to collaborators Nov 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants