Metro App Pin/Unpin to Start screen - c#

How do I pin/unpin an application to the Windows 8 start screen using C#?

You can pin secondary tiles to the start screen via RequestCreateAsync (or one of its variants), but this step requires user approval.
If you mean create the main tile for an application that's listed in All apps, but perhaps the user had previously opted to remove the tile from the Start Screen, AFAIK there's no equivalent API for that, and it would occur only through the user opting to do so via the Start Screen UI.

Related

Desktop Integration in Universal Windows App

Im trying to develop an app for Windows 10 which I hope to submit to the store. I want to get access to the Taskbar APIs so I can set the progress level (green bar behind the process text).
In Windows 7 I used the some of these APIs:
https://msdn.microsoft.com/en-us/library/windows/desktop/dd391692(v=vs.85).aspx
They were wrapped by this handy library which I used in my C# app:
http://blogs.microsoft.co.il/sasha/2009/02/12/windows-7-taskbar-apis/
I cant find the equvilant for UWA Desktop Extension, Any ideas?
Mike
Basically the images are comes from the app asserts, see this: Guidelines for app assets Target-based assets session for more information. The asserts are the read-only stuff and we cannot programmatically change from the code, which means we cannot create the animation on taskbar.
The APIs like ITaskbarList3 are not available in Windows Universal App.
Basically base on my understanding, Microsoft wants to use push notification/live tile also badge to deliver the current state like current progress.

Is BackgroundExecutionManager.RequestAccessAsync required to update Live Tiles on the background?

I find different instructions, for making Live Tile of Windows 8.1 app update in the background using IBackgroundTask. Others include this row
await BackgroundExecutionManager.RequestAccessAsync();
others not.
Question is, is it required for the background updating of Live Tile to work? I do NOT need lock screen access in my app, just updating Live Tile.
If you want to run a lock-screen capable background task then you need to call the RequestAccessAsync(). Here are your options:
You can create a background task that updates the live tile doesn't need lock-screen access. If you want it to run periodically regardless of whether it is plugged in, you need to RequestAccessAsync(). Here is a good article on when you should use the MaintinanceTrigger and the TimerTrigger.
You can update the live tile from your app directly.
You can create a periodic tile update using TileUpdater.StartPeriodicUpdate
In Windows 8.1, you can update the app's live tile using the TileUpdate element in the manifest (look at the Tile Update section on the Manifest Editor Application page.)
You can use push notification to update the live tile.

Auto-start or any code execution on installation of windows store app?

My very simple Windows Store App (c#) only shows some data on it's tile. To initialize it, at the moment, the app has to be started by the user which is impractical.
Is there a possibility to auto-start the app or to execute any code on installation?
AFAIK there's no way to execute any code without actually starting the app. This means that the user will need to start the app to initialize the tile and its data. You have multiple options for setting up your data then:
You can create a fixed tile directly from the app.
You can register the trigger and refresh the tile from there.
You can setup push notifications for refreshing the tile.
Considering this I suggest you try to make the best out of your app that needs to be run. For example you could show a preview of the tile and add some options for configuring it if that makes sense in you case.

Live Tiles in Windows Phone 7

Is it possible in visual studio for windows phone / C# that we can configure the application tile only.
That is ..
No Maain Page.xaml or anything.
The tile will keep on changing its background with every second of time.
Or on clicking it just a phone function will be Activated/Deactivated. (eg Bluetooth)
Please Help,
Thank you.
No this is not possible.
Tiles always open a specific page in your app. if you leave the page the default page will be opened.
Also changing the background or updating the tile can be done in a background agent at a maximum amount of once every 30 minutes.
More info on live tiles
Take a look at the "Connectivity shortcuts" app in the marketplace. they do link to specific settings screens but they can not switch the value by clicking it.

WIndows Mobile full screen problem

I have a windows mobile professional 6.1 application and I want it to be full screen in all pages so I put the code below into my every pages constructor;
this.WindowState = FormWindowState.Maximized;
this works OK but "sometimes" for example when I use
MessageBox.Show("alert");
or when I try to connect internet within application and there is a problem and Windows shows me some messages popping up from the top of the screen..in this cases I lose my full screen and the top menu bar of windows becomes visible again..
any ideas?
You can use SHFullScreen to hide the start icon and other system areas of the screen. There is an undocumented function named AllKeys which will allow you to block some of the hardware keys (notes, recorder, green + red phone keys) from running. It will require a lot of work because there are many ways to run programs and the taskbar has a habit of reappearing after a program is run. Simply calling SHFullScreen once is not enough. You'll have to handle WM_ACTIVATE messages and call SHFullScreen again and force your program to the top again. It's a struggle against the operating system to have a true kiosk application on Windows Mobile.
Getting an app to "kiosk mode" in Windows Mobile is challenging becasue the platform simply isn't designed for it. This page has a lot of links to resources of getting it working. Using your favorite search engine to look for "compact framework kiosk mode" is likely to bring up more as well.

Categories