Not unknown 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 concept proposed by Windows Phone 7. Users can fix a variety of content on the main interface. For exampleProgramShortcuts, music albums, webpages, and so on. Because you can use the push notification mechanism to dynamically change numbers, background images, and text on tiles. Therefore, it is called live tiles, that is, to bring some "live" feelings to users, not just simple shortcuts. However, updating the tile is relatively troublesome. The first method is to use push notification, so you must assume that your push notification server is responsible for processing. The second method is to use the shelltileschedule API. This API is disgusting because 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 is always stuck on the changed interface (background, number, title text), but it 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 are 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 compatible with the previous push notification, but there are three backxxxx attributes later. First, you can use front and back to make your tile more dynamic. Second, there is another way to update tile, that is, through the shelltile API. Through the shelltile API, you can easily update the tile attributes. What's important is that the background image can finally be local. The shelltile API has more than just the simple function of updating tile. In mango, each program can have multiple tile, which is created using the 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 a tile pointing 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, a news reader 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. The technology that directly jumps to 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 is related to the keyword, the software will appear 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, if you search for the shipping search software "pocketexpress" submitted by wpmind on behalf of you, this software will appear in the list for you to install (if you have already installed it, you will be prompted to run it ).

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:

If you have installed an application with the search extras function on your mobile phone. For example, IMDB (the version in marketplace is not available for Mango) will appear in an "app" pivot view page in this movie card. 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 the enhanced Bing search and app connect functions, the interaction between your software and system is further enhanced. 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.

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.