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

DataUrl not working in some android devices. #367

Open
TikshaK opened this issue Oct 3, 2024 · 0 comments
Open

DataUrl not working in some android devices. #367

TikshaK opened this issue Oct 3, 2024 · 0 comments

Comments

@TikshaK
Copy link

TikshaK commented Oct 3, 2024

I am using a base64 string as dataurl and bgSrc prop to show the image in the background and each time the modal is opened a new url comes and that is set in dataurl. It works fine in most of the devices (iOS and android) but in some android devices, It is giving issue for the release build. The modal opens and the dataurl Image appears for some time(it blink) and then nothing is there in the background.
I tried giving url to key prop as suggested in issue #347 by @YanYuanFE but it gives the same issue.
Please help if anybody can![

media_20241003_144835_1211646929666502506.mp4

](url)

    <View
        style={[
            styles.container,
            {
                backgroundColor: "rgba(0,0,0,0.8)",
                justifyContent: "center"
            }
        ]}
        pointerEvents={modalLoader ? 'none' : 'auto'}
    >
        <ActivityIndicator
            style={{
                position: "absolute",
                zIndex: 10,
                alignSelf: "center",
                top: sWidth * 0.95
            }}
            animating={modalLoader}
            size={sWidth * 0.1}
            color={Colors.primaryDark}
        />
        {
            backImg !="" &&

        
        <View
            style={{
                alignSelf: 'center',
                borderWidth: 1,
                width: sWidth * 0.9,
                height: sWidth * 0.9 * (3 / 4),
                justifyContent: "center",
                borderColor: Colors.primaryDark,
            }}
            pointerEvents={modalLoader ? 'none' : 'auto'}
        >

            <TouchableOpacity
                onPressIn={(evt) => handlePress(evt)}
                onLayout={handleLayout}
                style={{
                    width: "100%",
                    height: "100%"
                }}
            >
                {/* {
                    (backImg && backImg != null) &&
                } */}
                <SignatureScreen
                    dotSize={dot}
                    style={{
                        width: "100%",
                        height: "100%"
                    }}
                    // key={backImg}
                    onEnd={handleEnd}
                    onOK={handleOK}
                    onEmpty={handleEmpty}
                    onClear={handleClear}
                    onGetData={handleData}
                    ref={ref}
                    onBegin={(sig) => {
                        ref?.current?.readSignature()
                        setModalLoader(true)
                    }}
                    penColor={dotColor}
                    webStyle={styleButton}
                    dataURL={backImg}
                    bgSrc={backImg}
                    confirmText="Save to gallery"
                />
            </TouchableOpacity>
        </View>

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant