Windows Phone schema uri for “Gps monitor & webcam” apps

URI Association Schemes by Reflection and Windows.System.Launcher.LaunchUriAsync

Gps monitor & webcam is a travel/navigation apps, you have a WEBCAM/MAP with directions (location and route) functions. You can launch NOKIA HERE DRIVE APPS, NOKIA HERE MAPS APPS, NOKIA HERE TRANSIT, gMaps APPS. You can find point of interest or set d/a point on the drive navigator apps (usefull for tourism or search coffee shop, restaurant, hotel, market). The web cam are retrieved through webcams.travel.It is a service designed to offer users, the ability to view world web cam, of the touristic places par excellence. For holiday/vacation or to discover new places as city (also useful to see meteo/weather or traffic info). Public URI Association Schemes ListFollow on facebook

windows phone uri association schemes/schema uri , webcam, city guides, point of interest, weather/meteo

Through the schema uri you can open/launch my apps (from inside your apps), and see webcam nearby a point. For example, if you have a travel, tourism, navigation, city guides, point of interest, weather/meteo, etc … apps. If you pass the coordinate of a generic point to my app (through the schema uri), then it shows webcam nearby the point. The uri must have the follow syntax. IMPORTANT: the schema uri must respect the parameters order. To launch the application, there are 2 methods.

A URI association allows your app to automatically launch when another app launches a special URI. What makes that URI special is that it begins with a URI scheme name that your app has registered for. The URI scheme name is the portion of the URI that comes just before the colon (‘:’). The URI scheme includes the URI scheme name and all of the URI that follows the colon. MSDN-Documentation

gpsmonitor://v1.0/nearby/?origlat=[p1]&origlon=[p2]&destlat=[p1]&destlon=[p2]&appid=[appid]

origlat = your latitude (where to find webcams)

origlng = your longitude (where to find webcams)

destlat = your latitude (where to find webcams)

destlng = your longitude (where to find webcams)

appid = your appid

Uri uri = new Uri(“gpsmonitor://v1.0/nearby/?origlat=” + lat + “&origlon=” + lng + “&destlat=” + lat + “&destlon=” + lng + “&appid=”+ appid);

As you can see, origXXX and destXXX, must be set to the same value.

If you have a 7.1 apps (that run in a 7.1 and 8.0 device), you must use reflection. Here an example of code.

public static void Nearby(GeoPoint p)
{
string lat = p.Lat.ToString().Replace(",", ".");
string lng = p.Lng.ToString().Replace(",", ".");
string appid = "acc5da27-0d99-4198-a69c-fe44f544403a";
Uri uri = new Uri("gpsmonitor://v1.0/nearby/?origlat=" + lat + "&origlon=" + lng + "&destlat=" + lat + "&destlon=" + lng + "&appid="+ appid);
Type taskDataType = Type.GetType("Windows.System.Launcher, Windows, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null, ContentType=WindowsRuntime");
MethodInfo showmethod = taskDataType.GetMethod("LaunchUriAsync", new Type[] { typeof(Uri) });
showmethod.Invoke(taskDataType, new Uri[] { uri });
lat = null; lng = null;
}

If you have a 8.0 apps, you can use the 8.0 api. Windows.System.Launcher.LaunchUriAsync.

Uri uri = new Uri("gpsmonitor://v1.0/nearby/?origlat=" + lat + "&origlon=" + lng + "&destlat=" + lat + "&destlon=" + lng + "&appid="+ appid);
var success = await Windows.System.Launcher.LaunchUriAsync(uri);
if (success)
{
// URI launched/y
}
else
{
// URI launched/n
}