callstack / react-native-fbads

Facebook Audience SDK integration for React Native
MIT License
434 stars 142 forks source link

MediaView is not showing until clicks on the Screen #168

Closed mahesh963 closed 3 years ago

mahesh963 commented 5 years ago

Bug Report

Before opening

Native Ads

Platforms

*Android Version

Versions

Ads Environment

Current Behaviour

I Implemented the Native Ad According to my Application. Everything is working Fine. MediaView is not showing until clicks on the Screen(At the View where Media View is placed).

screenshot_20181204-164942_christenpro

Expected Behaviour Expecting to Show the Media View as Slider (or) Video (or) Image Initially along with the remaining

screenshot_20181204-164953_christenpro

Suraj-Tiwari commented 5 years ago

Please try latest release first. Also Share your code

christenpro commented 5 years ago

@Suraj-Tiwari also getting blurred image in MediaView.

Suraj-Tiwari commented 5 years ago

Blurred Media Image is known issue, But "Image or other media Not showing" we haven't faced it while testing.

mahesh963 commented 5 years ago

Hi, @Suraj-Tiwari thanks for quick response. I Upgraded the react-native-fbads to Latest version but I'm getting the Same Error i.e Initially Media View is not loading.Below is my code

<View style={styles.NativeAds}>
        <View style={{flex:1,flexDirection:'row',marginTop:5}}>
          <View style={{flex:0.16,backgroundColor:'transparent'}}>
            <AdIconView style={{height: windowSize.width/9, width:windowSize.width/9,
               borderRadius:10,backgroundColor:'transparent',alignSelf:'center',marginLeft:scale(6)}} />
          </View>
          <View style={{flex:0.74,backgroundColor:'transparent',flexDirection:'column'}}>
            <TriggerableView style={{flex:0.5,backgroundColor:'transparent',color:'#515365'}}>
              <Text style={[styles.carouselHeadTxt,{marginRight:3}]}>
                  {this.props.nativeAd.advertiserName}
              </Text>
            </TriggerableView>
            <TriggerableView style={{flex:0.5,backgroundColor:'transparent'}}>
              <Text style={{fontSize: scale(11.5),
                  lineHeight: 18,marginRight:scale(3),
                  fontFamily: "GoogleSans-Regular",marginTop:-1}}>
                {this.props.nativeAd.promotedTranslation}
              </Text>
            </TriggerableView>
          </View>
          <View style={{flex:0.1,backgroundColor:'transparent'}}>
            <AdChoicesView
              style={{width:scale(30)}}
              location={"topRight"}
              expandable={true} />
          </View>
        </View>
        <TriggerableView style={{marginHorizontal:scale(10),marginTop: scale(5)}}>
          <Text style={[styles.carouselHeadTxt,{marginRight:scale(3),alignSelf:'flex-start'}]}>
              {this.props.nativeAd.headline}
          </Text>
      </TriggerableView>
      <TriggerableView style={{marginHorizontal:scale(10)}}>
        <Text
          numberOfLines={2}
          style={[styles.messagE, {lineHeight:23,fontFamily:'GoogleSans-Regular', fontSize: 
                       scale(15)}]}>
          {this.props.nativeAd.bodyText}
        </Text>
      </TriggerableView>
      <View style={{flexDirection:'column'}}>
        <View>
        <MediaView style={{ width: windowSize.width, height: scale(180) 
          ,marginHorizontal:0,alignSelf:'center',backgroundColor:'transparent'}} />
          <View>
            <TriggerableView
              style={{
                fontSize: scale(15),
                color: 'white',
                paddingVertical: 10,
                width:windowSize.width/1.06,
                margin: scale(10),
                borderRadius: scale(6),
                alignItems:'center',
                justifyContent:'center',
                backgroundColor:'#896fec',
                textAlign:'center',
                fontFamily:'GoogleSans-Regular'
              }}>
              {this.props.nativeAd.callToActionText}
            </TriggerableView>
          </View>
        </View>
      </View>
      </View>

Along with this Error I'm getting this error after upgrading to new version of react-native-fbads when Scrolling the Records in Listview .please take a look on screenshot.

