banditoth / MAUI.Packages

A toolkit for .NET MAUI 🏝, containing useful stuff to ease development for MAUI applications.
MIT License
38 stars 1 forks source link

Android implementation JailBreak Root detection #12

Open CorentinSwiss4 opened 7 months ago

CorentinSwiss4 commented 7 months ago

Hello i try to implement the detection of jail break and rooted device, when i launch on iOS it's works but android there is a crash with "Could not check the device's Jailbreak or Root status. See inner exceptions for further details". Implementations :

private async void CheckJailBreakRoot() { IJailbreakDetector _jbDetector = App.Services.GetRequiredService<IJailbreakDetector>(); if (_jbDetector.IsSupported()) { if (_jbDetector.IsRootedOrJailbrokenAsync().Result) { MainPage = new BlankShell(); return; } } }

Following information :

dot net maui 7 Android Api lvl 33 and 34 (pixel 8)

Could you please help me to debug ?

vitorelli commented 1 month ago

Try to await the method on OnAppearing.