IMA SDK 3.32.0 for Android and taskAffinity

325 views
Skip to first unread message

YOUNG CHA

unread,
Mar 27, 2024, 5:09:14 AMMar 27
to Interactive Media Ads SDK
Hello.

I tried to upgrade IMA SDK 3.32.0 on my app, and I found that "taskAffinity" of app get messed up including "Activity Embedding" for large screen support.


* Since IMA SDK 3.32.0 for Android, it set "taskAffinity" to ""(null) for <application>
* And all of Activities are created with its own task with null taskAffinity as default.
* Activity Embedding is not working properly for some cases, because activity was started with different tasks

IMHO, IMA SDK must not change default "taskAffinity" of <application> and its behaviors.

IMA SDK

unread,
Mar 27, 2024, 12:25:44 PMMar 27
to ima...@googlegroups.com
Hello,

Thank you for contacting the IMA SDK Support team.

What I have understood is that after upgrading to IMA SDK 3.32.0 on an Android app, the “taskAffinity” of the app, including “Activity Embedding” for large screen support, is getting affected. 

As of now, I would suggest rolling back to the previous version 3.31.0 until a fix is provided for the taskAffinity issue. Also, can you confirm whether the same issue is reproducible in our Google sample apps? If yes, kindly provide the below details for further investigation: 

  • Can you confirm whether the same behavior has been reported in IMA SDK version 3.31.0?
  • How the “taskAffinity” being set to null is impacting activity embedding?
  • Are there any specific use cases or scenarios where the problem with activity embedding occurs more frequently? 
This message is in relation to case "ref:!00D1U01174p.!5004Q02s0GsV:ref" (ADR-00228877)

Thanks,
 
Google Logo IMA SDK Team


YOUNG CHA

unread,
Mar 28, 2024, 12:12:27 AMMar 28
to Interactive Media Ads SDK
X-posted at androidx-window issue tracker.

YOUNG CHA

unread,
Mar 28, 2024, 12:12:50 AMMar 28
to Interactive Media Ads SDK


> Can you confirm whether the same issue is reproducible in our Google sample apps?
All IMA sample apps have single activity, but  “taskAffinity” can affect only while navigate between multiple activities.
So cannot reproducible same issue with IMA 3.32.0

>  Can you confirm whether the same behavior has been reported in IMA SDK version 3.31.0?
3.31 does not have issue.

> How the “taskAffinity” being set to null is impacting activity embedding?
As I commented at first item of this thread, ActivityStarter.java check whether tasks are different 
So after upgrade IMA 3.32, we can see following log when DetailActivityStarter activity is started.

03-27 16:04:02.002  1403  1432 W TaskFragmentOrganizerController: onTaskFragmentError
03-27 16:04:02.002  1403  1432 W TaskFragmentOrganizerController: java.lang.SecurityException: Cannot embed ActivityRecord{15c7d87 u0 com.example.activity_embedding/.DetailActivityStarter} that launched on another task,mLaunchMode=LAUNCH_SINGLE_TASK,mLaunchFlag=10000000
03-27 16:04:02.002  1403  1432 W TaskFragmentOrganizerController: at com.android.server.wm.ActivityStarter.sendCanNotEmbedActivityError(ActivityStarter.java:2783)
03-27 16:04:02.002  1403  1432 W TaskFragmentOrganizerController: at com.android.server.wm.ActivityStarter.addOrReparentStartingActivity(ActivityStarter.java:2728)
03-27 16:04:02.002  1403  1432 W TaskFragmentOrganizerController: at com.android.server.wm.ActivityStarter.setNewTask(ActivityStarter.java:2698)
03-27 16:04:02.002  1403  1432 W TaskFragmentOrganizerController: at com.android.server.wm.ActivityStarter.startActivityInner(ActivityStarter.java:1627)
03-27 16:04:02.002  1403  1432 W TaskFragmentOrganizerController: at com.android.server.wm.ActivityStarter.startActivityUnchecked(ActivityStarter.java:1398)
03-27 16:04:02.002  1403  1432 W TaskFragmentOrganizerController: at com.android.server.wm.ActivityStarter.executeRequest(ActivityStarter.java:1227)
03-27 16:04:02.002  1403  1432 W TaskFragmentOrganizerController: at com.android.server.wm.ActivityStarter.execute(ActivityStarter.java:703)
03-27 16:04:02.002  1403  1432 W TaskFragmentOrganizerController: at com.android.server.wm.ActivityTaskManagerService.startActivityAsUser(ActivityTaskManagerService.java:1292)
03-27 16:04:02.002  1403  1432 W TaskFragmentOrganizerController: at com.android.server.wm.ActivityTaskManagerService.startActivityAsUser(ActivityTaskManagerService.java:1233)
03-27 16:04:02.002  1403  1432 W TaskFragmentOrganizerController: at com.android.server.wm.ActivityTaskManagerService.startActivity(ActivityTaskManagerService.java:1208)
03-27 16:04:02.002  1403  1432 W TaskFragmentOrganizerController: at android.app.IActivityTaskManager$Stub.onTransact(IActivityTaskManager.java:896)
03-27 16:04:02.002  1403  1432 W TaskFragmentOrganizerController: at com.android.server.wm.ActivityTaskManagerService.onTransact(ActivityTaskManagerService.java:5333)
03-27 16:04:02.002  1403  1432 W TaskFragmentOrganizerController: at android.os.Binder.execTransactInternal(Binder.java:1280)
03-27 16:04:02.002  1403  1432 W TaskFragmentOrganizerController: at android.os.Binder.execTransact(Binder.java:1244)

