windows phone 7 - How to check if user have already used the app for 3 days sequenced -
I am writing a Windows Phone 8 application and I want to know that the user has already sent my app for 3 days For consistent use or not at least once in a day. If they do this, then I give them a tip about the present.
Here I want to know how can I check that the user has used my app for 3 days continuously (at least my app is required to use
Store time in your app storage.
Update: / Strong> This will make 4U: Private zero application_Launching (Object Sender, LaunchingEventArgs e) {EnsureCheckThreeDaysInarow ();} Private Zero Application_Activated (Object) Sender, Activat EdEventArgs e) {EnsureCheckThreeDaysInarow ();} Public Bull Ensure Checkthread () {Separate storage settings settings = isolated storage settings. Application settings; if (settings.Compatible ("three magicals") {var data = new list & date; date time & Gt; (); if (data. Count ()> gt; = 3 & amp; !! data. Any (a = & gt; a.Date == date time.Net.Det)) data. Remove (data.min ()); data.Add (DateTime.Now); var someTransform = data.OrderByDescending (a => A) .Select (b = & gt; New Tuple & lt; int, int, int & gt; (B. years, B. Month, B. Day)). Total (C, D) = & Gt; New Tupal & lt; int, int, int> (c. ITM1 - D. ITM1, C. ITM2 - D. ITM2, C. ITM3 - D. ITM3)); If (someTransform.Item1 == -DateTime.Now.Date.Year & some Transforms. ITM2 == - Datetime.Det.Date Death and some Transforms. ITM3 == 0) {// You There Go ..} and {// handle it ...} Settings ["Three Magic Days"] = Data; } And settings.AdA ("Three Magic Day", new list & date; date time & gt; () {DateTime.Now}); return false; }
Comments
Post a Comment