Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

StreamManager.getPreviousCuePointForStreamTimeMs incorrectly marked with @NonNull on Android

24 views
Skip to first unread message

Buelens, Mattias

unread,
Dec 5, 2024, 9:18:55 AM12/5/24
to ima...@googlegroups.com
According to the documentation for StreamManager.getPreviousCuePointForStreamTimeMs, this method can return null: "Returns the previous cuepoint for the given VOD stream time. Returns null if there is no previous cue point, or if called for a live stream. This is used to implement features like snap back in order to return the user to a skipped ad break."

However, in the Java interface, the return type of this method has a @NonNull annotation. This is especially a problem when we use this method from our Kotlin code, since it enforces null checks at runtime and in this case immediately throws a NullPointerException. (Currently, we work around this by catching this exception ourselves.)

Can you update the StreamManager interface to have a @Nullable annotation for the return type of the getPreviousCuePointForStreamTimeMs method (as well as the deprecated getPreviousCuePointForStreamTime method)? Many thanks.

Google IMA SDK for Android version: 3.36.0

IMA SDK

unread,
Dec 5, 2024, 1:19:59 PM12/5/24
to mattias...@dolby.com, ima...@googlegroups.com

Hi Mattias,

Thank you for contacting the IMA SDK support team.

Yes, the method getPreviousCuePointForStreamTimeMs is @NonNull in the samples whereas the Google Dynamic Ad Insertion says that this method returns null if there is no previous cue point, or if called for a live stream. I will check with our team about this issue and one of my team members will reach out to you once we have an update. Meanwhile, I would appreciate your patience.

This message is in relation to case "ref:!00D1U01174p.!5004Q02vGnb8:ref" (ADR-00277826)

Thanks,
 
Google Logo IMA SDK Team

Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5



IMA SDK

unread,
Dec 9, 2024, 11:09:03 AM12/9/24
to ima...@googlegroups.com, mattias...@dolby.com
Hi Mattias,

I've reached out to our docs team to verify and update the annotation.

Thanks for the notification.

Greg
IMA SDK Team

 
This message is in relation to case "ref:!00D1U01174p.!5004Q02vGnb8:ref" (ADR-00277826)

Thanks,
 
Google Logo
Greg Schoppe
IMA SDK Team


Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5
 

 



Reply all
Reply to author
Forward
0 new messages