Skip to content

Instantly share code, notes, and snippets.

View LuffyAnshul's full-sized avatar

ANSHUL VARSHAV BORAWAKE LuffyAnshul

View GitHub Profile
const _onSaveEvent = (result) => {
//result.encoded - for the base64 encoded png
//result.pathName - for the file path name
alert('Signature Captured Successfully');
console.log(result.encoded);
};
const _onDragEvent = () => {
// This callback will be called when the user enters signature
console.log('dragged');
const sign = createRef();
const saveSign = () => {
sign.current.saveImage();
};
const resetSign = () => {
sign.current.resetImage();
};
<SignatureCapture
style={styles.signature}
ref={sign}
onSaveEvent={_onSaveEvent}
onDragEvent={_onDragEvent}
showNativeButtons={false}
showTitleLabel={false}
viewMode={'portrait'}
/>
<View style={{flexDirection: 'row'}}>
@LuffyAnshul
LuffyAnshul / Admob_App.js
Last active June 6, 2021 05:21
Interstitial ADs
import { InterstitialAd, TestIds, AdEventType} from '@react-native-firebase/admob';
...
showInterstitialAd = () => {
// Create a new instance
const interstitialAd = InterstitialAd.createForAdRequest(TestIds.INTERSTITIAL);
// Add event handlers
interstitialAd.onAdEvent((type, error) => {
import { TestIds, RewardedAd, RewardedAdEventType } from '@react-native-firebase/admob';
....
showRewardAd = () => {
// Create a new instance
const rewardAd = RewardedAd.createForAdRequest(TestIds.REWARDED);
// Add event handlers
rewardAd.onAdEvent((type, error) => {