The BookmarkSync module provides cross-application bookmark and favorites synchronization, allowing users to maintain a unified collection of saved content across all ShareConnect applications.
BookmarkSync manages bookmarks, favorites, and saved content with rich metadata, categorization, and tagging capabilities across ShareConnect applications.
- Universal Bookmarks: Save any content type (videos, torrents, websites)
- Rich Metadata: Titles, descriptions, thumbnails, categories
- Tagging System: Flexible tag-based organization
- Access Tracking: View counts and last accessed timestamps
- Cross-App Sync: Unified bookmarks across all applications
- Favorite System: Mark important bookmarks
BookmarkSync/
├── BookmarkSyncManager.kt # Main synchronization manager
├── models/
│ ├── BookmarkData.kt # Bookmark data model
│ └── SyncableBookmark.kt # Asinka synchronization wrapper
├── repository/
│ └── BookmarkRepository.kt # Local database operations
└── database/
├── BookmarkDao.kt # Room DAO for bookmark operations
└── BookmarkDatabase.kt # Room database configuration
The BookmarkData model includes:
- Content Info: URL, title, description, thumbnail
- Organization: Categories, tags, favorites
- Tracking: Access counts, timestamps
- Metadata: Service provider, content type
// Initialize BookmarkSyncManager
val bookmarkManager = BookmarkSyncManager.getInstance(
context = applicationContext,
appIdentifier = "com.shareconnect",
appName = "ShareConnect",
appVersion = "1.0.0"
)
// Create bookmark
val bookmark = BookmarkData(
id = UUID.randomUUID().toString(),
url = "https://youtube.com/watch?v=...",
title = "Favorite Video",
type = "video",
category = "Entertainment",
tags = """["favorites", "music"]""",
isFavorite = true,
serviceProvider = "YouTube"
)
// Save and sync
bookmarkManager.saveBookmark(bookmark)CREATE TABLE synced_bookmarks (
id TEXT PRIMARY KEY,
url TEXT NOT NULL,
title TEXT,
description TEXT,
thumbnailUrl TEXT,
type TEXT NOT NULL,
category TEXT,
tags TEXT, -- JSON array
isFavorite INTEGER NOT NULL DEFAULT 0,
notes TEXT,
serviceProvider TEXT,
torrentHash TEXT,
magnetUri TEXT,
createdAt INTEGER NOT NULL,
lastAccessedAt INTEGER,
accessCount INTEGER NOT NULL DEFAULT 0,
sourceApp TEXT NOT NULL,
version INTEGER NOT NULL DEFAULT 1,
lastModified INTEGER NOT NULL
);| Method | Description |
|---|---|
getInstance() |
Get singleton instance |
saveBookmark() |
Save bookmark |
getAllBookmarks() |
Get all bookmarks |
getBookmarksByCategory() |
Filter by category |
getFavoriteBookmarks() |
Get favorites only |
searchBookmarks() |
Search bookmarks |
deleteBookmark() |
Remove bookmark |
| Metric | Value |
|---|---|
| Memory Usage | <40 KB |
| CPU Impact | <1% |
| Network Overhead | <2 KB/sync |
| Max Bookmarks | 5,000 |
| Search Performance | <100ms for 1000 bookmarks |
- 2.0.3: Enhanced tagging and search capabilities
- 2.0.2: Improved cross-app synchronization
- 2.0.1: Bug fixes and performance optimizations
- 2.0.0: Major refactoring with advanced bookmark features
Licensed under the MIT License. See project LICENSE file for details.