Widget on phone 7 - windows-phone-7

We aren't allowed to run applications in phone 7 in background..
So I thought why not create widget..
So My question is : can we as developer create and test widget on phone 7 ? if so how ?
or is there any other alternative for running application in background ?
also what are the technical limitations from a developer point of view for widget when compared to application ?

There are no widgets.
Your only widget-like option would be a live tile app that used push notifications to update the live tile which held the information.
Runs server side though, not background on the phone.

Answer is no.
With the Mango update coming out later this year they may expose APIs which will allow us to run apps in the background.
Hopefully this feature comes soon!

Related

Windows phone notification that stays till user checks

I am new to windows phone app dev. I want to know if there is any way to have a notification alive till the user checks it. I found that "toast notification" expires in 10 seconds irrespective of user checks it or not. And there is no way of finding out if a tile notification arrived or not. Is there any workaround? I want to have notifications that are similar to Android notifications which stay till user checks them.
Persistent on-screen notifications on Windows Phone are not possible, by intentional design. It's interesting to see how many users on Android disliked persistent notifications when applications started to interrupt and then disrupt the current foreground application experience.
The design philosophy is that they distract from the user experience and could be easily abused by applications.
The general Microsoft recommendation for the platform would be to use a combination of a notification, Live Tile (reference), and in application UI update.
In Android 4.3, the behavior was changed to highlight applications that were constantly running (interesting reference)
You can use "MessageBox.Show(String)".
Refer below for:
MSDN Doc
Example 1
Example 2

Is there an analogue of Windows Phone 'User Idle Detection' in Windows 8?

I've used the following code on Windows Phone 7 and 8 to disable user idle detection when my App is displaying data to the user and they are unlikely to interact with the screen e.g. A recipe App where the screen needs to stay on:
http://msdn.microsoft.com/en-us/library/microsoft.phone.shell.phoneapplicationservice.useridledetectionmode(v=vs.92).aspx
Does anyone know if there is an analogue of this available for Windows 8 applications? My tablet app has the same requirement to disable the screen turning off. I haven't managed to find anything :-(
Many thanks,
Jon
You should use the DisplayRequest class, specifically DisplayRequest.RequestActive for this purpose. You must also remember to call DisplayRequest.RequestRelease once you are done to allow the display to sleep, for example, if you are not viewing a recipe, or you are in a menu screen, etc.

Live tile inside windows phone 7 application

Is it possible to create a live tile inside our windows phone 7 application? I am asking the similar functionality as in AppHub app "...i'm a WP7!".
Please provide me input, how i can achieve this functionality?
Check out the HubTile control from the Silverlight Toolkit for Windows Phone over at codeplex.
Just be careful that it looks good and makes sense in your app - it's a very dynamic control and you can't see the Title of the control all the time.

Windows Phone 7, get apps list + screenshots

is there any chance, that (after mango is released) the third-party WP7 application can retrieve list of already installed applications ?
Is there possibility to create an application which will take screenshot on background. For example screenshot of mobile main applications list every XY seconds/minutes. I´d like to parse installed applications from that screenshot if point 1 is not possible.
Thanks for your answers...
No, there is not
No, the only way to create WP7 screenshots is from the emulator or with special engineering devices that only MS has

windows phone app running in the background

Is it possible to create an app the runs in the background? If so is there any samples out there for this?
In Windows Phone OS 7.1 you can actually use Background Agents now to perform tasks in the background.
from MSDN:
Scheduled Tasks and background agents allow an application to execute
code in the background, even when the application is not running in
the foreground. The different types of Scheduled Tasks are designed
for different types of background processing scenarios and therefore
have different behaviors and constraints.
You can use a PeriodicTask or ResourceIntensiveTasks. Read more about it in the MSDN article above.
And here's some sample code for you to integrate background agents into your existing app.
Sample Code: Background Agents in Mango
An application in the foreground can continue to run when the phone screen is locked(not background but...) by setting the PhoneApplicationService.ApplicationIdleDetectionMode property. By setting up your application to run when the phone screen is locked, a user is able to access the application quickly upon unlock. However, when your application runs under a locked screen, it could consume power outside of the user's control. For this reason, your application must minimize power usage when running under a locked screen
At the moment there is no way to create application that runs in background.
True multitasking for 3rd party Windows Phone 7 apps will come as an OS upgrade later this year. However, unless the app has to absolutely run in the background (like Pandora etc.), we as developers share some responsibility in making our apps feel at home with the rest of the OS.
Windows Phone OS offers app developers chances to save state of their applications to give the end users the feeling that it never stopped running; this is essentially the same as in other mobile platforms. As your app is being deactivated/closed, you have the option to "Tombstone" your state so that your users can come back to just where they left with BackStack navigation or future launches. Channel 9 had a nice set of demos & labs around tombstoning, found here.
Hope this helps!

Resources