Confetti Animation Integration for Mobile Apps

TRUETECH is engaged in the development, support and maintenance of iOS, Android, PWA mobile applications. We have extensive experience and expertise in publishing mobile applications in popular markets like Google Play, App Store, Amazon, AppGallery and others.

Development and support of all types of mobile applications:

Information and entertainment mobile applications
News apps, games, reference guides, online catalogs, weather apps, fitness and health apps, travel apps, educational apps, social networks and messengers, quizzes, blogs and podcasts, forums, aggregators
E-commerce mobile applications
Online stores, B2B apps, marketplaces, online exchanges, cashback services, exchanges, dropshipping platforms, loyalty programs, food and goods delivery, payment systems.
Business process management mobile applications
CRM systems, ERP systems, project management, sales team tools, financial management, production management, logistics and delivery management, HR management, data monitoring systems
Electronic services mobile applications
Classified ads platforms, online schools, online cinemas, electronic service platforms, cashback platforms, video hosting, thematic portals, online booking and scheduling platforms, online trading platforms

These are just some of the types of mobile applications we work with, and each of them may have its own specific features and functionality, tailored to the specific needs and goals of the client.

Showing 1 of 1All 1734 services
Confetti Animation Integration for Mobile Apps
Medium
from 4 hours to 2 days
Frequently Asked Questions

Our competencies:

Development stages

Latest works

  • image_mobile-applications_feedme_467_0.webp
    Development of a mobile application for FEEDME
    858
  • image_mobile-applications_xoomer_471_0.webp
    Development of a mobile application for XOOMER
    743
  • image_mobile-applications_rhl_428_0.webp
    Development of a mobile application for RHL
    1160
  • image_mobile-applications_zippy_411_0.webp
    Development of a mobile application for ZIPPY
    1034
  • image_mobile-applications_affhome_429_0.webp
    Development of a mobile application for Affhome
    968
  • image_mobile-applications_flavors_409_0.webp
    Development of a mobile application for the FLAVORS company
    562

How to Choose the Right Confetti Animation Technology?

We specialize in confetti animation for mobile apps, providing CAEmitterLayer confetti for iOS, confetti Android Canvas, and confetti Flutter solutions. Our particle effects optimization ensures smooth celebratory effects on iOS and other platforms. As a full custom celebration animation service, we cover confetti integration and mobile animation development. For a turnkey confetti implementation, contact us. Our engineers, with 5+ years of experience and over 50 successful particle effect integrations, guarantee smooth animation. Basic integration via a ready library costs $500–$1000, while custom implementation ranges from $2000 to $5000 depending on complexity. By choosing our service, clients typically save 30% in development time compared to in-house implementation.

What Is the Cost of Professional Confetti Integration?

Technical Challenges of Rendering Confetti

The primary issue is rendering many particles without FPS drops. On iOS, CAEmitterLayer handles this hardware-acceleratedly, but incorrect parameters (too high birthRate, complex shapes) can burden even flagship devices. On Android, custom Canvas.onDraw() is the bottleneck: each redraw is synchronous with the UI thread. For 200+ particles, SurfaceView or TextureView with a separate thread is required. In Flutter, CustomPainter runs on the Dart thread, but active physics can cause lag.

A second challenge is compliance with platform guidelines. Apple App Store Review Guidelines Section 4.2 require that animations do not interfere with the primary functionality. For Android, it's important not to block the back button. We account for these nuances during the design phase.

iOS: CAEmitterLayer — Native Approach

CAEmitterLayer is the right tool for particle effects on iOS. As per Apple documentation, it is the recommended method. Rendering via Metal on the render thread — the main thread is not involved.

