Skip to content

Commit bf3733e

Browse files
committed
feat(example): add ADB detection callback
1 parent af26fff commit bf3733e

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

example/src/App.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const App = () => {
3232
// supportedAlternativeStores: ['storeOne', 'storeTwo'],
3333
malwareConfig: {
3434
blacklistedHashes: ['FgvSehLMM91E7lX/Zqp3u4jMmd0A7hH/Iqozu0TMVd0u'],
35-
blacklistedPackageNames: ['com.wultra.app.screenlogger'],
35+
blacklistedPackageNames: ['com.freeraspreactnativeexample'],
3636
suspiciousPermissions: [
3737
[
3838
'android.permission.INTERNET',
@@ -45,7 +45,7 @@ const App = () => {
4545
},
4646
},
4747
iosConfig: {
48-
appBundleId: 'com.freeraspreactnativeexample',
48+
appBundleId: 'org.reactjs.native.example.FreeraspReactNativeExample',
4949
appTeamId: 'your_team_ID',
5050
},
5151
watcherMail: '[email protected]',
@@ -180,6 +180,14 @@ const App = () => {
180180
)
181181
);
182182
},
183+
// Android only
184+
adbEnabled: () => {
185+
setAppChecks((currentState) =>
186+
currentState.map((threat) =>
187+
threat.name === 'ADB Enabled' ? { ...threat, status: 'nok' } : threat
188+
)
189+
);
190+
},
183191
};
184192

185193
const addItemsToMalwareWhitelist = async () => {

example/src/checks.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,5 @@ export const androidChecks = [
1717
{ name: 'Obfuscation Issues', status: 'ok' },
1818
{ name: 'Developer Mode', status: 'ok' },
1919
{ name: 'Malware', status: 'ok' },
20+
{ name: 'ADB Enabled', status: 'ok' },
2021
];

0 commit comments

Comments
 (0)