import * as Cellular from 'expo-cellular'; import { CellularGeneration } from 'expo-cellular'; import * as React from 'react'; import { useState } from 'react'; import { ScrollView } from 'react-native'; import Button from '../components/Button'; import MonoText from '../components/MonoText'; type CellularInfo = { allowsVoip: boolean | null; carrier: string | null; isoCountryCode: string | null; mobileCountryCode: string | null; mobileNetworkCode: string | null; generation: CellularGeneration; }; export default function CellularScreen() { const [cellularInfo, setCellularInfo] = useState(); const _getCellularInfo = async () => { try { const response = await Cellular.requestPermissionsAsync(); if (!response.granted) { console.warn( "getCurrentGeneration will return unknown, becuase the phone state permission wasn't granted." ); } const generation = await Cellular.getCellularGenerationAsync(); setCellularInfo({ allowsVoip: await Cellular.allowsVoipAsync(), carrier: await Cellular.getCarrierNameAsync(), isoCountryCode: await Cellular.getIsoCountryCodeAsync(), mobileCountryCode: await Cellular.getMobileCountryCodeAsync(), mobileNetworkCode: await Cellular.getMobileNetworkCodeAsync(), generation, }); } catch (error) { alert(error.message); } }; return (