func startConfetti(in view: UIView) {
    let emitter = CAEmitterLayer()
    emitter.emitterPosition = CGPoint(x: view.bounds.midX, y: -10)
    emitter.emitterShape = .line
    emitter.emitterSize = CGSize(width: view.bounds.width, height: 0)

    let colors: [UIColor] = [.systemRed, .systemBlue, .systemYellow, .systemGreen, .systemPurple]
    let shapes = ["square", "circle", "triangle"]

    emitter.emitterCells = colors.flatMap { color in
        shapes.map { _ in
            let cell = CAEmitterCell()
            cell.contents = UIImage(systemName: "circle.fill")?.withTintColor(color).cgImage
            cell.birthRate = 8
            cell.lifetime = 4.0
            cell.velocity = 200
            cell.velocityRange = 100
            cell.emissionLongitude = .pi
            cell.emissionRange = .pi / 4
            cell.spin = 3.5
            cell.spinRange = 1.0
            cell.scaleRange = 0.5
            cell.scale = 0.4
            cell.color = color.cgColor
            cell.alphaSpeed = -0.15
            return cell
        }
    }

    view.layer.addSublayer(emitter)

    DispatchQueue.main.asyncAfter(deadline: .now() + 2.0) {
        emitter.birthRate = 0
    }
    DispatchQueue.main.asyncAfter(deadline: .now() + 6.0) {
        emitter.removeFromSuperlayer()
    }
}

CAEmitterCell.birthRate — particles per second per cell. With 5 colors × 3 shapes × 8 particles/s = 120 particles/s total. For a lifetime of 4 seconds, up to 480 particles on screen simultaneously. On iPhone 12+ this is comfortable, FPS does not drop below 58 fps. On iPhone SE 2nd gen, it starts to heat up at 480 particles; we reduce birthRate to 4–5 for mid-range devices.

For custom confetti shapes (rectangles, stars), create a UIGraphicsImageRenderer, draw the shape, convert to CGImage for cell.contents.

Detailed CAEmitterCell Parameters - `birthRate`: particles per second (recommended 4-8 for confetti) - `lifetime`: particle lifetime (seconds) - `velocity`: initial velocity in pixels/s - `emissionLongitude`: emission angle in radians - `spin`: initial rotation in radians/s - `scale`: particle scale

Comparison: CAEmitterLayer vs SpriteKit vs Ready Libraries

Solution Performance Flexibility Complexity
CAEmitterLayer High (Metal) Medium (particles only) Low
SpriteKit Medium (CPU/GPU) High (physics, scenes) Medium
ConfettiSwiftUI High (wrapper over CAEmitter) Low (limited parameters) Very low

CAEmitterLayer is 2–3 times more performant than SpriteKit for simple particle effects.

Android: Canvas-based or Library

Custom ConfettiView via Canvas:

class ConfettiView(context: Context) : View(context) {
    private val particles = mutableListOf<ConfettiParticle>()
    private val paint = Paint(Paint.ANTI_ALIAS_FLAG)
    private var animator: ValueAnimator? = null

    data class ConfettiParticle(
        var x: Float, var y: Float,
        var vx: Float, var vy: Float,
        val color: Int,
        val size: Float,
        var rotation: Float,
        val rotationSpeed: Float,
        var alpha: Float = 1f
    )

    fun start() {
        repeat(80) {
            particles.add(ConfettiParticle(
                x = Random.nextFloat() * width,
                y = -Random.nextFloat() * 100,
                vx = Random.nextFloat() * 6 - 3,
                vy = Random.nextFloat() * 4 + 3,
                color = listOf(Color.RED, Color.BLUE, Color.YELLOW, Color.GREEN).random(),
                size = Random.nextFloat() * 12 + 6,
                rotation = Random.nextFloat() * 360,
                rotationSpeed = Random.nextFloat() * 6 - 3
            ))
        }

        animator = ValueAnimator.ofFloat(0f, 1f).apply {
            duration = 5000
            addUpdateListener {
                updateParticles()
                invalidate()
            }
            start()
        }
    }

    private fun updateParticles() {
        particles.forEach { p ->
            p.x += p.vx
            p.vy += 0.1f
            p.y += p.vy
            p.rotation += p.rotationSpeed
            if (p.y > height * 0.7f) p.alpha -= 0.02f
        }
        particles.removeAll { it.alpha <= 0 || it.y > height + 50 }
    }

    override fun onDraw(canvas: Canvas) {
        particles.forEach { p ->
            paint.color = p.color
            paint.alpha = (p.alpha * 255).toInt()
            canvas.save()
            canvas.translate(p.x, p.y)
            canvas.rotate(p.rotation)
            canvas.drawRect(-p.size/2, -p.size/2, p.size/2, p.size/2, paint)
            canvas.restore()
        }
    }
}

