import React from 'react' import { AppRegistry, Platform, SafeAreaView, Text } from 'react-native' function App(): JSX.Element { return ( test ) } export default App if (Platform.OS === 'android') { AppRegistry.registerHeadlessTask( 'RNCallKeepBackgroundMessage', () => ({ name, callUUID, handle }) => { // Make your call here console.log('something') return Promise.resolve() }, ) }