Skip to content

Instantly share code, notes, and snippets.

Avatar

ecdundar

View GitHub Profile
View BLEManager
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View,
TouchableHighlight,
NativeAppEventEmitter,
NativeEventEmitter,
NativeModules,
View build.gradle
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.0'
}
}
View location.js
import React from 'react';
import {View, Text, StyleSheet, Image ,PermissionsAndroid,Platform} from 'react-native';
export default class App extends React.Component {
state = {
currentLongitude: 'unknown',
currentLatitude: 'unknown',
}
componentDidMount = () => {
View BBTextInput.js
import React from 'react';
import { View, TextInput } from 'react-native';
const BBTextInput = props => {
return (
<View
style={{
marginLeft: 35,
marginRight: 35,
marginTop: 10,
borderColor: '#007FFF',
View BBText.js
import React from 'react';
import { TouchableHighlight, Text, StyleSheet } from 'react-native';
const BBText = props => {
return <Text style={styles.text}>{props.text}</Text>;
};
const styles = StyleSheet.create({
text: {
color: '#111825',
View BBButon.js
import React from 'react';
import { TouchableOpacity, Text, StyleSheet } from 'react-native';
const BBButon = props => {
return (
<TouchableOpacity style={styles.button} onPress={props.itemClick}>
<Text style={styles.text}>{props.title}</Text>
</TouchableOpacity>
);
};
@ecdundar
ecdundar / build.gradle
Created Feb 18, 2019
react-native-maps node modules build.gradle
View build.gradle
apply plugin: 'com.android.library'
apply from: 'gradle-maven-push.gradle'
android {
compileSdkVersion 28
buildToolsVersion "28.0.3"
defaultConfig {
minSdkVersion 16
targetSdkVersion 27
View Permissions
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.VIBRATE" />
<application>
<receiver android:name="com.evollu.react.fcm.FIRLocalMessagingPublisher"/>
<receiver android:enabled="true" android:exported="true" android:name="com.evollu.react.fcm.FIRSystemBootEventReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED"/>
<action android:name="android.intent.action.QUICKBOOT_POWERON"/>
View Android.Manifest.xml
+ <meta-data android:name="com.google.firebase.messaging.default_notification_icon" android:resource="@mipmap/ic_notif"/>
+ <service android:name="com.evollu.react.fcm.MessagingService" android:enabled="true" android:exported="true">
+ <intent-filter>
+ <action android:name="com.google.firebase.MESSAGING_EVENT"/>
+ </intent-filter>
+ </service>
+ <service android:name="com.evollu.react.fcm.InstanceIdService" android:exported="false">
+ <intent-filter>
@ecdundar
ecdundar / CustomClientFactory
Last active Nov 18, 2020
React Native HTTPS Certificate Error Problem - Trust All Certificates
View CustomClientFactory
package com.myapplication.extensions;
import android.util.Log;
import com.facebook.react.modules.network.OkHttpClientFactory;
import com.facebook.react.modules.network.OkHttpClientProvider;
import com.facebook.react.modules.network.ReactCookieJarContainer;
import java.security.SecureRandom;
import java.security.cert.CertificateException;
You can’t perform that action at this time.