Skip to content

Commit 17bd6a5

Browse files
committed
adding fireTv check in code to resync onActivityResumed
1 parent 5e4c59b commit 17bd6a5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

iterableapi/src/main/java/com/iterable/iterableapi/IterableActivityMonitor.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import android.app.Activity;
44
import android.app.Application;
55
import android.content.Context;
6+
import android.os.Build;
67
import android.os.Bundle;
78
import android.os.Handler;
89
import android.os.Looper;
@@ -56,7 +57,10 @@ public void onActivityStarted(Activity activity) {
5657
@Override
5758
public void onActivityResumed(Activity activity) {
5859
currentActivity = new WeakReference<>(activity);
59-
if (!inForeground) {
60+
final String AMAZON_FEATURE_FIRE_TV = "amazon.hardware.fire_tv";
61+
String AMAZON_MODEL = Build.MODEL;
62+
63+
if (!inForeground || AMAZON_MODEL.matches("AFTN") || activity.getPackageManager().hasSystemFeature(AMAZON_FEATURE_FIRE_TV)) {
6064
inForeground = true;
6165
for (WeakReference<AppStateCallback> callback : callbacks) {
6266
if (callback.get() != null) {

0 commit comments

Comments
 (0)