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
/** | |
* Gets the SSID of the currently associated WiFi access point if there is one. Otherwise, | |
* returns empty string. | |
*/ | |
@CalledByNative | |
public static String getWifiSSID(Context context) { | |
if (context == null) { | |
return ""; | |
} | |
final Intent intent = context.registerReceiver( |
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
String details = "VERSION.RELEASE : " + Build.VERSION.RELEASE | |
+ "\nVERSION.INCREMENTAL : " + Build.VERSION.INCREMENTAL | |
+ "\nVERSION.SDK.NUMBER : " + Build.VERSION.SDK_INT | |
+ "\nBOARD : " + Build.BOARD | |
+ "\nBOOTLOADER : " + Build.BOOTLOADER | |
+ "\nBRAND : " + Build.BRAND | |
+ "\nCPU_ABI : " + Build.CPU_ABI | |
+ "\nCPU_ABI2 : " + Build.CPU_ABI2 | |
+ "\nDISPLAY : " + Build.DISPLAY | |
+ "\nFINGERPRINT : " + Build.FINGERPRINT |
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
res/values/dimens.xml(default) | |
res/values-ldpi/dimens.xml (240x320 and nearer resolution) | |
res/values-mdpi/dimens.xml (320x480 and nearer resolution) | |
res/values-hdpi/dimens.xml (480x800, 540x960 and nearer resolution) | |
res/values-xhdpi/dimens.xml (720x1280 - Samsung S3, Micromax Canvas HD, etc) | |
res/values-xxhdpi/dimens.xml (1080x1920 - Samsung S4, HTC one, etc) | |
res/values-large/dimens.xml (480x800) | |
res/values-large-mdpi/dimens.xml (600x1024) | |
res/values-sw600dp/dimens.xml (600x1024) |
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 { PropTypes } from "prop-types"; | |
import React, { Component } from "react"; | |
import { | |
Animated, | |
Dimensions, | |
Keyboard, | |
StyleSheet, | |
TextInput, | |
UIManager, | |
TouchableWithoutFeedback |
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
... | |
expo > ios > infoPlist | |
"NSFaceIDUsageDescription": "This app use face id authentication." | |
... |
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 {useState} from 'react'; | |
const App = () => { | |
const initialState = [ | |
{id: 1, country: 'Austria'}, | |
{id: 2, country: 'Belgium'}, | |
{id: 3, country: 'Canada'}, | |
]; | |
const [data, setData] = useState(initialState); |
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 perc2color = (perc: number) => { | |
var r, g, b = 0; | |
if (perc < 50) { | |
r = 255; | |
g = Math.round(5.1 * perc); | |
} | |
else { | |
g = 255; | |
r = Math.round(510 - 5.10 * perc); | |
} |
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 React, { useState } from 'react' | |
import { StyleSheet, TouchableOpacity, View, Text, Alert } from 'react-native' | |
import RNFS from 'react-native-fs' | |
const perc2color = (perc: number) => { | |
var r, g, b = 0 | |
if (perc < 50) { | |
r = 255 | |
g = Math.round(5.1 * perc) | |
} |