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,
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() {