Skip to main content
Answer

Is there any specific configuration for V2 paywalls for Flutter to work on Android?

  • March 20, 2025
  • 2 replies
  • 113 views

Forum|alt.badge.img+1

Is there any specific configuration needed for the Flutter V2 Paywall to be displayed on Android?
Our Paywall displays correctly on IOS:
 


But it is blank on Android:
 


We hava a very simple flutter code to show the Paywall:

 

 Widget getRcPaywall(BuildContext context) {
return SafeArea(
child: Center(
child: Container(
color: context.colorsTheme.backgroundColor,
// RevenueCat Paywall, this will use the default paywall configured on RevenueCat and render it here
child: PaywallView(
onPurchaseCompleted: onPurchaseCompleted,
onPurchaseError: (PurchasesError error) {
scaffoldKey.currentState?.showSnackBar(SnackBar(
backgroundColor: MFColor.destructiveRed,
content: Text('Unable to make Purchase. Error code: ${error.toString()}'),
));
},
onRestoreCompleted: (CustomerInfo info) async {
await onPurchaseCompleted(info, null);
},
onRestoreError: (PurchasesError error) {
scaffoldKey.currentState?.showSnackBar(SnackBar(
backgroundColor: MFColor.destructiveRed,
content: Text('Unable to restore purchases. Error code: ${error.toString()}'),
));
},
onDismiss: () {
navigateBack(context);
},
))));
}

And for Android we changed the MainActivity to subclass `FlutterFragmentActivity`

import io.flutter.embedding.android.FlutterFragmentActivity

class MainActivity: FlutterFragmentActivity() {
}


On the logs it shows:
 

E/FrameEvents(31809): updateAcquireFence: Did not find frame.

I/OpenGLRenderer(31809): Davey! duration=987ms; Flags=0, FrameTimelineVsyncId=87981877, IntendedVsync=268106646739576, Vsync=268107380072880, InputEventId=225764247, HandleInputStart=268107382062411, AnimationStart=268107382063921, PerformTraversalsStart=268107418419494, DrawStart=268107581061161, FrameDeadline=268106663406242, FrameInterval=268107381556005, FrameStartTime=16611942, SyncQueued=268107627140171, SyncStart=268107654700536, IssueDrawCommandsStart=268107654913817, SwapBuffers=268107659541994, FrameCompleted=268107662111057, DequeueBufferDuration=3717187, QueueBufferDuration=1295416, GpuCompleted=268107662111057, SwapBuffersCompleted=268107661077723, DisplayPresentTime=531207818577, CommandSubmissionCompleted=268107659541994,

the line E/FrameEvents(31809): updateAcquireFence: Did not find frame.
keeps appearing in the log after this

Best answer by lincoln-alves-8bacf7

Just to help if anyone faces the same issue:
The configuration of our footer was marked with `fill` that on Android made the footer cover the whole paywall, completely a mistake on our part.

 

This post has been closed for comments

2 replies

Forum|alt.badge.img+1

Just to help if anyone faces the same issue:
The configuration of our footer was marked with `fill` that on Android made the footer cover the whole paywall, completely a mistake on our part.

 


JayShortway
RevenueCat Staff
Forum|alt.badge.img+5
  • RevenueCat Staff
  • March 20, 2025

Hi ​@lincoln-alves-8bacf7, I'm glad to hear you solved this! I've been trying to reproduce this issue and couldn't, but this explains it. 😄

Thanks also for pointing out this inconsistency between the iOS and Android implementation. This is something we'll have to iron out. Maybe Height: Fill shouldn't even be an option for the Footer.