This commit is contained in:
2026-03-05 16:18:47 +08:00
parent 867cf92294
commit ecd72a1e78
3 changed files with 2 additions and 17 deletions

15
App.tsx
View File

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