Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Settings > Clear Data = crashes my app

$
0
0

My app will no longer load after I goto the device's Settings > Apps > My app > Clear Data.
Steps I take to reproduce:
1. I start my app fine
2. then close it (set in background or stop it)
3. goto device's settings/apps/my app/clear data
4. then I try to start my app again
5 based on which device its on it either immediately crashes or just hangs on my splash activity which wrapped in a try/catch block I get the

telephonyManager = (TelephonyManager)GetSystemService(TelephonyService);
And assign some variables like the DeviceId and DeviceSoftwareVersion.
FlxGlobals.DeviceID = telephonyManager.DeviceId;
FlxGlobals.DeviceOSver = telephonyManager.DeviceSoftwareVersion;

I also create some Sql lite database and tables on the initial splash screen. Which I assume gets removed when clearing data, so if they dont exist I recreate them and populate the tables with log data for use to send off to a web service at a later point.

I cant debug because once I clear the data, Visual Studio stops the debugger.
This is happening while debugging and with the app in Beta and Alpha in Google Play.

Has anyone experienced this and does anyone have a fix?
Thanks in advance,


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>