Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

com.clevertap.android.sdk.InAppNotificationActivity is not displaying the content #149

Closed
alanlai1989 opened this issue Jan 25, 2021 · 19 comments
Labels
moved to support moved or solved by CT support team

Comments

@alanlai1989
Copy link

alanlai1989 commented Jan 25, 2021

When the app start this activity, it created a transparent activity which block any UI feedback. Here is the video of the issue.

implementation 'com.clevertap.android:clevertap-android-sdk:4.0.0'

Handle window ActivityRecord{e9a4be3 token=android.os.BinderProxy@36c2a98 {com.clevertap.android.sdk.InAppNotificationActivity}} visibility: false

SVID_20210124_134741_1_s01.mp4
@piyush-kukadiya
Copy link
Contributor

@alanlai1989 Can you post logs by CleverTap SDK?

@alanlai1989
Copy link
Author

Handle window ActivityRecord{e9a4be3 token=android.os.BinderProxy@36c2a98 {com.clevertap.android.sdk.InAppNotificationActivity}} visibility: false
this is the log that i filter by only "clevertap"

@piyush-kukadiya
Copy link
Contributor

@alanlai1989 Can you enable verbose mode and share the logs.

@alanlai1989
Copy link
Author

2021-01-26 19:05:02.529 14447-14447/? I/CleverTap: Activity Lifecycle Callback successfully registered
2021-01-26 19:05:02.625 14447-14447/com.kfit.fave.debug I/CleverTap: Account Region not specified in the AndroidManifest - using default region
2021-01-26 19:05:02.636 14447-14580/com.kfit.fave.debug I/CleverTap: SDK Version Code is 40000
2021-01-26 19:05:02.636 14447-14580/com.kfit.fave.debug I/CleverTap: pushnotification.CTPushNotificationReceiver is present
2021-01-26 19:05:02.637 14447-14580/com.kfit.fave.debug I/CleverTap: pushnotification.CTNotificationIntentService is present
2021-01-26 19:05:02.637 14447-14580/com.kfit.fave.debug I/CleverTap: pushnotification.amp.CTBackgroundJobService is present
2021-01-26 19:05:02.638 14447-14580/com.kfit.fave.debug I/CleverTap: pushnotification.amp.CTBackgroundIntentService is present
2021-01-26 19:05:02.641 14447-14447/com.kfit.fave.debug I/CleverTap: CleverTap SDK initialized with accountId: 88W-9R5-Z65Z accountToken: 52c-0bb accountRegion: null
2021-01-26 19:05:02.642 14447-14580/com.kfit.fave.debug I/CleverTap: InAppNotificationActivity is present
2021-01-26 19:05:02.643 14447-14580/com.kfit.fave.debug I/CleverTap: pushnotification.fcm.FcmMessageListenerService not present
2021-01-26 19:05:02.643 14447-14580/com.kfit.fave.debug I/CleverTap: FcmTokenListenerService not present
2021-01-26 19:05:02.953 14447-14447/com.kfit.fave.debug D/CleverTap:88W-9R5-Z65Z: In-app notifications will not be shown on [SplashActivity, PhoneNumberSignupActivity, VerifyPINActivity, LocationPermissionPromptActivity, FaveCitySelectionActivity, UserSignupActivity]
2021-01-26 19:05:02.953 14447-14447/com.kfit.fave.debug D/CleverTap: In-app notifications will not be shown for this activity (com.kfit.fave.activity.SplashActivity)
2021-01-26 19:05:05.279 14447-14447/com.kfit.fave.debug D/CleverTap:88W-9R5-Z65Z: Notification ready: {"type":"half-interstitial","bg":"#ffffff","tablet":false,"close":true,"message":{"text":"Only Alan Only","color":"#434761","og":"Only Alan Only","replacements":"Only Alan Only","df":{},"defaultValuesSet":{"value":true,"strict":true}},"title":{"text":"Only Alan","color":"#434761","og":"Only Alan","replacements":"Only Alan","df":{},"defaultValuesSet":{"value":true,"strict":true}},"buttons":[{"text":"NO","color":"#000000","bg":"#1EB858","border":"#1EB858","radius":"4","actions":{"close":true,"type":"close","android":"","ios":"","kv":{}}}],"media":{},"isMediaSourceRecommended":false,"recommendedText":{"text":"","replacements":"","og":""},"mediaLandscape":{},"isMediaSourceRecommendedLandscape":false,"recommendedTextLandscape":{"text":"","replacements":"","og":""},"hasPortrait":true,"hasLandscape":false,"is_native":true,"wzrk_id":"1611657312_20210126","wzrk_pivot":"wzrk_default","wzrk_ttl":1611745505,"ti":1611657312,"efc":1}
2021-01-26 19:05:05.339 14447-14447/com.kfit.fave.debug D/CleverTap: App in Portrait, displaying InApp Notification anyway
2021-01-26 19:05:05.349 14447-14447/com.kfit.fave.debug D/ActivityThread: add activity client record, r= ActivityRecord{6aa1073 token=android.os.BinderProxy@871bfce {com.kfit.fave.debug/com.clevertap.android.sdk.InAppNotificationActivity}} token= android.os.BinderProxy@871bfce
2021-01-26 19:06:02.371 14447-14447/com.kfit.fave.debug I/ActivityThread: Handle window ActivityRecord{6aa1073 token=android.os.BinderProxy@871bfce {com.kfit.fave.debug/com.clevertap.android.sdk.InAppNotificationActivity}} visibility: false

