This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<SignatureCapture | |
style={styles.signature} | |
ref={sign} | |
onSaveEvent={_onSaveEvent} | |
onDragEvent={_onDragEvent} | |
showNativeButtons={false} | |
showTitleLabel={false} | |
viewMode={'portrait'} | |
/> | |
<View style={{flexDirection: 'row'}}> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const sign = createRef(); | |
const saveSign = () => { | |
sign.current.saveImage(); | |
}; | |
const resetSign = () => { | |
sign.current.resetImage(); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle | |
--assets-dest android/app/src/main/res/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
signingConfigs { | |
release { | |
storeFile file('your_key_name.keystore') | |
storePassword System.console().readLine("\nKeystore password:") | |
keyAlias System.console().readLine("\nAlias: ") | |
keyPassword System.console().readLine("\nAlias password: ") | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
android { | |
.... | |
signingConfigs { | |
release { | |
storeFile file('your_key_name.keystore') | |
storePassword 'your_key_store_password' | |
keyAlias 'your_key_alias' | |
keyPassword 'your_key_file_alias_password' | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Icon } from '@iconify/react'; | |
import locationIcon from '@iconify/icons-mdi/fire-alert'; | |
const LocationMarker = ({ lat, lng, onClick }) => { | |
return ( | |
<div className="location-marker" onClick={onClick}> | |
<Icon icon={locationIcon} className="location-icon" /> | |
</div> | |
) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const API_KEY = 'YOUR_API_KEY'; | |
const Map = ({ eventData, center, zoom }) => { | |
const [locationInfo, setLocationInfo] = useState(null); | |
const markers = eventData.map(ev => { | |
if(ev.categories[0].id === 8) { | |
return <LocationMarker | |
lat={ev.geometries[0].coordinates[1]} |
NewerOlder