Giter VIP home page Giter VIP logo

Comments (6)

gre avatar gre commented on May 23, 2024

do you have an example that reproduce the problem?

from react-native-view-shot.

imbudhiraja avatar imbudhiraja commented on May 23, 2024

Yes Here find the sample code.

<View style={{marginHorizontal:(Screen.width/100)1.5,
backgroundColor: 'transparent',
borderTopWidth:1,
borderColor:"#C0C0C0",
marginTop:(Screen.height/100)
-1,
paddingVertical:(Screen.height/100)*1.3,
alignItems:"center"
}} >
<TouchableHighlight style={{position:'absolute',
left:(Screen.width/100)*20,
alignItems: 'center',
height:(Screen.width/100)*15,
width:(Screen.width/100)*20,}}
underlayColor = "transparent"
onPress={()=>this.socialMediaShare(rowdata)}>
<Image
style={[CommonStyle.message_board_bottom_icons,{marginTop:7,
width:(Screen.width/100)*7.2,height:(Screen.width/100)*7.22,}]}
source={share_icon}
/>


socialMediaShare (refname) {
let context=this;
console.log("refname",refname);
context.setTimeout(function(){
takeSnapshot(context.refs[refname], {
format: "jpeg",
quality: 1,
path: PictureDir+"/screenShot.png"
})
.then(
uri => context.setUri(uri),
error => {
console.log("Oops, snapshot failed", error);
//Toast.show("Your device does not support this feature.");
}
);
},200);
}

from react-native-view-shot.

gre avatar gre commented on May 23, 2024

Where is your ref set?

is it on a View, if so, have you tried to set collapsable={false} on it?

from react-native-view-shot.

imbudhiraja avatar imbudhiraja commented on May 23, 2024

@gre ref id is set to view and view is set to collapsable={false} already.

from react-native-view-shot.

imbudhiraja avatar imbudhiraja commented on May 23, 2024

@gre just fixed the issue. This is happening because when we are saving images to path: PictureDir. We need to get the storage permissions from user else package throw errors
Thanks

from react-native-view-shot.

suwu150 avatar suwu150 commented on May 23, 2024

@imbudhiraja What permissions do you use?

from react-native-view-shot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.