Store integer list in Windows Phone Memory

Hi!
I need to store a list of integer values in the Windows Phone (8.1) memory, preferrably using the Windows.Storage namespace as an ApplicationData.LocalSettings. How may I acheive this?
I tried doing the following to create a new List<int> out of a key stored in the the LocalSettings.Values dictionary;
using Windows.Storage;
var AppSettings = ApplicationData.LocalSettings;
List<int> IntegerList = new List<int>();
try {
IntegerList = (List<int>)AppSettings.Values["IntListInMemory"];
catch { }
return IntegerList;
I apologize if my code is unprofessional and buggy (it is, because it throws an exception regarding an un-supported data type); I'm a nnewbie to WP 8.1 Dev. 
Tx. :)

Well if IsolatedStorage is acceptable, then a simple code could do that:
IsolatedStorageSettings settings = IsolatedStorageSettings.ApplicationSettings;
List<int> ListObj= new List<int>();
ListObj.Add(1);
ListObj.Add(2);
ListObj.Add(3);
if (!settings.Contains("IntKey"))
settings.Add("IntKey", ListObj);
settings.Save();
// And to retrieve the list:
List<int> ListObj= readSetting("ListObj") != null ? (List<int>)readSetting("ListObj") : new List<int>();
http://developer.nokia.com/community/wiki/Using_Crypto%2B%2B_library_with_Windows_Phone_8
Hi Vineet24,
I think IsolatedStorageSettings will not be supported in windows phone 8.1(xaml), are you sure about it ? Just curious to know.
Pradeep AJ