@alanlai1989
Copy link
Author

@piyush-kukadiya @kumaratulismu @judepereira

@piyush-kukadiya
Copy link
Contributor

@alanlai1989 Looking into it

@piyush-kukadiya
Copy link
Contributor

@alanlai1989 It's working fine in sample app hosted in this repo.

Few questions:

  1. Is this issue Device specific or happening on all OS and OEMs?
  2. Also can you share Component tree and and Layout Display of a screen where this issue is happening.
  3. Does inApp works properly on other screens of your app or just home page?
  4. Was this working properly in pervious CT versions?

@alanlai1989
Copy link
Author

@piyush-kukadiya

  1. happened to all Devices

  2. `

     <import type="android.view.View"/>
    
     <variable
         name="viewModel"
         type="com.kfit.fave.viewmodel.MainViewModel"/>
    

    <androidx.coordinatorlayout.widget.CoordinatorLayout
    android:id="@+id/container"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

     <com.google.android.material.appbar.AppBarLayout
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
         app:elevation="@{viewModel.elevation}">
    
         <include
             layout="@layout/layout_main_header"
             android:visibility="@{!viewModel.overlayActionBarVisibility &amp;&amp; viewModel.headerVisibility ? View.VISIBLE : View.GONE, default=gone}"
             bind:viewModel="@{viewModel}"/>
    
         <include
             layout="@layout/divider_horizontal"
             android:visibility="@{viewModel.separatorVisibility ? View.VISIBLE : View.GONE, default=gone}"/>
     </com.google.android.material.appbar.AppBarLayout>
    
     <FrameLayout
         android:layout_width="match_parent"
         android:layout_height="match_parent"
         android:clipToPadding="false"
         android:paddingBottom="@dimen/size_56"
         app:layout_behavior="@string/appbar_scrolling_view_behavior">
    
         <com.kfit.fave.widget.viewpager.DisableSwipeViewPager
             android:id="@+id/view_pager"
             android:layout_width="match_parent"
             android:layout_height="match_parent"
             android:background="@color/fave_bg"
             app:layout_behavior="@string/appbar_scrolling_view_behavior"/>
    
         <include
             layout="@layout/layout_main_header"
             android:visibility="@{viewModel.overlayActionBarVisibility &amp;&amp; viewModel.headerVisibility ? View.VISIBLE : View.GONE, default=gone}"
             bind:viewModel="@{viewModel}"/>
     </FrameLayout>
    
     <com.google.android.material.bottomnavigation.BottomNavigationView
         android:id="@+id/bottom_navigation_view"
         android:layout_width="match_parent"
         android:layout_height="@dimen/size_56"
         android:layout_gravity="bottom"
         android:background="@color/white"
         android:visibility="@{viewModel.bottomBarVisibility, default=gone}"
         app:itemBackground="?attr/selectableItemBackground"
         app:itemIconSize="@dimen/size_24"
         app:itemTextAppearanceActive="@style/BottomBarTextStyle"
         app:itemTextAppearanceInactive="@style/BottomBarTextStyle"
         app:labelVisibilityMode="labeled"/>
    
     <include
         layout="@layout/layout_main_footer"
         android:visibility="@{viewModel.footerVisibility ? View.VISIBLE : View.GONE, default=gone}"
         bind:viewModel="@{viewModel}"/>
    

    </androidx.coordinatorlayout.widget.CoordinatorLayout>
    `

  3. other screen also not working. I tried to exclude the MainActivity and then I go to inner Activity, it is happening the same

  4. this one I need to find it out too, i think it was working before we upgrade to CT 4.0.