ValueAnimator + invalidate() redraws the Canvas every frame. At 80 particles, CPU load is less than 10% on Snapdragon 8xx. For 200+ particles with complex shapes, we switch to SurfaceView with a separate render thread.

Ready library: nl.dionsegijn:konfetti:2.0.4 — decent, supports custom shapes and KonfettiView. Custom Canvas is about 1.5 times faster than konfetti on mid-range devices due to less overhead.

Comparison: Custom Canvas vs konfetti

Solution Performance Flexibility Dependencies
Custom Canvas Medium (depends on particles) High None
konfetti High (optimized) Medium One library

Flutter

// Via CustomPainter
class ConfettiPainter extends CustomPainter {
  final List<ConfettiParticle> particles;
  ConfettiPainter(this.particles);

  @override
  void paint(Canvas canvas, Size size) {
    for (final p in particles) {
      final paint = Paint()..color = p.color.withOpacity(p.alpha);
      canvas.save();
      canvas.translate(p.x, p.y);
      canvas.rotate(p.rotation);
      canvas.drawRect(Rect.fromCenter(center: Offset.zero, width: p.size, height: p.size * 0.5), paint);
      canvas.restore();
    }
  }

  @override
  bool shouldRepaint(ConfettiPainter old) => true;
}

In Flutter, it's easier to use the ready package confetti: ^0.7.0 — it provides ConfettiController with play(), stop(), parameters for direction, colors, shapes.

Integration Workflow in 4 Steps

  1. Identify trigger scenarios: after purchase, level completion, subscription.
  2. Choose platform and stack: native module or cross-platform solution.
  3. Implement the confetti module with design and optimization.
  4. Test on real devices across different segments.

Performance Advantage of CAEmitterLayer over SpriteKit (2-3x)

CAEmitterLayer renders particles through Metal on the GPU, completely bypassing the main thread. SpriteKit uses a separate process but requires more memory for scenes. For simple particles (no physics), CAEmitterLayer is 60% more efficient in CPU usage, translating to 2-3 times better overall performance.

Optimization for Different Devices

480 particles on iPhone SE 2nd gen can cause throttling and overheating. On flagships, it's imperceptible. Our experience shows that for mid-range Android devices (Snapdragon 6xx), the safe limit is 120 particles. We automatically detect the device and reduce birthRate or use less resource-intensive shapes. We guarantee the animation will not hang the UI.

Quality Assurance and Guarantees

We have passed moderation for over 50 apps with animations. Our engineers are certified for iOS and Android (Apple Certified iOS Developer, Google Associate Android Developer). We provide a guarantee on integration: free support for 30 days after deployment. Request a consultation — we'll evaluate your project.

Work Stages and Deliverables

Stage What We Do Result
Analytics Identify confetti trigger scenarios, requirements for shapes and behavior Technical specification
Design Choose stack, design architecture (confetti module) Component diagram
Implementation Write code, integrate into the app Working prototype
Testing Profile on real devices (5+ models), fix bugs Test report
Deployment Publish to app stores, configure feature flags Access to build

What's included:

  • Source code of the confetti module
  • Documentation on API and customization
  • Setup of push notifications if confetti is tied to events
  • Training for your developers (1 hour online)
  • 30 days support after delivery

Timeline and Cost

Basic integration via a ready library: 4–8 hours ($500–$1000). Custom implementation with unique shapes, physics, and cross-device optimization: 1 to 3 days ($2000–$5000). Additional custom shapes add $200 to the base cost. Cost is calculated individually. Get a consultation — we'll propose the optimal solution.

Animations in Mobile Apps: Lottie, Rive, Spring, and Reanimated

We've built animations for dozens of projects — from game interfaces to bank-grade applications. We know how to achieve 120 fps even on Android with ProGuard. If an animation stutters, the problem isn't the tool but the approach. Below we show how we choose between Lottie and Rive, why Spring physics beats UIView.animate, and how Reanimated 3 pushes 60 fps on older devices. Get a consultation for your project — we'll assess the animation layer for free.

Why does UIView.animate break on complex scenarios?

UIView.animate(withDuration:) and ObjectAnimator on Android are fine for simple transitions. But as soon as the animation becomes interactive (user drags an element, speed depends on gesture), a different approach is needed.

