Files
MyActivityPub/docs/FEATURES.md
2026-01-24 18:29:54 +01:00

5.2 KiB

Features Documentation

My ActivityPub Application Features

This document describes the key features of the My ActivityPub application.

Core Features

1. Pull-to-Refresh Timeline

The application now supports pull-to-refresh functionality for both public and home timelines.

How to use:

  • Swipe down from the top of the timeline to refresh
  • A loading indicator will appear while fetching new posts
  • Timeline will be updated with the latest posts from your instance

Technical Details:

  • Implemented using PullToRefreshBox from Material 3
  • Refreshes without clearing the current timeline on error
  • Works for both Public Federated Timeline and Home Timeline

2. Automatic Timeline Updates

Timelines automatically check for new posts every 30 seconds and update seamlessly.

Behavior:

  • Checks for new posts using the since_id parameter
  • New posts are added to the top of the timeline
  • Updates happen silently in the background
  • No interruption to user scrolling or reading
  • Auto-refresh starts automatically when switching timelines

Technical Details:

  • Uses Kotlin Coroutines with a 30-second delay loop
  • Implemented in TimelineViewModel.startAutoRefresh()
  • Cancels previous auto-refresh job when switching timelines
  • Silently fails on network errors to avoid interrupting user experience

Post content now supports interactive links and hashtags.

Supported Elements:

  • HTTP/HTTPS URLs: Click to open in external browser
  • Hashtags: Styled with primary color and underline
  • HTML Content: Properly parsed and displayed

User Experience:

  • Links and hashtags are displayed in the primary theme color
  • Underlined for easy identification
  • Tap any link to open in default browser
  • Hashtags are visually distinct

Technical Details:

  • Uses AnnotatedString with ClickableText
  • Regex patterns to identify URLs and hashtags
  • HTML content is parsed using Android's Html.fromHtml()
  • Link annotations for click handling

Timeline Features

Public Federated Timeline

  • Shows posts from across the Fediverse
  • Default view when not logged in
  • Updates automatically every 30 seconds
  • Pull-to-refresh support

Home Timeline

  • Shows posts from accounts you follow
  • Requires authentication
  • Updates automatically every 30 seconds
  • Pull-to-refresh support

Infinite Scrolling

  • Load more posts by scrolling to bottom
  • "Load more" button appears when reaching end
  • Preserves scroll position when navigating

Post Interaction Features

Viewing Posts

  • Click any post to see detailed view
  • View all replies in thread
  • See post statistics (replies, boosts, favorites)

Interacting with Posts (Authenticated Users Only)

  • Reply: Add your own reply to any post
  • Boost: Repost to your timeline
  • Favorite: Like a post
  • Post visibility selection when replying

Post Details

  • Full post content with clickable links
  • User information and avatar
  • Media attachments display
  • Interaction buttons
  • Reply thread view

Authentication Features

OAuth Login Flow

  1. Enter your Mastodon/ActivityPub instance URL
  2. Register application with instance
  3. Authorize in browser
  4. Automatic token storage
  5. Persistent login across app restarts

Security

  • Tokens stored securely using DataStore
  • OAuth 2.0 standard implementation
  • HTTPS required for all API calls

Notifications

  • View all your notifications
  • Support for different notification types:
    • Mentions
    • Favorites
    • Boosts
    • Follows
    • Replies

User Interface

Modern Material Design 3

  • Dynamic color support (Android 12+)
  • Dark mode support
  • Edge-to-edge display
  • Smooth animations

Navigation

  • Bottom navigation for timeline switching
  • Top app bar with menu options
  • Back button support for detail views
  • Drawer for account management

Responsive Design

  • Optimized for different screen sizes
  • Proper padding and spacing
  • Touch-friendly button sizes

Technical Architecture

Layer Structure

  1. UI Layer: Composable functions
  2. ViewModel Layer: State management
  3. Repository Layer: Data operations
  4. API Layer: Network calls

Key Technologies

  • Kotlin
  • Jetpack Compose
  • Material 3
  • Retrofit for API calls
  • OkHttp for networking
  • Coil for image loading
  • DataStore for preferences
  • Kotlin Coroutines for async operations

Performance

Optimizations

  • Lazy loading of timeline
  • Image caching with Coil
  • Efficient state management
  • Background refresh doesn't block UI
  • Debounced auto-refresh

Network Efficiency

  • Pagination with max_id/since_id
  • Only fetches new posts on auto-refresh
  • Request timeouts to prevent hanging
  • Retry logic for failed requests

Future Enhancements

Potential features for future releases:

  • Direct messages
  • Search functionality
  • Filter/mute options
  • Multiple account support
  • Offline mode with local caching
  • Push notifications
  • Media upload
  • Custom emoji support
  • Poll creation
  • Scheduled posts

Getting Started

  1. Launch the app
  2. Browse public timeline without login
  3. Tap "Login" to connect your account
  4. Enter your instance URL
  5. Authorize in browser
  6. Start posting and interacting!

Support

For issues or feature requests, please check the repository's issue tracker.