I have a thought on the style configuration is causing this happen. Here is my style
<style name="NewAppTheme" parent="Theme.MaterialComponents.Light.NoActionBar"> <item name="colorPrimary">@color/colorPrimary</item> <item name="colorPrimaryDark">@color/colorPrimaryDark</item> <item name="android:windowBackground">@color/white</item> <item name="searchViewStyle">@style/CustomSearchView</item> </style>

@piyush-kukadiya
Copy link
Contributor

@alanlai1989 Can you post screenshot of layout inspector showing your screen and clevertap inApp Activity.

@piyush-kukadiya
Copy link
Contributor

Also is this theme applied globally to all components?

@alanlai1989
Copy link
Author

@piyush-kukadiya you mean the InAppActivity when received the in app push?
Yup, the theme is applied to global

@alanlai1989
Copy link
Author

@piyush-kukadiya
Here is the screenshot of the layout. Left is before with white navigation bar and right is the after receiving the in app push with black navigation bar
Screenshot_20210201_143153_com kfit fave debug
Screenshot_20210201_145426_com kfit fave debug

@piyush-kukadiya
Copy link
Contributor

@alanlai1989 Can't see CleverTap InApp Activity bounds in attached layout. Wanted to check is this issue is due to CleverTap InApp. Wanted screenshot like the attached one.
Screenshot 2021-02-01 at 2 21 37 PM

@alanlai1989
Copy link
Author

@piyush-kukadiya
Screenshot 2021-02-02 at 17 13 51

@piyush-kukadiya
Copy link
Contributor

@alanlai1989 Again I can't see CleverTap InApp Activity bounds here. As per screenshot - after receiving the in app push with black navigation bar if CleverTap inApp is blocking touch events then it must show layout bounds of inApp.

How did you identified that CT inApp is blocking touch events?

@alanlai1989
Copy link
Author

@piyush-kukadiya do we need to add the UI for InApp activity explicitly?

To test it, I go to CT and create Inapp campaign then send to all Android Devices. After 5 minutes, when we launched the app, we can't click anything and the bottom navigation changed to black color. As well, I checked the log

Notification ready: {"type":"half-interstitial","bg":"#ffffff","tablet":false,"close":true,"message":{"text":"Only Alan Only","color":"#434761","og":"Only Alan Only","replacements":"Only Alan Only","df":{},"defaultValuesSet":{"value":true,"strict":true}},"title":{"text":"Only Alan","color":"#434761","og":"Only Alan","replacements":"Only Alan","df":{},"defaultValuesSet":{"value":true,"strict":true}},"buttons":[{"text":"NO","color":"#000000","bg":"#1EB858","border":"#1EB858","radius":"4","actions":{"close":true,"type":"close","android":"","ios":"","kv":{}}}],"media":{},"isMediaSourceRecommended":false,"recommendedText":{"text":"","replacements":"","og":""},"mediaLandscape":{},"isMediaSourceRecommendedLandscape":false,"recommendedTextLandscape":{"text":"","replacements":"","og":""},"hasPortrait":true,"hasLandscape":false,"is_native":true,"wzrk_id":"1611657312_20210126","wzrk_pivot":"wzrk_default","wzrk_ttl":1611745505,"ti":1611657312,"efc":1} is shown

@piyush-kukadiya
Copy link
Contributor

@alanlai1989 Please raise a support request via the CleverTap Dashboard and if possible send us a debug APK. Since it's working fine for other users it's difficult to reproduce without debugging. Also it would be better if you try to debug from your end as well to resolve this asap.

@darshanclevertap darshanclevertap added the moved to support moved or solved by CT support team label Feb 15, 2021
@alanlai1989
Copy link
Author

alanlai1989 commented Feb 19, 2021

@piyush-kukadiya @darshanclevertap we managed to found the root cause. It can be replicate if using this version
"androidx.fragment:fragment:1.3.0-beta02". The issue had been fixed by google in version 1.3.0. Kindly change to newest version which is "androidx.fragment:fragment:1.3.0".

@piyush-kukadiya
Copy link
Contributor

@alanlai1989 Thanks, we will change in upcoming release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
moved to support moved or solved by CT support team
Projects
None yet
Development

No branches or pull requests

3 participants