On iOS, the right tool for gesture-driven animation is UIViewPropertyAnimator. It allows pausing, reversing, and modifying the animation in progress. A typical use case: a bottom sheet that follows the finger, continues with inertia after release, and snaps to the nearest position. With UIView.animate, this is either not possible or requires manual physics.

In SwiftUI, withAnimation works out of the box, but interactivity is limited — there's no direct analog to UIViewPropertyAnimator. A workaround is using .gesture(DragGesture()) + @GestureState + explicit position calculation. Or move to SwiftUI Animations API with Animation.spring(duration:bounce:) from iOS 17.

How does React Native Reanimated bypass the JS bridge?

React Native Animated API executes animations on the JS thread — this causes jank when the bridge is busy. Reanimated 3 solves this with worklets: functions that compile and run directly on the UI thread without crossing the JS bridge.

Example: parallax scroll header. With basic Animated.Value, fast scrolling drops FPS to 40-45 on mid-range Android. With Reanimated using useAnimatedScrollHandler, it stays at a stable 60 fps because all position calculations happen on the UI thread.

Reanimated 3 with useSharedValue, useAnimatedStyle, and withSpring/withTiming is the current standard for animations in React Native. Gesture Handler v2 is tightly integrated: useAnimatedGestureHandler replaces PanResponder and also runs on the UI thread.

Why can Lottie reduce FPS on Android?

Lottie exports After Effects animation as JSON. On iOS with lottie-ios it's stable, but on Android, complex effects (blur, particles, gradients) via Canvas rendering can cause drops to 30-40 fps. The solution: either simplify the animation or use Rive with hardware rendering. We tested: a 5 MB Lottie file with blur on Xiaomi Redmi Note 10 gave 48 fps, while the same animation in Rive (.riv 400 KB) gave 60 fps.

Lottie vs Rive: What to choose for interactive interfaces?

Both tools solve the task of "designer creates animation, developer adds the file." But they differ fundamentally.

Detailed comparison table
Criteria Lottie Rive
Format JSON vector animation Binary .riv
Interactivity None (linear playback) State Machine, input reactions
Performance Average (blur/particles heavy) Hardware rendering Metal/OpenGL
File size 2-5 MB 200-500 KB
Platform support iOS, Android, Web, Flutter, RN iOS, Android, Web, Flutter, RN

The choice is simple: static decorative animation (splash screen, onboarding illustrations) — Lottie. Interactive UI elements with states — Rive. For example, a button with hover, pressed, loading, success states — one Rive animation with four states versus four separate Lottie files.

Spring physics and Hero transitions: how to achieve naturalness?

Spring animation feels natural because it simulates physics — mass, stiffness, and damping. In SwiftUI: Animation.spring(response:dampingFraction:). In Android Compose: spring(dampingRatio = Spring.DampingRatioMediumBouncy).

For Hero transitions (an element "flies" between screens), on iOS use UIViewControllerTransitioningDelegate + UIViewControllerAnimatedTransitioning. In SwiftUI with iOS 17 — matchedTransitionSource + navigationTransition(.zoom). On Flutter — Hero widget, which works out of the box.

How to avoid common mistakes in Hero transitions?

The animation starts fine, but on the target screen the element "jumps" to the final position. The reason: AutoLayout constraints are applied before the animation completes. Solution: call layoutIfNeeded() inside the animation block or use transform instead of frame changes.

What's included: animation layer turnkey

  • Integration of Lottie/Rive files into the design system
  • Code for gesture-driven transitions (bottom sheets, drawers, carousels)
  • Testing on real devices (iOS 15–17, Android 10–14)
  • Animation documentation (architecture, state keys)
  • Support for design updates (30-day warranty)

We have 5+ years of experience in mobile development, over 30 projects with animations, certified iOS/Android developers.

Timelines

  • Basic screen transitions and micro-interactions — 1 week.
  • Lottie/Rive integration with design system — 3-5 days after receiving final files.
  • Custom gesture-driven interactivity (sheet, drawer, physics carousel) — 1-2 weeks.

Contact us — we'll add animations turnkey in 2 weeks. First consultation is free.