[Universal Apps] Working around XamlRenderingBackgroundTask restrictions

Hi,
I'm still trying to wrap my head around the introduction of the XamlRenderingBackgroundTask for Universal apps. I'm currently planning my next app and I want it to have custom XAML bitmaps on tiles. Now I have a few questions on this:
All samples and references recommend to write the XamlRenderingBackgroundTask in C++. While I'm generally not opposed to that, I still have a few problems regarding to accessing the app's functionality while rendering the tile. E.g. I want to get
the newest updates from a server and calculate locally on what I should show on the tile. The same functionality is used within the full app and is written in C#, and I think implementing the whole functionality in C++ would be a lot of work (server
communication, SQLite and Linq usage). This
sample here shows one implementation of the XamlRenderingBackgroundTask but it is fairly limited in functionality because it only displays in time.
I have thought of a two possibilites to work around the XamlRenderingBackgroundTask restrictions and I wanted to get some opinions on what the best way would be:
Create two background tasks, one in C# and one in C++. The C# background task calculates the data that will be used and stores it locally for the C++ background task.
The problem here is: Will the memory/CPU quotas hit the limit here? How can I guarantee the sequence (First C#, then C++)?
Store the C# logic in a WinRT component and reference it from the C++ background task.
I can't imagine this works, because the C# component will load the CLR runtime and I will hit the memory limit.
Also I have another question regarding background tasks:
Are the memory restrictions cummulative or is 16 MB on a 512 MB RAM phone device an upper limit that shall never be exceeded? E.g.:
I create an image and update the tile which takes 14 MB. If I flush the tile correclty etc. do I again have 16 MB to work with or only the remaining 2 MB?
The reason I ask is, because I wanted to allow the user to pin multiple (secondary) tiles to the start screen. If I only can create a tile once, it could never update (with XAML images) the other tiles.
I'd be thankful for any thoughts on this.

Hey, thanks for the replies so far!
I don't control the server side, so I can't create the image there and push it to the device.
I definitely want to create it in a BackgroundTask, otherwise there would be no value to these Live Tiles. Now, I did some digging around and played with the XAMLRenderingBackgroundTask types in both C# and C++. I created a sample app, which monitors
the memory usage of a C++ and a C# background task and saves the results to files in the pictures library whenever the time zone is changed. You can download the source code here:
Download solution
My findings:
1. If you have two separate Background tasks registered (e.g. one C# and one C++) and both tasks are run at the same time the limit will sum up, e.g. I got 60 MB as a limit and not 30, which is nice :) This means, that I can go ahead with the two
Background tasks mailbox scenario, which will only result in a small time delay.
2. Weirdly, it appears that the memory usage of the C# Background task is sometimes lower than the C++ one. Also, I never really got the C++ one below the C# Background task. Both Background tasks inherit from XamlRenderingBackgroundTask,
but I never really try to render an image, is this the problem? Otherwise, I fail to see the reason why I can't use the XamlRenderingBackgroundTask on low memory devices ...
Sample results from the tasks:
C#
Limit: 40
Current usage: 3.296875
Usage after memory allocation: 8.59375
Concurrent: false
C++
Limit: 40
Current usage: 4.50781
Usage after memory allocation: 9.63672
Concurrent: false
C#
Limit: 60
Current usage: 6.0703125
Usage after memory allocation: 6.4921875
Concurrent: true
C++
Limit: 60
Current usage: 6.12109
Usage after memory allocation: 11.6563
Concurrent: true
Limit 40 means the debugger is still attached, otherwise the limit is 30 because I have a Lumia 925.
Any ideas?

Similar Messages

  • Number emails from iCloud...per day. I need a work around the restriction

    I use a MacBook Pro, lots of memory, drive space etc. That is not the problem. I am the President of a Mac club, 749 members and membership person of our fishing club, 78 members. I send out many emails each day. iCloud prevents me from sending due to the restriction they place on iCloud. Anyone have a work around?

    The backup is encoded as a SQLite database.  It can't be read without special software.  All the "files" you see inside the backup file are different components of the backup, not different backup files.  I believe the reason that not all the dates match the date of the backup is because the backup file components are only updated when you sync rather than recreated from scratch, so not all the components are new.
    To read and extract data from the backup you have to use 3rd party software such as iPhone Backup Extractor.

  • I am running Lion (OS X 10.7.4) and trying to reinstall iLife06, a .mpkg file, using Installer.app.  I get a message "You can't open the application iLife06.mpkg because PowerPC apps are no longer supported."  Is there a work around??  Thanks in advance!

    I am running Lion (OS X 10.7.4) and trying to reinstall iLife06, a .mpkg file, using Installer.app.  I get a message "You can't open the application iLife06.mpkg because PowerPC apps are no longer supported."  Is there a work around??  Thanks in advance for any help that can be provided.

    The only workaround would be to purchase the current version of iLife apps from the App Store.
    Lion doesn't support the old PowerPC architecture anymore, which is what iLife '06 was written for.
    If the internal apps are universal, right-click on the mpkg and choose Show Contents. Then, dig through and run the specific installer package for each application.

  • I have an Iad2 and ever since ios6-there are issues.I get occasional lock-ups and have to reboot. The WSJ app freezes when running their videos to the end. The only work-around is to stop the video before it's over. Worse than windows me !!!!!

    My Ipad2 worked perfectly before ios6 upgrade. It now freezes occasionally and I have to reboot to get it to work. Also the WSJ app will now freeze if I try and run one of their videos that is imbedded in the article. My only work-around is to stop (press done) before the end of the video or I have to do a total reboot. The problems remind me of Windows ME . Will Apple resolve these issues or become more like Microsoft. Hopefully there will be a restore button in the future like Microsoft was forced to do because a lot of upgrades are just terrible. Am I crazy or are there other people having the same issues with ios6, or could this just be a coincidence and my ipad2 is starting to fail just when ios6 arrives ?

    I know this will not help but, the bluetooth headset I purchased for my wife works great and it pairs with our car and our sound bar in the livingroom (Motorola Droid Razr) 98.72.16.XT912.Verizon.en.US
    However I did not upgrade over the air but from a android web site and placed it on my external sd card. I believe this made the difference in why we had no issues and upgraded functionality has been great.
    Please note when I mention these bluetooth devices I mean the Razr connects with no problems.
    It also had no internet issues and none of the problems others have complained about in other threads.
    unfortunately when you say thousands have these issues I cannot say that is accurate. The hope is when large numbers of owners have updated to the Jelly Bean and are complaining inmase then Motorola will issue a patch to verizon to get out to the affected users.
    Of course now that Google owns Motorola Mobility and has laid off loads of workers it may never issue an os patch.

  • The App Store asks to "verify" my personal information, For my name, state, credit card, etc. I don't even live in the US and I don't have a CC, nor do I want to give away my personal information. I just want to download free apps. Any work-arounds?

    Title says it all.
    I'm really getting sick of websites getting more and more into your business. Google forcing you to get a G+ account and asking for your identifying information, for example (like your phone number).
    It's extremely irritating, and I'm opting out of everything that enforces the such. If Apple begins pushing like this, I will just close my relationship with the company and obtain apps by using third-party software to force them onto the phone.
    But before going that far, I'd like to find work arounds.
    First of all, I don't even know why it asks me for my "state". I don't even live in the USA anymore, as I moved to China (though I won't use the Chinese store as I don't speak or understand the local language, which is Chinese).
    All I want... is to continue using the English App Store to get free apps from here in my home in China, without getting stopped by Apple asking for more info on me. I don't want to share my name, I don't want to share my address, and I can't even complete the form as I no longer have a "state" and don't have any credit info.
    So that's just that. If there's no way around it I'll find another way to install apps without the App Store.
    Sorry for the message tone, I'm just really irritated with the way the internet is getting.
    Thanks in advance!
    - Alex

    The living issue is complex in my case. Legally speaking, I have no personal residence globally. I just live wherever my father goes, which is everywhere. I'm an expat and it seems that these sites aren't really expat-friendly. They seem to be built for localization and assume everyone stays in the same place.
    I don't know what I'd be considered. I'm a US passport holder and live in China, but I only speak some Chinese and I can't read it (it using non-latin characters is just too much for my mind's memory to handle). Besides that, I'm not interested in popular Chinese apps. They tend to just be annoying and kooky and generic and put together badly, often full adware and spyware (speaking for most Chinese software, in fact). In fact, a lot of apps I want are illegal in China (YouTube, Facebook, etc) and I use a VPN to use the services. I assume I wouldn't find these apps on the Chinese store. In fact, last I checked, there wasn't many English apps on the Chinese app store. This is probably due to their strict moderation or something.
    I've been going to international schools since I got here and college would be in English too. I can speak some Chinese, but not read it.
    Well, I guess the answer is that I can't use the App Store in English. So I guess I'll just sign out everything on my phone involving my Apple account and just start using third-party tools to do my business.

  • Syncing of Apps and a Work Around I Thought Of

    (this is an excerpt from a previous thread which was not answered - if you could kindly help me out with this and offer your expertise it would be greatly appreciated. Thanks!!)
    Hi All,
    I know this will be quite a change of tone from what you've been getting so far here in this thread, but I want to start of by saying thank you, for all the help and guidance you have been and are giving us. I greatly appreciate it.
    I have a question on apps folder structure upon restoring from backup. I will share with you the chronology of events, what I understand, what I hope to achieve and what ways I think this can be achieved. By sharing with you my whole thought process, I hope to get your critique and correction if at any part I have misconstrued the logic. Thanks in advance again.
    I have 2 iPhone and 2 iPads. When I bought my first iPad (brand new) I plugged it into iTunes and did a restore from my iPhone 4G backup. I believe I selected "Sync Apps" (though I can't confirm now cause I formatted my computer already) because all my iPhone apps were synced to my iPad - which is great. Q1 --> Because I restored from my iPhone 4G backup which presumably had "Sync Apps" checked, I believe my first iPad's iTunes syncing options also had "Sync Apps" checked as well - reason is that all the "Music", "Movies" and "Photos" options were also transferred over. Am I correct? Thanks
    So for the rest of the post, I will assume the iTunes setting for my 1st iPad was set to "Sync Apps" (until you correct me otherwise).
    My computer was running a bit crappy --> Windows, I know haha, so I formatted it. I did not save my backup file to an external harddrive and then put it back into the %appdata% iTunes Mobile Sync folder. Therefore after formatting, I plugged my iPad into the new computer and did a backup. Because (if I remember correctly, - (Q2) please correct me if I am wrong) it sensed my iPad as connect to a previous iTunes it asked me if I wanted to disconnect from the previous iTunes and sync to this one cause I do know that we can only sync to one iTunes at a time. I had to re-configure all my "Music, "Movies" and "Photo" settings again as this was a new iTunes configuration - which I do understand. Q3 - if I have a new iTunes because I formatted my computer, but I ported over the old backup file and restored my iPad from there, would it still be considered a new iTunes link and thus I have to configure everything again? I don't think so cause the backup contains all the settings; what I think will happen is that I will just be asked if I want to disconnect from the old iTunes and connect to the new one, and all my settings will be restored from the backup.
    So I synced my "Music", "Movies", "Photos" and also "Info" and "Podcasts" (I don't use "TV Shows") and got it all set up. Only thing I didn't tick was the apps - perhaps cause I didn't take the time to understand it previously owing to the fact that I didn't need to then ha, but now I do!! So after everything was synced, I did a backup. After reading your thread, and the link you gave, I understood that I have to transfer purchases from my iPad because my iTunes had no apps - as it is a "new iTunes". So I transferred my purchases.
    Next I joined my 2nd iPad (second hand iPad) and did a "Restore" (If you are experiencing problems with you iPad, you can restore its original settings by clicking Restore.) to wipe out apps etc that the previous owner had. Q4 - what is the difference betwixt the "Restore" in iTunes below "Check for Update" and the iPad's "Settings" --> "General" --> "Reset" --> "Erase All Content and Settings"? I believe (with some experiments ha) the "Restore" in the iTunes will give me a "brand new" iPad but I don't know what is the difference betwixt that and "Erase All Content and Settings".
    I then restored from the backup of my 1st iPad. But remember just now I mentioned that I did not tick the "Sync Apps" in my 1st iPad's settings? So after the restore was done, I had all my "Music", "Movies" and "Photos" + "Podcasts", "Info", everything but my "Apps" --> because I didn't tick "Sync Apps" in my backup. So my 2nd iPad had everything but "Apps".
    Now I need to rectify that and create a mirror of my 1st iPad. I don't jailbreak my iOS devices and all my Apps are bona fide purchases with my hard earned money . Here is the solution I thought of and the single problem I face.
    Solution: On my 2nd iPad, click Sync Apps, select all the apps I want in my iPad, and then click Apply. Then I restore the backup of my 1st iPad. That restores all my app data and very importantly, my folder structure (cause when we have a lot of apps and we organise it all into folders, re-putting them back into folders can be quite time consuming; quite the antithesis of computing in the first place).
    This truly give me a mirror image of my 1st iPad (please kindly correct me if I am wrong). The only problem is that, the Sync Apps is still not ticked. Q5 - Is there any benefits of my ticking "Sync Apps" vis a vis doing it this work around method? (Update: I thought of something - "Sync Apps" would allow all the apps on my iPad to be automatically synced to my iTunes but for my work around, I need to think of all the apps I want on my iPad and tick them. If it is for example 50 out of 50 apps, it's simple. But if it's 50 apps out of 150 apps in my iTunes then it would be a big headache. Any other benefits / costs?) My "File Sharing" is still working ok - in the sense I can still transfer data to my apps without having it synced (thankfully it is not sync dependent - but please once again correct me if I am wrong).
    The reason why I do this work around method is because if I were to click "Sync Apps", it would get all my apps into my iPad but it would destroy all my folder structures. Q6 - however if I do this "Sync Apps", when the apps are transferred to my iPad I would have all the app data on my iPad already right? Because I postulate it work on a n-tier abstraction separating data from the app. I think this is true because previously I restored from backup and had some apps missing, but when I downloaded the app all the data was "magically" there.
    Q7 - is there any way to maintain apps folder structures when I am syncing to a new iTunes instead of the work around I have thought of?
    Q8 - and last question haha. My iPad has 10 3rd party apps now for example. If I backup now, it would backup the app data of all 10 apps (3rd party apps - notation left out for simplicity sake moving forward). However if I deleted 2 apps from these 10 apps, then if I backup the 8 apps, would it mean that the backup no longer stores the 2 deleted apps's app data? I think that would be the case but I would just like to confirm.
    Thank you for reading my very long post and I really appreciate all your help, Allan and all others. Looking forward to your advice, guidance and response!! Thank you once again!!!
    P.S. does iTunes lag quite a bit in Windows (if you are a Windows user)? For me it's not the quickest programme around; can get quite laggy sometimes, on my newly formatted and empty 64 bit 4GB Dual Core 2.4 GHz HP TX2 and Acer computer as well

    If you restored to factory settings/new iPod and still have the problem that indicates a hardware problem.
    Make an appointment at the Genius Bar of an Apple store..
    Apple Retail Store - Genius Bar

  • Itunes 11.1.5 will not sync new apps with iPhone 5 iOS 7.0.6 and gives grayed out "install" no message?  How does one work around this?

    Itunes 11.1.5 (MacBook Pro,OS 10.6.8) will not sync new apps with iPhone 5 iOS 7.0.6 and gives grayed out "install" no message?  How does one work around this?

    Just reboot your laptop... While its rebooting try to reboot your phone also by holding the home and power buttonn for 10-15 seconds...When your phone is turned off try to connect it to iTunes and it will recognize your phone in recovery mode.
    If you have the .ipsw file for iOS 7.0.6 saved in your desktop then in itunes press shift and click on Restore.
    Select the ipsw file and let it restore.
    If you dont have it downloaded then simply click on restore.
    I hope it works
    Cheers !

  • In OBIEE mobile apps designer there is no option for multi select prompts?The navigation page gives option only for single select?Is there a work around for this?

    In OBIEE mobile apps designer there is no option for multi select prompts?The navigation page gives option only for single select?Is there a work around for this?

    Nic, for me the iTunes window looks like this, when I connect my iPad 3:
    I select the iPad in the "devices" section of the Sidebar (use: "View > Show Sidebar" if the sidebar is hidden).
    Click the "Apps" tab in the "Devices" pane.
    Scroll all the way down in the Devices pane to "File Sharing" "Apps" section.
    Then do I click "GarageBand" to select the documents in the right panel.
    Which part is different for you? Perhaps you could post a screenshot?
    Regards
    Léonie

  • I upgraded to GB 10.0.2.  But now its sandboxing 3rd pty apps and plugins can't connect to license manager. a Work around?

    I had been using Garageband and downloaded some 3rd  party apps which worked great, among them was BFD ECO.  I just upgraded my iMac to Yosemite and so I could upgrade to the Garageband 10.0.02. Great program, however, BFD ECO no only opens in plugin window in an error message that says, " Can't open BFD ECO because can not locate the license manager. I contacted BFD who told me that the license manager can't connect to garageband because its being "sandboxed", due to changes in the new GB and to contact Apple for a work around. Thanks for your help.

    I had been using Garageband and downloaded some 3rd  party apps which worked great, among them was BFD ECO.  I just upgraded my iMac to Yosemite and so I could upgrade to the Garageband 10.0.02. Great program, however, BFD ECO no only opens in plugin window in an error message that says, " Can't open BFD ECO because can not locate the license manager. I contacted BFD who told me that the license manager can't connect to garageband because its being "sandboxed", due to changes in the new GB and to contact Apple for a work around. Thanks for your help.

  • I gave my granddaughter a mini.  She says she can only text message to other IOS devices.  Is this true?  If so, is there a work around app?

    I gave my granddaughter a mini as a gift.  She says she cannot text message to non Apple users.  Is this true?  If so, is there a work around app?

    With the imessage app that is pre installed on the device it only works with idevices. But there are many free apps for texting. For example text free is a great one.

  • XmlResolver is not working in Windows Phone 8.1 Universal Apps

    XmlResolver is Working in WP8.0, But when coming to in WP8.1 Universal Apps it is not working.
    XmlReaderSettings settings2 = new XmlReaderSettings
    XmlResolver = new XmlXapResolver()
    Devi Prasad.P

    The XmlXapResolver is not supported in Windows Phone 8.1
    Universal Apps . Try use the XDocument class in Windows Phone 8.1 Universal Apps. 
    I sale myself ONLY half CNY!

  • Updating apps issue (3/26/2015): verified work-around

    If you have the issue where the App Store on your iOS device is displaying an OPEN button rather than an UPDATE button, here is the current work-around. Thanks go to "jguchte2" from the following topic https://discussions.apple.com/thread/6593179?start=15&tstart=0
    jguchte2 wrote:
    "Force-close the App Store app
    Open the App Store app
    The app starts at the tab "Featured"
    Now comes the tricky part: press the "Updates" tab and immediately the "Update All" button. Apps should now be updating."
    In addition, I myself have found the following...you need to let at least one app update completely for the issue to clear. If you have multiple devices, you need to do the same procedure for each device. Clearing it on one device has NO effect on other devices you may have, despite logging out/logging back in to your App Store account.

    Well, despite this work-around initially working, the App Store and it's problem with updating apps has once again returned after working for about 1/2 hour. I'm not going to fool with this anymore as it seems to be totally on Apple's end. If I need an app updated, I'll do so through iTunes and sync the updated app over to the device.
    Hopefully, Apple will resolve this in a decent time frame.

  • Want to read usa today on ipad. their site says adobe flash player not supported on ipad. any app for work around?

    i want to read usa today on ipad and their site says i need adobe flash player yet the adobe flash player is not supported by ipad. how can i work around this and read usa today on my ipad?

    Here is a link to the USA Today iPad app.
    http://www.usatoday.com/ipad/

  • End of GOOGLE SYNC work around (or app) for WIRELESS sync for Gmail calendar

    thnx for help !
    i use my google calendar exclusively -no Outlook at all, no desktop manager ever.
    With my Curve  i used to use GOOGLE SYNC to immediately update and sync manually.
    There is no more GOOGLE SYNC (support ended) ...  Not for my new Tour as it still was working on Curve 12/12/12.
    I timed my update I made on my Google calendar online and it took 30 minutes for the bbery calendar to show the update using the wireless sync in the Tour setup.
    HOW CAN I MANUALLY tell my bberry to sync wirelessly instead of waiting for however long it takes to auto sync ?
    Why did it take so long?
    is there a WIRELESS work around or an APP  for the end of Google sync?
    Using Tour 9630
    thanks again!

    Could you please ellaborate on which other helps, you've tried?
    Data plans are not available for 9780 in Denmark, rendering me unable to access my Google Calendar, except from going through a browser - not ideal, by any means.
    So... Any workaround would be appreciated - even only for primary calendar. 
    I know Nokia has working apps such as Googasync, but I'm unable to find similar for BB (which is curious, as they are both based on S60).

  • C# Universal App Unity bad card game render

    Hello,
    I am working on a card game designed in Unity and I am getting some blurry rendering.
    I thought perhaps someone here may know why.
    I only get strange rendering when building for Windows Store and Window Phone.
    Building for Desktop does not have rendering issues.
    Below are links to the rendered output.
    Desktop:
    http://1drv.ms/1GzQ7Qh
    Windows Store:
    http://1drv.ms/186ocZK
    Windows Phone:
    http://1drv.ms/186oi3A
    Why is the Windows Store build blurry?
    Notice that the Windows Phone render has even more problems.
    There appears to be what I think is an antialiasing problem on the right and top edges of the images.
    Notice that the empty hand with the no score disk, has noticeable streaks up and to the right.
    Also notice that the cards have a black rectangle to the right of them.
    I believe this is happening because I do not have a completely transparent border around the png file.
    All images are textures on a Unity plane object.
    The Windows Store and Windows Phone build were created as C# Universal App solution.

    Hi Takimchu,
    If you are asking unity render problem, I would recommend you post your question on unity community forum. This forum is to discuss questions about windows store app.
    http://forum.unity3d.com/.
    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

  • Sending email to 10,000 addresses without knowing Host and Protocols!!

    Context: I am building an "eMail Marketing Campaign" application which takes a list of email addresses (unlimited) and sends an eMail to all of them. My servlet creates an instance of "MyMailHandler.java/class" and passes a list of addresses. Problem

  • Status Profile Issue

    Dear all, I have a doubt in status profile setting that, if i have 5 approal levels at SO level. 1 is created, 2.Need modifications, 3.asst manger app, 4..manager, 5.Final approved. In this at level 1 we can make changes in SO. but SO is updted to le

  • Cell Phone Signal Noise

    Hi there, I have recorded an interview but a problem I have is that there is feedback coming through from a cell phone. The noise is that of a beeping like when a cell phone is connecting to a base station. I want to remove this from the interview. A

  • Rd-metadatatool still broken in 2.4.0 RC1

    It looks like the rd-metadatatool is still broken in the RC1 build. The compiled Test class is located in the same directory as the source file and can be found without problem by loading the class from another file. Does the rd-metadatatool use mult

  • How well does Qmaster via Compressor work with FCP 7?

    How well does Qmaster via Compressor work with FCP 7?