Can i change battery level in windows phone 8 in emulator.I want simulate Resource-intensive task is not work under %90.Can i set battery level for windows phone emulator ?
I don't think it's possible to organically activate ResourceIntensiveBackgroundTasks in the WP8 emulator. If you're trying to activate it for testing purposes I'd use ScheduledActionService.LaunchForTest("myService") method instead.
As you mentioned, ResourceIntensiveBackgroundAgents don't run on devices with less then 90% full charge as stated on MSDN.
Resource-intensive agents do not run unless the device’s battery power
is greater than 90%.
If you want to real-world test that for whatever reason, it's best to do that on a real device.
Related
I want to find the limit of my app's ram so that i can design my app properly.
Earlier in windows phone 8 there was a class named DeviceStatus which could provide me with this result but in windows phone 8.1 that class has been removed. So could anyone provide me with an alternative of this class for windows phone 8.1
The new class you're looking for is Windows.System.MemoryManager; in particular, the AppMemoryUsageLimit property.
This value can vary based on the amount of RAM the device has, and whether or not the process is a background task.
For 512MB RAM devices, the limit is 185MB.
For 1GB RAM devices, the limit is 390MB.
For 2GB RAM devices, the limit is 825MB.
You can't extend the memory limit.
I have been working on a project with Direct3D on Windows Phone. It is just a simple game with 2d graphics, and I make use of DirectXTK for helping me out with sprites.
Recently , I have come across to an out of memory error while I was debugging on 512mb emulator. This error was not common and was the result of a sequence of open, suspend , open , suspend ...
Tracking it down, I found out that the textures are loaded on every activation of the app, and finally filling up the allowed memory. To solve it , I will probably go and edit it so as to load textures only on opening but activation from suspends; but after this problem I am curious about the correct life cycle management of texture resources. While searching I have came across to Automatic (or "managed" by microsoft) Texture Management http://msdn.microsoft.com/en-us/library/windows/desktop/bb172341(v=vs.85).aspx . which can probably help out with some management of the textures in video memory.
However, I also would like to know other methods since I couldnt figure out a good way to incorporate managed textures into my code.
My best is to call the Release method of ID3D11ShaderResourceView pointers I store in destructors to prevent filling up the memory , but how do I ensure textures are resting in memory while other apps would want to use it(the memory)?
Windows phone uses Direct3D 11 which 'virtualizes' the GPU memory. Essentially every texture is 'managed'. If you want a detailed description of this, see "Why Your Windows Game Won't Run In 2,147,352,576 Bytes?". The link you provided is Direct3D 9 era for Windows XP XPDM, not any Direct3D 11 capable platform.
It sounds like the key problem is that your application is leaking resources or has too large a working set. You should enable the debug device and first make sure you have cleaned up everything as you expected. You may also want to check that you are following the recommendations for launching/resuming on MSDN. Also keep in mind that Direct3D 11 uses 'deferred destruction' of resources so just because you've called Release everywhere doesn't mean that all the resources are actually gone... To force a full destruction, you need to use Flush.
With Windows phone 8.1 and Direct3D 11.2, there is a specific Trim functionality you can use to reduce an app's memory footprint, but I don't think that's actually your issue.
Some Windows Phone Model has different ROM version, for example, HTC 8x has two versions, 8g and 16g. How can I know my device is which one through API?
As far as I know, you cannot get it. You could create a mapping from the device ID to the actual size, but that wouldn't work for the future devices.
I have an issue with background agent execution in Windows Phone 8.
After a successful agent registration it wasn't executed by OS.
I waited 5-10 days - no effect.
The issue is reproduced ONLY on two test devices (lumia 920 and htc x8).
All other devices shows normal agent execution log (about 5 other devices).
You can find the sample by the following link:
https://dl.dropboxusercontent.com/u/19503836/2013-12-19%20TestApp_Release_AnyCPU_v1.2.xap
XAP:
https://dl.dropboxusercontent.com/u/19503836/SimpleAgentApp.zip
App registers clean agent and tracks agent launches
App user interface displays that log
no extra logic
no time/memory consumable operations, it is almost clean project
device battery level is over 50% all the time
battery saver mode is disabled
device has Cellular and Wifi access all the time
device is used frequently
it seems that other background agents are also not executed by OS
What could be wrong with background execution in system?
How can I diagnose the issue?
I'm trying to find the issue for several months without any luck.
It turned out that those devices had some OS issues.
One test device was fixed by a hard reset and another one by a firmware update.
Lets say that I have a device, such as an android phone (just for example) and I have the firmware for that device. Is there a method to emulate the entire firmware? Just like a virtual machine but for firmware that is not designed to run on normal x86 processors. I was looking into it and I think qemu might do what I need but I wanted to see if anyone had any experience with something similar.
Thanks, and sorry if its a noob question
PS, the firmware I have is designed to run on ARM processors
you need to emulate the hardware.
an operating system or firmware directly interfaces with hardware... like the display, touch screen, buttons, speakers, wireless chipset, etc.
to make the operating system work on different hardware, you either need to program it to accept the available hardware (such is more easily possible in the case of an open-source operating system like android), or provide it with simulated hardware identical to the original device.