Mango-developer (2)

Source: Internet
Author: User

In the previous article "You do not know mango-developer Article (1)", I have introduced the new sensor API and multi-task processing mechanism in mango. Today we will talk about live agents.

3. Live agents

First, let's take a lookLocal live tiles. Live tiles is a Windows Phone
7. You can fix a variety of content on the main interface. For exampleProgramShortcuts, music albums, webpages, and so on. Because you can use push
The notification mechanism dynamically changes the numbers, background images, and text on tiles. So it's called live.
Tiles, that is, they hope to bring users a sense of "living", not just a simple shortcut. However, it is relatively difficult to update the tile. The first method is to use push.
Notification, so you must assume your own push
The Notification Server performs processing. The second method is to use shelltileschedule
Api. The disgusting part of this API is that the modified background image can only be an image on a remote URL. In addition, no matter which method is used to update the tile, it always stays after the change
In fact, the interface (background, number, title text) is not very dynamic. Therefore, the new shelltile API is added to mango to better process tile.

Under the new mechanism, the tile of each program is actually composed of two parts: 'front' and 'back. For 'front', it is actually the previous tile, which has three attributes: backgroundimage, title, and count:

The 'back' interface is a newly added interface. Its Attributes are slightly different from those set in front, that is, backbackgroundimage, backtitle, and backcontent. Note that the number is changed to text:

If you set the back part of the tile, the system automatically switches the front and back parts dynamically. Otherwise, only the default front section is displayed. Front and
Back is actually two different views of a tile. Therefore, if you want to update tile in the previous push notification, XML data can be similar to the following format:

String tilemessage = "<? XML version = \ "1.0 \" encoding = \ "UTF-8 \"?> "+" <WP: Notification xmlns: Wp = \ "wpnotification \"> "+" <WP: Tile> "+" <WP: backgroundimage> <front side of tile background image path> </WP: backgroundimage> "+" <WP: Count> <front side of tile count> </WP: count> "+" <WP: title> <front side of tile title> </WP: title> "+"<WP:Backbackgroundimage> <Back side of tile image path> </WP: backgroundimage> "+" <WP:Backtitle> <Back side of tile title> </WP: backtitle> "+" <WP:Backcontent> <Back side of tile text> </WP: backcontent> "+ "</WP: Tile>" + "</WP: Notification> ";

In this way, you can update both front and back. You can see that the XML format is actually different from the previous push
Notification is compatible, but three backxxxx attributes are added later. First, you can use front and back to make your tile more dynamic. Second,
Another way to update tile is to use the shelltile API. Use shelltile
You can easily update the attributes of the tile through the API, And the important thing is that the background image can finally be local. Shelltile
The API not only has the simple function of updating tile. In mango, each program can have multiple tile, and the multiple tile uses shelltile.
API. The second and third tile can point to any XAML page in the program, and even these XAML pages can contain parameters. Similar to
Tile points to "/news. XAML? Id = 5 ". This allows the program to add different tile on the desktop, and then each tile points to a different location. For example, reading a news
The software can have a master tile on the desktop, which is the conventional tile used to open the program itself. The second tile can point to a specific news page. This directly jumps to
The technology of a specific page of an application is calledDeep linking.

Bing
Search is becoming more and more interesting in mango. First, when you search for a keyword, if a software in marketplace has a relationship with this keyword, the software
It appears at the top of the result list. You can choose to install the software, or you can choose to run the software if you have already installed it. For example, you can search for the express retrieval software submitted by wpmind.
"Pocketexpress", this software will appear in the list for you to install (of course, if you have already installed it, the prompt is "run ).

WhileAPP connectThis term is rarely used at present and is not mentioned in the mango SDK of beta version. However, it seems to be the Bing search extras mentioned in mix11. You can search for movies, music, or other types of specific cards on the results page. For example, if you search for "Water for elephants" (this is the name of a movie), the following playlist is displayed on the search results page:

Click the timetable to enter the details of the movie:

In this case, if you have installed a search
When the extras function is applied. For example, IMDB (for the mango version, the version in marketplace has not been tested yet) will appear in one of the movie cards.
"App" pivot view page. When you click the application in the list (IMDB here), the specific information page of the application is displayed (based on the input parameters ).

This is the app connect function, which combines the results of your application with Bing search. Through enhanced Bing search and app
The connect function further enhances the interaction between your software and system. Unfortunately, the current beta version of Mango SDK does not find the relevant API introduction.

Note:This article is based on some of the course content of mix11 and the document of Windows Phone Developer Tools 7.1 (Beta) with my own understanding, which may lead to some deviations. At the same time, the knowledge about mango mentioned in this article may change after the official version of mango is listed.

Additional reading:[Mix11] mango

This article is first launched: wpmind.com

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.