So I want to add a Iconic live tile to my app to display the latest RSS news to its Iconic tile.
Noob here. Anyone can tell me how to do so?
I suppose you have now code which gather RSS news and store it somewhere.
After that you just can use code from here (Nokia Dev Center) - there is nice example.
Just create object and set some properties:
IconicTileData oIcontile = new IconicTileData(); // Create icon tile
// Now you can set some properties
oIcontile.Title = "Tile title";
oIcontile.Count = 7; // Some counter
If you don't have code for RSS - here is tutorial from MSDN site.
Related
Is there a way to open Bing maps that are inbuilt to Windows phone on click of a button. If you have used the Foresquare app, it loads bing maps and show the destination latitude and longitude when you click the directions button. I want to do the exact same thing. Please help me with any resource you have.
Until now I tried the code in this link
https://msdn.microsoft.com/library/windows/apps/jj710324%28v=vs.105%29.aspx
Problem is when I click the button it says do you want to search an app in the appstore. Please help.
You have to use BingMapsDirectionsTask like this (just replace latitude and longitude with yours):
BingMapsDirectionsTask bingMapsDirectionsTask = new BingMapsDirectionsTask();
GeoCoordinate spaceNeedleLocation = new GeoCoordinate(47.6204,-122.3493);
LabeledMapLocation spaceNeedleLML = new LabeledMapLocation("Space Needle", spaceNeedleLocation);
bingMapsDirectionsTask.End = spaceNeedleLML;
bingMapsDirectionsTask.Show();
You can reed more here about Bind Maps directions task.
I'm trying to figure out how to create programatically a tile with specified template (TileSquare150x150Text03)? I tried to follow these guides link , MSDN
and a few similiar, but wherever I paste < tile> ... < /tile > markup (e.g. in page or app .xaml file) Visual Studio underlines this markup and says that "tile is not supported in a Windows Phone project". I don't need any tile updates or tiles with two sides. Just simple one with specified template, background color/image and filled with my text.
Can someone explain me what I'm doing wrong? Thank you for your help.
Simple! You need to parse your tile template (an XML string) into an XElement object in code:
var template = "<tile>etc</tile>";
var tileXe = XElement.Parse(template);
Either configure the template xml to your liking before this or after (demo is in the article you linked)
then post it to the tile manager
var tileNotification = new TileNotification(tileXe);
TileUpdateManager.CreateTileUpdaterForApplication().Update(tileNotification);
You can do this anywhere in your app as long as this code runs on the UI thread. Also note that there is a limit to how often you can update the tile, last time I checked it was every 15 seconds at most.
I have a Windows Phone 8.1 XAML app that uses the MapControl to display maps. In the MapControls Loaded event, I set a valid Bing API key
void MyMap_Loaded(object sender, RoutedEventArgs e)
{
MyMap.MapServiceToken = the key
MapService.ServiceToken = the key
}
I know the Bing API key is valid because the watermark in the MapControl is not shown.
From the page with the MapControl I navigate to another Page where in the ViewModel I try to find a driving route:
var driving = await MapRouteFinder.GetDrivingRouteAsync(new Geopoint(new BasicGeoposition
{
Latitude = Latitude,
Longitude = Longitude
}), Detail.GeneralInfo.GpsCoordinates.Position, MapRouteOptimization.Time);
The problem is that driving.Status is always InvaldiCredentials.
Is there something that I am missing?
The documentation says
Note that you have to provide the authentication token in two separate properties in an app that uses both Map services and the Map control.
and I did this.
The Bing API key I use is generated for Basic / Public Windows Phone App. I also tried to generate one for Basic / Public Windows App, no change.
I have a working app that uses this token. I only set it to a Map control in XAML, and then I can use both the Map and the MapService, apparently.
My Maps key token is 22 characters long. The only way to get it is, AFAIK
Make an app
Upload it to the store but do not submit
You app gets associated with a store ID and you will see a map token
THAT is the token you will need
See screenshot. Is that the procedure you followed?
Also, make sure xmlns:Maps="using:Windows.UI.Xaml.Controls.Maps", not the old Bing control. Don't even know if the old control is still available in the Universal Apps btw
I'm trying to create a mobile app in xamarin in c# for ios using the google maps api
When you click a marker, the title appears, but when you click it again the title goes away. Is there any way to keep the title from disappearing on the second click?
I want the double click to change the content of the title, but I can't display the info if the title disappears.
Ive been playing around with different combinations of setting mapview.SelectedMarker = marker when I detect a second click on the same marker, but it won't work and I can't find any answers online.
Any help would be appreciated, thanks.
This seems to be working if anybody is having the same problem.
mapView.TappedMarker = (map, marker) => {
//Change the title
mapView.SelectedMarker = null;
return false;
}
hi i am making a website in asp.net which is like social netwroking. users shares their updates and views. i am able to complete all modules but now stucked at a requirement.
i want to get images (not screenshot of page) and description from webpage link, when entered by user into the update status bar. just like facebook do. when we enter some link, it gets its thumbnail images and also some desription of that page.
can someone give me direction how can this be done in asp.net. is there some pluggin or code available..
thanks in advance
You need to:
Download the webpage
var html = new System.Net.WebClient().DownloadString(url);
Parse it as HTML document, or just use Regex to find all image tags. Have a look at this answer for details.
To read meta description - again already answered here.
You could also have a look at Html Agility Pack.
You can generate a preview thumbnail image of a web page using the link for the page and get meta description.
This previous post and this code could be helpful:
System.Windows.Forms.WebBrowser web = new System.Windows.Forms.WebBrowser();
web.ScrollBarsEnabled = false;
web.ScriptErrorsSuppressed = true;
web.Navigate("http://www.your_url.com/with_params");
while (web.ReadyState != WebBrowserReadyState.Complete)
Application.DoEvents();
//this is where we start search the DOM for our meta information and extract the content attribute into a usable string.
String meta = (web.Document.GetElementsByTagName("meta")[0]).GetAttribute("content");
System.Console.WriteLine("Meta Value is {0}", meta);