IMA SDK

unread,
Mar 28, 2024, 7:50:29 AMMar 28
to ima...@googlegroups.com

Hi,

Thank you for the details

Please be advised that a bug pertaining to this case has been logged and we will keep you apprised of any developments. Rest assured that our team is actively addressing the matter. Your understanding and patience are greatly appreciated.

Mohsen Mirhoseini

unread,
Apr 3, 2024, 10:41:24 PMApr 3
to Interactive Media Ads SDK
Hi,

Is there any updates on this issue?
I tested 3.33.0 and still the problem exists.

All my activities which has launch mode "single-task" are opening as a separate task in the task manager!

This won't happen on v3.31.0 and bellow, but from v3.32.0 and v3.33.0 there is an Android 14 runtime crash fix which I need to have it.

Thanks 
1opKE.png

Mohsen Mirhoseini

unread,
Apr 3, 2024, 10:41:30 PMApr 3
to Interactive Media Ads SDK
Hi,

Any updates on this bug?

I managed to solve the problem temporarily by adding:
tools:remove="android:taskAffinity"
to my application tag in the manifest file,
but it would be nice if we get a permanent fix for this in the upcoming releases.

Thanks,
Mohsen

On Thursday 28 March 2024 at 12:50:29 UTC+1 IMA SDK wrote:

IMA SDK

unread,
Apr 4, 2024, 4:49:28 AMApr 4
to msn.mir...@gmail.com, ima...@googlegroups.com
Hi,

I would like to inform you that our team is currently working on this issue. One of our teammates will get back to you once we have an update on this.Meanwhile your patience is appreciated.

mickco Lai

unread,
Jun 13, 2024, 7:56:55 AM (13 days ago) Jun 13
to Interactive Media Ads SDK

Hi all, is there any update for this issue? I also encountering it currently.
IMA SDK 在 2024年4月4日 星期四下午4:49:28 [UTC+8] 的信中寫道:

mickco Lai

unread,
Jun 13, 2024, 8:15:18 AM (13 days ago) Jun 13
to Interactive Media Ads SDK

Hi all,

Is there any solution for this issue? I am still encountering it for 3.33.0 version
IMA SDK 在 2024年4月4日 星期四下午4:49:28 [UTC+8] 的信中寫道:
Hi,

IMA SDK

unread,
Jun 13, 2024, 1:50:10 PM (13 days ago) Jun 13
to mickco...@gmail.com, ima...@googlegroups.com
Hi,

I would like to inform you that our team is currently working on this issue. One of our teammates will get back to you once we have an update on this.Meanwhile your patience is appreciated.

Thanks

IMA SDK

unread,
Jun 14, 2024, 5:08:09 PM (12 days ago) Jun 14
to ima...@googlegroups.com, mickco...@gmail.com
Hi,

This issue was resolved in 3.33.0 version, Could you check later version and confirm once ?

IMA SDK

unread,
Jun 17, 2024, 10:13:01 AM (9 days ago) Jun 17
to joao....@g.globo, ima...@googlegroups.com, mickco...@gmail.com
Hi,

I am checking this issue and get back to you once i got any update.

Joao Victor Girard De Sena Nunes

unread,
Jun 17, 2024, 10:22:53 AM (9 days ago) Jun 17
to Interactive Media Ads SDK
My team is still experiencing this issue on 3.33.0.
Does the new release 3.34.0 fixes it?

Fernando Pitters

unread,
Jun 20, 2024, 5:04:09 AM (6 days ago) Jun 20
to Interactive Media Ads SDK
We were experiencing this after bumping from 3.31.0 to 3.33.0
But checking 3.34.0 the `taskAffinity` parameter is gone from application tag.

It would be great if this changes/fixes could be included in the changelog

Thanks

IMA SDK

unread,
Jun 20, 2024, 7:43:23 AM (6 days ago) Jun 20
to fernando...@tv2.no, ima...@googlegroups.com
Hi,

Thanks for the confirmation. Will surely raise this thing to add in the change log.

Kindly get back to us if you need any other help related to IMA SDK.
Reply all
Reply to author
Forward
0 new messages