Similar Messages

  • Getting error while submitting application (Windows Phone 8.1 Silver Light Application).The native API api-ms-win-core-synch-l1-2-0.dll:OpenEventA() isn't allowed in assembly . The Assembly is WindowsPhoneSilverLight 8.1 Runtime Component.

    1028: The native API api-ms-win-core-synch-l1-2-0.dll:OpenEventA() isn’t allowed in assembly AnylyncRuntimeComponent.dll.
    Update it and then try again. 
    1028: The native API api-ms-win-core-synch-l1-2-0.dll:CreateEventA() isn’t allowed in assembly AnylyncRuntimeComponent.dll.
    Update it and then try again.
     1028: The native API api-ms-win-core-synch-l1-2-0.dll:CreateEventExA() isn’t allowed in assembly AnylyncRuntimeComponent.dll.
    Update it and then try again.
     Can please help to fix this issue . 

    Are you calling OpenEventA, CreateEventA, or CreateEventExA? Those look like legitimate errors: OpenEventA, CreateEventA,
    and CreateEventExA are not supported in Windows Store or Windows Phone apps. OpenEventW and CreateEventExW are allowed so you can use those instead.
    And is this a Windows Store app or a Windows Phone Silverlight app? You gave different details on StackOverflow than you
    do here.

  • Windows Phone Language Support

    I am developing an app that is supposed to support 4 languages, "en", "fr", "de" and "lb". Locally, all works fine, but when generating the App packages, I get the error that not all languages are supported.
    I realized that the language "lb" (Luxembourgish) is well supported for Windows store, but not for windows phone store applications.
    - Is my understanding correct?
    - Is there any plan to also support "lb", "lb-LU" for windows phone apps in the future?
    Many thanks,
    Alain

    Your understanding is correct.
    We don't know about any future support.  You can sign up for the
    Windows Insider Program to get the latest information on that. 
    Here is the document for supported languages on the phone:
    https://msdn.microsoft.com/en-us/library/windows/apps/hh202918(v=vs.105).aspx
    Bret Bentzinger (MSFT) @awehellyeah

  • Thinking about selling Iphone 5 for new WIndows Phone

    So I am a new Iphone 5 user. Went from a Motorola Droid to an Apple product. I must say I like the Iphone 5, but I like the new windows phone. I have even thought about selling my Iphone 5 to get the Windows phone. ANyone have any thoughts about the windows phones compared the the Iphone 5?

    As a past user of an iPhone 4 and a Windows Phone 7.5 device, I would say that the user experiences are similar, with the exception of far fewer apps being available for Windows Phone.  However, there are several apps available and I could find a livable level of satisfaction with the app selection.  There are fewer accessories available for any Windows Phone device (or any other phone, for that matter) than for the iPhone.  One thing that I think that has changed for Windows Phone 8 is that users will no longer sync through Zune on the PC.  I'm not up-to-speed with this part, so if this is important to you, you might want to research this further.
    The other thing that may impact your user experience would be how integrated into Apple's ecosystem you are.  Even though you said that you just got the iPhone 5, I don't know if you are an iPad or iPod user that relied on iTunes for content management.  Your other ecosystem concerns would include whether or not you use iCloud for media storage and whether or not your friends send you text messages in iMessage.  If none of these things are big deals for you, then a switch to a different mobile OS may be fine.
    Your other differences are your hardware differences.  You didn't name a specific Windows Phone device, but I think that every Windows Phone that is coming out is larger than an iPhone 5.  Were you attracted to the thin and light profile of the iPhone 5, or did you think that the screen was too small?  The cameras on the iPhone 5 and the upcoming Windows Phone devices are said to rival each other, so that probably won't be a major consideration for you.
    There are many other things to consider, but hopefully my questions will remind you of what you consider to be important, and you can go from there.  I always recommend hands-on time with a new device that you are considering, so go to stores to try out Windows Phone devices to get more of a feel for them.

  • Out Of Memory Exception While Loading Images in Windows Phone 8 Silverlight App?

    Hi,
    I am developing a windows phone 8 silver light app , I am loading high resolution images from web  through image control , After loading 2-3 images I am getting outof memory exception ,
    I am unable to catch this , and I am unable to break this exception , Can anyone tell me how to handle this exception,
    I am searching solution for this  from last 15 days but I am unable to find solution,
    I tried by setting the bitmap image source to null by doing this also I am getting exception, I tried by using gc.collect() also ..
    First I am loading list of images in listbox with lowres of size 100X100 , in selection change event I am changing the image source , 
    My image control code is
    <Canvas Width="480" Height="720">
    <Image Width="480" x:Name="MyImage" Height="720" Stretch="Uniform" >
    <Image.Source>
    <BitmapImage x:Name="MyImage1"/>
    </Image.Source>
    <toolkit:GestureService.GestureListener>
    <toolkit:GestureListener Flick="GestureListener_Flick_1"
    PinchStarted="OnPinchStarted" DragDelta="GestureListener_DragDelta"
    PinchDelta="OnPinchDelta"/>
    </toolkit:GestureService.GestureListener>
    <Image.RenderTransform>
    <CompositeTransform x:Name="myTransform"
    ScaleX="1" ScaleY="1"
    TranslateX="0" TranslateY="0"/>
    </Image.RenderTransform>
    </Image>
    </Canvas>
    My listbox selection changed code is
    GC.Collect();
    GC.WaitForPendingFinalizers();
    Classes.PgaeInfo ob = listpages.SelectedItem as Classes.PgaeInfo;
    progressLoad.Visibility = Visibility.Visible;
    LayoutRoot.Opacity = 0.8;
    LayoutRoot.IsHitTestVisible = false;
    StackPanel st = sender as StackPanel;
    index = ob.pId - 1;
    JArray jsonArray = JArray.Parse(json);
    JToken jsonArray_Item = jsonArray[index];
    string sour = "xxx.xxx.xxx.jpeg" (only one image for sample)
    img.Source = null;
    DisposeImage(bm);
    img.Source = new BitmapImage(new Uri(sour));
    MyImage1.UriSource = null;
    MyImage1.DecodePixelHeight = (int)img.Height;
    MyImage1.DecodePixelWidth = (int)img.Width;
    MyImage1.UriSource = new Uri(sour);
    Any help..
    thanks..
    Suresh.M

    Hello Suresh,
    Are you loading multiple images at once on one page? If so this is an expected behavior. There is limited memory available per app so it's important to not load too large or too many photos at once in your app.
    If possible you can try to convert your Windows Phone 8 to Window Phone 8.1 so as to take advantage of the FlipView control which is built to handle photo gallery-like applications.
    Also you can always run the Windows Phone Application Analysis tool to check on the application performance and memory usage. This will help you test and fine tune your app accordingly.
    Let me know if this helps.
    Abdulwahab Suleiman

  • A wish list for Nokia's next flagship Windows Phon...

    Two months left for Nokia World in september. I think everyone is excited for it. Nokia will introduce its newest flagship Windows Phone 8 "Lumia". If Nokia wanted to succed, here's a list of "to-dos" Nokia engineers should care about.
    - A thin, solid design: I don't really care about how thin the phone is... But there are many people that were dissapointed with how thick and heavy the Nokia Lumia 920 was.
    - A "Real" PureView camera with Zenon flash: The Lumia 920's camera is already perfect, but is it actually PureView...? you can't compare it to the 1020 or the 808... Can you?
    - Snapdragon 600 processor: Windows Phone 8 doesn't really require latest - high end - processors... It just runs smoothly on every single Lumia, no matter how much it is or how low end its specs are. But the Lumia 1020 really dissapointed me. There are many 3D games coming to the store eventually.
    - SD Card slot: Yes. Yes. Yes. Please.
    - NO MORE CARRIER EXCLUSIVITY: Seriously Nokia? No body wants to wait for the Lumia 1028 to get it on Verizon Wireless... or the 1025 to get it on T-Mobile. And NOBODY is going to switch to At&t. Nobody. Let's have a look at the Samsung Galaxy S4. It launched on FIVE carriers. The result? More sales. Simply more sales.
    - A killer battery: It's Nokia! It's well known for its amazing battery life (in the past)... Only Motorola delievers a great battery life these days. I want Nokia to get back to its roots and start as the Indestructable with the endless battery life again.

    Welcome to the forum, pelister! 
    Your feedback is appreciated. Mind sharing it here as well: https://windowsphone.uservoice.com/forums/101801-f​eature-suggestions? Rest assured that we are continually looking at ways of improving to provide you with better products and services. 
    Cheers! 

  • Release is certified, but not listed in windows store

    Hi
    I updated my app and it was approved and certified on the 12/2/2015. I had a email with a link
    http://apps.microsoft.com/windows/app/islide/51ebbb45-ff17-4c4c-80fe-f9abef20f05b
    to my app but when I click on this, my app has been removed. On the dashboard it says my app has admin suspended next to it and a notification Release is certified, but not listed in windows store.
    I have tried the support pages but I cannot see where I can submit a support ticket and all the links pages cannot be displayed?
    How can I get my app listed on the store?
    Many thanks.

    Hello,
    Please use the following to
    contact support. We will be happy to review this for you.
    Thanks,
    Jonathan
    Windows and Windows Phone Dev Center Support
    Office Store Developer Support
    Send us your feedback about the Windows Platform

  • Racial discrimination exists in the Windows Phone store

    Racial discrimination issues in the Windows Phone store kill my game.
    My game suddenly disappeared in New + Rising list (Windows Phone Store)
    Just a few hours before my game (250k - Chef's Burger). Was listed around 2th place in New and rising, now I can not even find it in the list, it seems that the app has dropped out of the list completly What happend ?
    In fact, the problem is only in the US/UK Store, or other English-speaking countries Store. In Asia market, such as Taiwan, China, the problem does not exist, our games are still in New + Rising list.
    I have reason to suspect microsoft for developers in different regions have different rules. If this is true, Windows Developer team should be ashamed, this is a racial discrimination, is shameful and unfair.
    Our team is so disappointed. Even if we are not registered in the US, we still try our best to develop high quality apps and games for Microsoft Windows Phone Platform. If Windows Store want to become successful in the future, please treat every developer
    with equality.
    Microsoft killed my growing children.
    Chef's Burger
    http://www.windowsphone.com/en-us/store/app/250k-chef-burger/2f2a23e1-d83d-473a-969a-ebc416d3a728

    New and Rising is temporary, your app may not be new any more
    please be grateful you even had the spot. now it is time for other newer app got the chance

  • Voip application for windows phone 8.1 fails store submission

    A voip application with the new 8.1 architecture based on a separate process for the voip server is not accepted by the store.
    Voip architecture is based on 8.1 sample: https://code.msdn.microsoft.com/windowsapps/ChatterBox-VoIP-WP81-64921ad4
    Errors during submission:
    3011: The package is missing RpalManifest.xml. Update it and then try again.
    1028: The native API api-ms-win-core-processthreads-l1-1-2.dll:ExitProcess() isn’t allowed in assembly doubango.BackEndServerHost.exe. Update it and then try again.

    Update.  I am currently working with the sample team to update the sample.   We found the problem to be in the way the BackEndServerHost VIsual studio 
    project was created.   While we work on re-creating that from scratch, testing, and re-publishing I wanted to post what we have done so far in case anyone 
    wants to move forward.
    First there are a couple bugs in the sample, maybe you worked around those already in your development but in case not here they are.
    In the backendaudio.cpp BackEndCapture::InitCapture I changed the code:
    if (SUCCEEDED(hr))
    WAVEFORMATEX format = {};
    if (SUCCEEDED(hr))
    FillPcmFormat(format, m_pwfx->nChannels, m_pwfx->nSamplesPerSec, m_pwfx->wBitsPerSample);
    m_sourceFrameSizeInBytes = (format.wBitsPerSample / 8) * format.nChannels;
    hr = m_pDefaultCaptureDevice->Initialize(AUDCLNT_SHAREMODE_SHARED, 0x88140000, 1000 * 10000, 0, &format, NULL);
    The m_pwfx was already retrieved via GetMixFormat earlier, just use that.  Don’t create a custom one.
    In the BackEndAudio::Stop routine change the order of cleanup:
    if (m_pDefaultRenderDevice)
    m_pDefaultRenderDevice->Release();
    m_pDefaultRenderDevice = NULL;
    if (m_pDefaultCaptureDevice)
    m_pDefaultCaptureDevice->Release();
    m_pDefaultCaptureDevice = NULL;
    if (m_pCaptureClient)
    m_pCaptureClient->Release();
    m_pCaptureClient = NULL;
    The next step is to basically delete the BackEndServerHost project and create a new one with the following steps.
    1)  Add a new C++ Dirext X App (Windows Phone) to the solution and name it VoipBackendServerHost  NOTE: using "." in the name causes problems, so don't use the same name as the original sample.
    2)  Remove the Common and Content Folders
    3)  Remove App1Main.cpp and App1Main.h
    4)  Contents of app.cpp should be:
    #include "pch.h"
    #include "App.h"
    #include <windows.applicationmodel.core.h>
    #include <wrl.h>
    #include <string>
    #include <stdexcept>
    using namespace ABI::Windows::ApplicationModel::Core;
    using namespace ABI::Windows::Foundation;
    using namespace Microsoft::WRL;
    using namespace Wrappers;
    HRESULT __cdecl MyGetActivationFactory(_In_ HSTRING activatableClassId, _COM_Outptr_ IInspectable **factory);
    class GetCustomClass : public RuntimeClass<RuntimeClassFlags<RuntimeClassType::WinRtClassicComMix>,
    IGetActivationFactory,
    CloakedIid<IAgileObject >>
    public:
    IFACEMETHODIMP GetActivationFactory(_In_ HSTRING activatableClassId, _COM_Outptr_ IInspectable **factory)
    return MyGetActivationFactory(activatableClassId, factory);
    private:
    HMODULE m_hMod;
    [Platform::MTAThread]
    int main(Platform::Array<Platform::String^>^)
    HRESULT hr = Initialize(RO_INIT_MULTITHREADED);
    if (FAILED(hr))
    throw std::runtime_error(std::string("Failed to Initialize(RO_INIT_MULTITHREADED), HRESULT: ").append(std::to_string(hr)));
    // Scoping for smart pointers
    ComPtr<ICoreApplication> spApplicationFactory;
    hr = GetActivationFactory(HStringReference(RuntimeClass_Windows_ApplicationModel_Core_CoreApplication).Get(), &spApplicationFactory);
    if (FAILED(hr))
    throw std::runtime_error(std::string("Failed to GetActivationFactory(RuntimeClass_Windows_ApplicationModel_Core_CoreApplication), HRESULT: ").append(std::to_string(hr)));
    ComPtr<IGetActivationFactory> spGetActivationFactory = Make<GetCustomClass>();
    spApplicationFactory->RunWithActivationFactories(spGetActivationFactory.Get());
    Uninitialize();
     5) Right click and bring up Project properties.  go To Linker->Input.
     6) Set the Configuration and Platform dropdowns to change all configurations all platforms at the same time
     7) Choose Edit for Additional Dependencies and set to this:
    $(SolutionDir)$(PlatformTarget)\$(Configuration)\BackEnd\PhoneVoIPApp.BackEnd.lib
    WindowsPhoneCore.lib
    RuntimeObject.lib
     8) Under Cofniguration Properties->General Set the Target Name to PhoneVoIP.BackEnd.HostServer and Output directory to $(SolutionDir)UI
     9) APply the settings. Then click OK
    10) Build the Proxy Stub
    11) Build the Agents
    12) Build the new Project
    13) Expand the UI (Windows Phone Silverlight 8.1) Project and find the PhoneVoIP.BackEnd.HOstServer.exe and remove it.
    14) Right click UI and Choose Add Existing and add the PhoneVoIP.BackEnd.HostServer
    This should hopefully get you moving forward.  Please test and make sure your application is working. The end result should pass WACK now.  Please let me know if there are any issues.  It is a lot of steps and I hope I didn't miss any.
    Bret Bentzinger (MSFT) @awehellyeah

  • Ive deleted contacts from my contacts list but they still pop up when i go to text and type in the name of a current contact. .  How can i delete them off my phones memory for good?

    Ive deleted contacts from my contacts list but they still pop up when i go to text and type in the name of a current contact. .  How can i delete them off my phones memory for good? iPhone 4S

    At the present time, the only way to clear that is to restore the phone as new.  Perhaps a future iOS update will give us the option to clear that cache.

  • How to disable elasticity property of list view in Windows Phone 8.1..?

    Hi,
    I am using the ListView control of Windows Phone 8.1. I am using data binding to populate the list items. It works fine. But I am able to pull the list down from the top( ie..When we pull down the list, fist item comes down and  the background color
    can be seen, and when released it goes back to normal view). As of I understand this is the default behavior of ListView. 
         How can I change this behavior..?
         It should not be rigid but scroll should end where the list item ends, not more than that...
        In shot I don't require any  elasticity property for the List 

    Use a custom control.
    Windows Phone/Windows Store

  • App Certification Fails While uploading into Windows Phone Store..

    Hi Everyone,
    I am facing an issue from last few days and stuck badly .
    Whenever i am uploading my app in windows phone store getting the below error for everytime..
    Your app submission does not include a privacy policy. Apps that use, collect, or share personal information must include a privacy policy that informs users how
    this information is used, stored, secured, and disclosed. See policy 10.5.1 for details about the requirements for a privacy policy.
    Please let me know what i need to do to resolve the above issue. What step i need to take..
    Thanks in advance!!!!

    As part of the submission process (Upload and describe your package) there is a section where you can add a privacy policy.  It is a step you need to do

  • Getting out of memory exception while loading images in web browser control one by one in windows phone 8 silverlight application?

    Hi, 
    I am developing a windows phone 8 silver light application . 
    In my app I am displaying images in web browser control one by one , those images are the web links , the problem is after displaying 2 to 3 images I am getting out of memory exception .
    I searched for this exception how to over come , everybody are saying memory profiling ,..etc but really I dont know how to release the memory and how to clear the memory .
    In some sites they are adding this
    <FunctionalCapabilities>
    <FunctionalCapability Name="ID_FUNCCAP_EXTEND_MEM"/>
    </FunctionalCapabilities>
    by doing this am I free from out of memory exception?
    Any help ,
    Thanks...
    Suresh.M

    string HtmlString = "<!DOCTYPE html><html><head><meta name='viewport' content='width=device-width,initial-scale=1.0, user-scalable=yes' /></head>";
    HtmlString = HtmlString + "<body>";
    HtmlString = HtmlString + "<img src=" + source +" />";
    HtmlString = HtmlString + "</body></html>";
    innerpagebrowser.NavigateToString(HtmlString);
    that image source is the web link for example www.sss.com/files/xxx/123.jpg .
    Note this link is not real this is sample and image is of size 2071X3097
    Suresh.M

  • How to know whether my Windows Phone 8.1 App is Associated with the store or not?

    How to know whether my Windows Phone 8.1 App is Associated with the store or not? 
    I have an Windows Phone 8 app already in the store , Now i upgraded it to 8.1 it got upgraded to Windows Phone Silverlight 8.1.
    Now iam trying to use Single Sign on feature on this app but it is showing the error message like
    the App is not Configured correctly i followed the process from  Signing users in to OneDrive
    please guide me how to do this?
    Mohan Rajesh Komatlapalli

    You should post to publish forum.

  • VS2013 - I cannot deploy and debug windows phone 8.1 store app to windows phone device

    Hello, I create a project from C#-> Store Apps -> Windows Phone Apps, but  I cannot deploy my apps to my blue device. There was a error message show "Element not found". I can run the app from Blend, and found Blend package the app to Appx
    file. Is any method that we can deploy store app into windows phone blue device directly and how to debug it on VS 2013?

    Hi,
    Welcome to MSDN.
    I am afraid that this is not the proper forum for this issue, since this forum is to discuss and ask questions about the Visual Studio Debugging tools, Visual Studio Profiler tools, and Visual Studio Ultimate IntelliTrace.
    Since your issue needs professional windows phone knowledge, and there is dedicated forums for windows phone development issues
    Windows Phone Development forums, you could choose one of its sub forums depends on your issue like  Tools
    for Windows Phone development or  
    Developing for Windows Phone .
    In addition, I did a research, you could check whether the following links help.
    http://msdn.microsoft.com/en-us/library/windowsphone/develop/ff402565(v=vs.105).aspx
    http://msdn.microsoft.com/en-us/library/windowsphone/develop/ff402523(v=vs.105).aspx#BKMK_Runanddebug
    Thanks for your understanding.
    Regards.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

Maybe you are looking for