AMAN BHARDWAJ
AMAN BHARDWAJ

Reputation: 21

how to check the app is installed for first time

is there a way to check the app is installed for first time.I want this info cause i want to provide a small introduction session about the app features when user run the app for the first time.I want this to develop in windows phone 8.1 in c# any help is welcome

Thank you

Upvotes: 1

Views: 180

Answers (1)

Xanatos
Xanatos

Reputation: 445

Maybe somethink like this:

On ApplicationStart:

Windows Phone 8:

if (!IsolatedStorageSettings.ApplicationSettings.Contains("FirstStart"))
{
    //ShowTutorial
}else
{
    IsolatedStorageSettings settings = IsolatedStorageSettings.ApplicationSettings;
    if (!settings.Contains("FirstStart"))
    {
        settings.Add("FirstStart", "false");
    }
    //Start normal.
}

Here is a quickstart about Application Settings on Windows Phone: https://msdn.microsoft.com/en-us/library/windows/apps/jj714090%28v=vs.105%29.aspx

Windows Phone 8.1

On ApplicationStart:

var localSettings = Windows.Storage.ApplicationData.Current.LocalSettings;
if (localSettings.Values["FirstStart"] == null)
{
    //ShowTutorial
}
else
{
    localSettings.Values["FirstStart"] = "true";
}

https://msdn.microsoft.com/en-us/library/windows/apps/windows.storage.applicationdata.localsettings.ASPx?cs-save-lang=1&cs-lang=csharp#code-snippet-2

Upvotes: 2

Related Questions