Programmatically change the tile on WP7 device - windows-phone-7

I'm making an app where I would like to generate a new tile from inside the app, and then change it - no web service involved, and no need to change it when the app is not running.
Anyone know how to do this?
Cheers!

as #Derek said, you can update the tile using the tile schedule, but will take an hour minimum before the phone updates the tile.
i have written a tutorial on how to update the tile instantly here:
http://www.diaryofaninja.com/blog/2011/04/03/windows-phone-7-live-tile-schedules-ndash-executing-instant-live-tile-updates
basically it involves opening a push/toast update channel and then getting the phone to send "itself" a live tile update request. this will trigger the phone to go and get the tile "right now"
hope this helps

You can update the background image for a Live tile by using the ShellTileSchedule as documented in How to: Update Your Tile Without Push Notifications for Windows Phone. However, the image that is used for that background must come from a remote location, it cannot be provided directly by your application (unless you generate the image and send it to your own web service).
If you do go down the Microsoft Push Notification Services route, you may want to take a look at the Windows Push Notification Server Side Helper Library provided by the Windows Phone team.

You can generate and send a tile push notification message from the applicaiton itself. Not sure if it will work with an image in the app though. - Let us know if you try.

Thanks for the info!
It won't be an image from the app, as the xml files I'm downloading are pointing to the correct image. Not sure about the format, but I guess setting up my own server to proxy the request and resize the icon as needed wouldn't be too hard.
But it's really sad we cannot manipulate the tile image for 'this' from within our own app...

Related

Open Microsoft Edge while running app in Hololens

I want to open Microsoft Edge while running an app with the HoloLens. In my particular case, I'm developing a simple 2D app in Unity, where the idea is to press a button and open a pdf file, image, etc. Currently I've managed to open these files with the WWW class by pressing a button, but everytime I do it the app gets closed...
Is it possible achieve it? what would I need to implement in order to do it?
Thanks in advance!
To open EDGE or the default web browser you can use Application.OpenURL
https://docs.unity3d.com/ScriptReference/Application.OpenURL.html
In any case your app will go to the background, In case you need to show a website inside your app you will need to use any Plugin/Asset like this one https://github.com/gree/unity-webview that sadly doesn't support Windows.

Location Tracking in Background

I am developing a windows phone app that uses users current location, I am making the app in 7 OS. My question is, Can I track the location in background, that is when the screen is locked?
I know this is a possibility in wp8 as it provides us with GeoLocator class, but can I achieve this in wp7? I am basically making a runtracker app hence I would like my app to track the location even when its in background, is it really feasible?
Your help is always appreciated!!
It is possible to keep the app running under lock screen, as it does, for example, Endomondo app.
Using Idle Detection, you can keep the app on, although screen is locked, and you can keep on tracking the location. Actually, it is not running in background, but in the foreground. Just the screen is locked. So, be careful not to drain user's battery.
You have to set the PhoneApplicationService.ApplicationIdleDetectionMode property to Disabled, for example in InitializePhoneApplication() method in App.xaml.cs:
PhoneApplicationService.Current.ApplicationIdleDetectionMode = IdleDetectionMode.Disabled;
Note that there are special certification requirements for this type of apps. Refer to section 6.3 (Apps running under a locked screen) of the following page:
Additional requirements for specific app types for Windows Phone
I got the same problem in one on my apps..
I don't think it' s feasible for wp7..
Bt if you want to do it with wp8 you can refer following link.
http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj681691%28v=vs.105%29.aspx
And to know about background supported and unsupported API's http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh202942%28v=vs.105%29.aspx/css
GeoCoordinateWatcher Class exists in WP7, but here is the documentation from MSDN -
This API, used for obtaining the geographic coordinates of the device,
is supported for use in background agents, but it uses a cached
location value instead of real-time data. The cached location value is
updated by the device every 15 minutes.
More Info : http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh202962%28v=vs.105%29.aspx/css

CameraCaptureTask in Windows Phone 8 - auto saves to camera roll

I have an existing application developed for Windows Phone 7, which uses CameraCaptureTask.
The captured image is returned back to the app, which will be processed for grayscale conversion.
While testing the same app (same binary to be precise) in Windows Phone 8 Lumia 920, I figured that a copy of all the images captured through the CameraCaptureTask are saved in "camera roll" folder.
This is a bit annoying as the users of my app are not expecting the captured images crowding the "camera roll" folder. I looked up the documentation http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh394006(v=vs.105).aspx and found the below quote,
On Windows Phone 8, if the user accepts a photo taken with the camera capture task, the photo is automatically saved to the phone’s camera roll. On previous versions of Windows Phone, the photo is not automatically saved.
So far I couldn't find a way to avoid this case in Windows Phone 8.
Is there a way to turn off this feature before calling the CameraCaptureTask's Show() method in Windows Phone 8?
No. This is a consumer feature request implemented on WP8 that's transparent to developers. The usecase here is that a consumer uses the CameraCaptureTask to line up a perfect shot, doesn't use it an app for whatever reason and can't find it ever again later.
As a side-note, I actually had this happen a few times to me when using various twitter and photo editing apps and it's quite annoying.
Makes no sense. CameraCaptureTask was created to allow apps to capture photos for the app use, not for users to push them into Camera Roll. That is what Lenses are for (either custom code can write into camera roll as well).
It is not transparent to developers because one of my apps has just been removed from the WP8 market. They say because can cause "undesired upload of an app photo to skydrive".
Justin are you sure it isn't a bug? is it going to be fixed?
This forces me to break my development into 2 now: WP7 and WP8. I don't want that hassle right now...

Windows phone 7 live tiles and push notification

i need help. I have done push notification for my app. I want the tile to change to the image that the push notification sends. How do i do this. All this is to be done in one app itself. The examples that i saw in msdn and other websites show some secondary image which i dont get plus they require two app. I dont understand how it works. Please help. I want the live tile to display the image that the push notification has sent. Sample codes would be appreaciated. Please and Thank you
You may be interested in the Code Samples provided on the following site, these include sample code in both C# and VB.NET and cover various aspects of Windows Phone development, included Live Tiles :-
http://code.msdn.microsoft.com/wpapps/

windows phone push notification on tiles

i would like the app that i have created on wp7 to display alerts on the live tiles. I was going to use push notifications to do this. So, whenever there is an alert, the app will produce a push notification and then the live tile would display the push notification alert. I have tried to find sample codes on msdn and i have not found much. Does anyone know any code sample for wp7 that would help.thank you!
MSDN has extensive howto articles and sample code; there is even a How to: Send and Receive Tile Notifications for Windows Phone which sounds like it should do what you need.
This may be of help to you: Windows Phone 7 notifications. I went to a Windows Phone camp and came away feeling that there are, in fact, very distinct notifications and you have to make sure you're working with the right type for the right job. That link covers the types and their purposes, but did want to give you a heads up on that.

Resources