PAL SDK Issue in Flutter App with PointerEvent

129 views
Skip to first unread message

J D

unread,
May 16, 2022, 1:22:30 PM5/16/22
to Interactive Media Ads SDK
I am trying to integrate the PAL SDK into a Flutter app that uses the Flutter video player to play video ads. In doing so, I am having a problem mapping the Flutter event of the "PointerEvent" class from the "gestures.events" package to the "android.view.MotionEvent" Java class.

The idea is to collect the PointerEvent with a "Listener" widget in the flutter code and then convert the data with the "MotionEvent.obtain" method in the platform-specific Java code. In doing so, I could use help in mapping each atrribtue from the "PointerEvent" class to the parameters of the method .

MotionEvent obtain(long downTime, long eventTime,
            int action, int pointerCount, PointerProperties[] pointerProperties,
            PointerCoords[] pointerCoords, int metaState, int buttonState,
            float xPrecision, float yPrecision, int deviceId,
            int edgeFlags, int source, int flags)

Thanks.

IMA SDK

unread,
May 18, 2022, 3:50:41 AM5/18/22
to ima...@googlegroups.com

Hello,

 

Michael here from IMA SDK Team. Thank you for reaching out to us.

 

Would you be able to share with us the sample project implementation where the issue is reproducible? A screen recording of the behavior and the logs as well would greatly help in a faster progress of investigation.

 

If the file(s) you are looking to share are less than 25mb in total you can attach them to this case on your next reply. If you are having trouble attaching your file to this case or if your file(s) are larger than 25mb, you can share your files with me by performing the following steps:

 

1. Navigate to

https://docs.google.com/forms/d/e/1FAIpQLSfkAiXMeYP-fw1W3Z-tT9uwmATEKO5X6S-th0gR2ezdKaaqfg/viewform?usp=pp_url&entry.400550049=IMA+SDK&entry.460850823=5004Q00002atHgVQAU&entry.80707362=00107911

2. Fill out all fields, and attach your file(s).

3. Please reply back on this thread when you have uploaded your file(s). Please do not share this link.


Should you opt to share the requested details directly on this thread, kindly send it privately via "Reply to Author" button.

Regards,

Google Logo
Michael Angelo
IMA SDK Team
 


ref:_00D1U1174p._5004Q2atHgV:ref
Message has been deleted

J D

unread,
May 27, 2022, 9:08:53 AM5/27/22
to Interactive Media Ads SDK
Hello Michael,

I have attached an example project via the Link. To run the project a Flutter SDK is 
needed. I have tested it with Flutter version 2.10.5.

The example can be started with the command "flutter run 
example/lib/main.dart" from the root in the project. After launching, a 
video is started in the app. When the video loads successfully, a 
commercial video is started and the first video is paused. Once the 
commercial is over, the first video is resumed at the paused point. In 
the example, all necessary calls to the PAL SDK should be implemented. 
Calls to an ad server are not present to keep the example simple.

In the code, the mapping is done in the file 
"/lib/flutter_pal_test.dart" in the method "sendPalAdTouch". In the 
example, the events are caught by a listener in the 
"example/lib/ad.dart" file in the "build" method.

Are the attributes mapped correctly there, or are the correct default 
values used for values that do not exist?

IMA SDK

unread,
May 31, 2022, 3:20:31 AM5/31/22
to ima...@googlegroups.com
Hello,

Thank you for providing additional details. I have raised now your concern to the rest of our team for further investigation and confirmation of the reported behavior. One of them should be able to respond to you once they have sufficient information. Kindly wait patiently for their response.

J D

unread,
Jun 7, 2022, 5:03:39 AM6/7/22
to Interactive Media Ads SDK
Great! Thanks a lot.

IMA SDK

unread,
Jun 7, 2022, 10:17:14 AM6/7/22
to ima...@googlegroups.com
Hello JD,

This is Jackson from the IMA SDK DevRel team, to help with your issue.

Unfortunately, I am not able to comment on the correct way to map the Flutter event of the "PointerEvent" class from the "gestures.events" package to the "android.view.MotionEvent" Java class. Perhaps reaching out in a Flutter forum would lead to an answer.

From the Android PAL side, we make available the NonceManager methods sendAdClick(), sendPlaybackStart(), sendPlaybackEnd(), and sendTouch(e) for certain player events.

Sorry to not have a more concrete answer, but let me know if you have any follow up questions.

Thank you,
Jackson
IMA SDK team

ref:_00D1U1174p._5004Q2atHgV:ref
Reply all
Reply to author
Forward
0 new messages