40515547-3a000f24-5f7b-11e8-85f6-7f86c4fbdc1d

mahesh963 commented 5 years ago

Hi @erandagan, i'm still getting the Fix Double value crash Issue and Media View is not loading Initially

erandagan commented 5 years ago

Did you try the version on master? I deployed the fix to a large scale production app and it seems to work flawlessy.

On Tue, Dec 11, 2018, 06:15 mahesh963 <notifications@github.com wrote:

Hi @erandagan https://github.com/erandagan, i'm still getting the Fix Double value crash Issue and Media View is not loading Initially

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/callstack/react-native-fbads/issues/168#issuecomment-446066527, or mute the thread https://github.com/notifications/unsubscribe-auth/AXm0FayE6u5kLNLgddDB5N7sQ-8dCBFhks5u3zFKgaJpZM4ZAfP4 .

Trancever commented 5 years ago

@erandagan Should we release new minor version?

erandagan commented 5 years ago

@Trancever Yes, that would be great 👍

Trancever commented 5 years ago

v6.0.1 landed on npm.

christenpro commented 5 years ago

@erandagan @Trancever Still Double value crash Issue and Media View is not loading Initially

Suraj-Tiwari commented 5 years ago

@erandagan we should recheck it on different scenario, reason could be android version specific.

i can test on Following Android version (physical devices): 9.0 8.0.1 7.0

erandagan commented 5 years ago

@Trancever Did you remember to transpile to TS before publishing? I just tried installing 6.0.1 and I seem to get the old dist, without the merged bugfix.

@Suraj-Tiwari The code has been tested on >50,000 users in a production app, It's simply not in 6.0.1.

christenpro commented 5 years ago

@Suraj-Tiwari @erandagan @Trancever Please check this scenario https://jsbin.com/qeluraf/edit?output

Trancever commented 5 years ago

@erandagan Didn't do that.. We should have a script that do it before publishing.. Will release 6.0.2 with new dist.

Trancever commented 5 years ago

Check v6.0.2 guys :) @erandagan Could you make an issue for that publish process ?

christenpro commented 5 years ago

@erandagan @Trancever @Suraj-Tiwari Thank you guys... crashing fixed, But still media view doesn't display until click or scroll down/top. I don't want to display blur media view, i want to show only scroll ads and videos. Is it possible, please let me know...

Suraj-Tiwari commented 5 years ago

Blur media view is issue within AudienceSdk I had a talk with fb dev team, they said blurry image is a placeholder to fill remaining space of image to keep original aspect ratio of image, but somehow sdk is detecting image space as placeholder

ps: They aren't fixing it for react naive.

christenpro commented 5 years ago

@Suraj-Tiwari Thank you for quick response.

What about Carousel ads display in Media View?

Suraj-Tiwari commented 5 years ago

Those were working fine video ads too. When i tested it last time

erandagan commented 5 years ago

@christenpro Is there a chance you're displaying the ad component within a scrolling container, such as ScrollView or FlatList? There is a known behaviour issue with scrolling components which is rooted in Facebook's SDK (so we can't fix it for now).

Just wondering if you could test in a non-scrolling container and see what happens - I know this isn't a real solution, but this will help us if this is all part of a bigger problem.

christenpro commented 5 years ago

@erandagan @Trancever @Suraj-Tiwari Still media view doesn't display until click or scroll down/top. Please let me know about Blur Media, I didn't get proper reply for blur view. Screenshot_2019-03-29-15-50-40-816_com christenpro

dr-andy commented 4 years ago

Same problem. MediaView appears for the first seconds then disappears. It appears if I scroll the MediaView then disappears again after a few seconds. Tested on Android 8.0 device. Other components work as intended.

paddy57 commented 4 years ago

Same problem. MediaView appears for the first seconds then disappears. It appears if I scroll the MediaView then disappears again after a few seconds. Tested on Android 8.0 device. Other components work as intended.

Did you solve this ?

TMaszko commented 3 years ago

Please check out v7 available now ! :) if it hasn't been fixed yet then please reopen it.