Snipe your opponent's deck at the start of the game - on mobile!
A React Native mobile application for Android and iOS that automatically detects when you enter a new Clash Royale battle, identifies your opponent's username, and displays their last used deck from RoyaleAPI.
- 📱 Mobile Native App - Works directly on Android and iOS devices
- 🎯 Automatic Battle Detection - Detects when you enter a new Clash Royale match via screenshots
- 🔍 Username Recognition - Uses OCR to extract opponent usernames from screenshots
- ⚡ Real-time Deck Lookup - Fetches opponent's last used deck from RoyaleAPI
- 📊 Android Overlay - Floating window displays opponent's deck over the game
- 🎨 Modern Dark UI - Clean, gaming-friendly interface
- 🔧 Manual Lookup - Search any player's deck by username
- 📝 Activity Log - Track all detections and lookups
- ⚙️ Configurable Settings - Adjust detection and preferences
- Android: 7.0 (API 24) or higher
- Permissions: Overlay, Camera, Storage
- RAM: 2GB minimum
- Clash Royale: Installed and playable
- iOS: 13.0 or higher
- Permissions: Camera, Photo Library
- RAM: 2GB minimum
- Clash Royale: Installed and playable
- Node.js: 18 or higher
- npm: 8 or higher
- React Native CLI: Latest version
- Android Studio (for Android development)
- Xcode (for iOS development, macOS only)
git clone https://github.com/yourusername/sniperoyale.git
cd sniperoyalenpm installcd ios && pod install && cd ..Android:
- Tesseract training data is automatically included via
react-native-tesseract-ocr
iOS:
- Run
pod installto get Tesseract dependencies
Android:
npm run androidiOS:
npm run ios- Launch the app on your device
- Grant permissions when prompted:
- Android: Overlay, Camera, Storage
- iOS: Camera, Photo Library
- The app will guide you through the setup
- Open the Deck Tracker app
- Tap "Start Tracking"
- A floating overlay appears on your screen
- Take a screenshot when you enter a Clash Royale battle (Power + Volume Down)
- The app detects the screenshot automatically
- Opponent's deck appears in the overlay!
- Open the Deck Tracker app
- Tap "Start Tracking"
- Take a screenshot when you enter a Clash Royale battle (Side Button + Volume Up)
- Return to the Deck Tracker app
- The deck will be displayed in the app
- Open the app
- Navigate to Manual Lookup section
- Enter the opponent's username
- (Optional) Enter their clan name for better filtering
- Tap "Search"
- View their deck!
sniperoyale/
├── android/ # Android native code
│ ├── app/
│ │ ├── src/main/java/.../
│ │ │ ├── OverlayModule.java # Overlay functionality
│ │ │ └── OverlayPackage.java
│ │ └── AndroidManifest.xml # Permissions
│ └── build.gradle
├── ios/ # iOS native code
│ └── ClashRoyaleDeckTracker/
│ └── Info.plist # Permissions
├── src/
│ ├── components/ # React components
│ │ ├── DeckDisplay.tsx
│ │ ├── StatusIndicator.tsx
│ │ ├── ManualLookup.tsx
│ │ └── ActivityLog.tsx
│ └── services/ # Core services
│ ├── PermissionsService.ts # Permission handling
│ ├── OverlayService.ts # Android overlay
│ ├── ScreenshotService.ts # Screenshot detection
│ ├── OCRService.ts # Text recognition
│ ├── DeckService.ts # API calls
│ └── TrackingService.ts # Main orchestrator
├── App.tsx # Main app component
├── index.js # Entry point
├── package.json # Dependencies
└── README.md # This file
- User starts tracking → Overlay window appears
- User takes screenshot of battle start screen
ScreenshotServicedetects new screenshot via MediaStoreOCRServiceextracts opponent username using TesseractDeckServicequeries RoyaleAPI for the player's deck- Deck cards are displayed in floating overlay
- User starts tracking
- User takes screenshot and returns to app
OCRServiceprocesses the latest screenshot- Username is extracted and deck is fetched
- Deck is displayed in the app
Overlay Not Showing:
- Go to Settings → Apps → CR Deck Tracker → Display over other apps
- Enable the permission
- Restart the app
Screenshots Not Detected:
- Check storage permission is granted
- Try taking screenshot again
- Ensure screenshot is in
/Pictures/Screenshots/directory
OCR Not Working:
- Check camera permission is granted
- Ensure screenshot is clear and readable
- Battle start screen must be fully visible
Permissions Denied:
- Go to Settings → Privacy → Photos → CR Deck Tracker → Enable
- Go to Settings → Privacy → Camera → CR Deck Tracker → Enable
- Restart the app
No Deck Found:
- Ensure you took screenshot at battle start (when opponent name is visible)
- Return to the app after taking screenshot
- Username must be clearly visible in screenshot
No Deck Found:
- Verify the username is spelled correctly
- Some players may have privacy settings enabled
- Try manual lookup with clan name
API Errors:
- Check internet connection
- RoyaleAPI might be rate-limiting requests
- Wait a few seconds and try again
- Minimum SDK: 24 (Android 7.0)
- Target SDK: 33 (Android 13)
- Overlay Feature: Uses
SYSTEM_ALERT_WINDOWpermission - Best Experience: Android 10+ for seamless screenshot detection
- Minimum Version: iOS 13.0
- Limitation: Cannot draw overlay over other apps (iOS restriction)
- Workaround: User must return to app to see detected deck
- Best Experience: Use split-screen if available (iPad)
- Overlay: Display floating window over Clash Royale
- Storage: Detect and read screenshots
- Camera: OCR processing
- Internet: Fetch deck data from RoyaleAPI
- Camera: Screenshot processing and OCR
- Photo Library: Access screenshots
- Internet: Fetch deck data from RoyaleAPI
Edit src/services/OCRService.ts:
private static USERNAME_REGIONS: UsernameRegion[] = [
{ name: 'opponent_top', x: 0.25, y: 0.02, width: 0.5, height: 0.08 },
// Add custom regions based on your device screen
];In the app settings, adjust how often to check for new screenshots (default: 2 seconds).
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
This tool is for educational purposes only. Use at your own risk. The developers are not responsible for any consequences of using this application. Make sure to comply with Clash Royale's Terms of Service.
Note: This app does NOT modify Clash Royale or provide any unfair advantages. It only analyzes publicly available information.
- RoyaleAPI for providing player data
- React Native for the mobile framework
- Tesseract OCR for text recognition
- The React Native community for amazing libraries
- All contributors and users of this project
If you encounter any issues or have questions:
- Check the Troubleshooting section
- Review Platform-Specific Notes
- Open an issue on GitHub with:
- Device model and OS version
- Steps to reproduce
- Screenshots if applicable
- Add deck statistics and win rates
- Support for more card information
- Historical deck tracking
- Cloud sync across devices
- Widget support
- Dark/Light theme toggle
- Multiple language support
Happy Sniping! 🎯📱