fix
This commit is contained in:
15
App.tsx
15
App.tsx
@@ -16,19 +16,13 @@ import {
|
||||
GooglePayBusinessBindResult,
|
||||
BharatPeBusinessBindResult,
|
||||
onSmsMessage,
|
||||
onNotificationMessage,
|
||||
startSmsListener,
|
||||
startNotificationListener,
|
||||
stopSmsListener,
|
||||
stopNotificationListener,
|
||||
checkSmsPermission,
|
||||
checkNotificationPermission,
|
||||
openNotificationSettings,
|
||||
requestSmsPermission,
|
||||
PhonePePersonalBindResult,
|
||||
PhonePePersonalBind,
|
||||
SmsMessage,
|
||||
NotificationMessage,
|
||||
proxyBackgroundService,
|
||||
} from "rnwalletman";
|
||||
|
||||
@@ -90,7 +84,6 @@ export default class App extends Component<AppProps, WalletmanAppState> {
|
||||
componentWillUnmount() {
|
||||
this.stopProxyClient();
|
||||
stopSmsListener();
|
||||
stopNotificationListener();
|
||||
}
|
||||
|
||||
handleAppStateChange = (nextAppState: AppStateStatus) => {
|
||||
@@ -105,19 +98,11 @@ export default class App extends Component<AppProps, WalletmanAppState> {
|
||||
const hasSms = await checkSmsPermission();
|
||||
if (!hasSms) await requestSmsPermission();
|
||||
|
||||
const hasNotif = await checkNotificationPermission();
|
||||
if (!hasNotif) await openNotificationSettings();
|
||||
|
||||
startSmsListener();
|
||||
startNotificationListener();
|
||||
|
||||
onSmsMessage((msg: SmsMessage) => {
|
||||
console.log('[SMS]', msg.address, msg.body);
|
||||
});
|
||||
|
||||
onNotificationMessage((msg: NotificationMessage) => {
|
||||
// console.log('[Notification]', msg.packageName, msg.title, msg.text);
|
||||
});
|
||||
}
|
||||
|
||||
async startProxyClient() {
|
||||
|
||||
Reference in New Issue
Block a user