Is there any way to read the query string of a tile in a Windows Phone Background agent. Navigation Context doesn't seem to work.
Thanks in Advance
Enumerate all tiles of the app and you'll be able to check the URIs and query strings: ShellTile.ActiveTiles Property.
Related
Basically I am PHP developer! and now I want to implement the push notifications for windows phone! So for this I have refereed many blogs and also started implement on this! but for demo purpose how I can get my device token and device specific type of my phone that having Windows 8.1 OS.
Is any GUI tool for getting this.
If you need the Device Token as follows-
Byte[] DeviceArrayID = (Byte[])Microsoft.Phone.Info.DeviceExtendedProperties.GetValue("DeviceUniqueId");
string UniqueDeviceID = Convert.ToBase64String(DeviceArrayID);
Debug.WriteLine("Device ID - " + UniqueDeviceID
Also, if you need help regarding push notifications in Windows Phone apps, follow this link-
http://msdn.microsoft.com/en-us/library/windows/apps/hh202967%28v=vs.105%29.aspx
It also has a project for a simple webpage which can send notification to your device for testing purposes.
The following should work
object DeviceUniqueID;
byte[] DeviceIDbyte = null;
if (DeviceExtendedProperties.TryGetValue("DeviceUniqueId", out DeviceUniqueID))
DeviceIDbyte = (byte[])DeviceUniqueID;
string di = Convert.ToBase64String(DeviceIDbyte);
The above code will give you the device ID. You can use the string di to pass the Device ID to your web service to provide the user with push notifications.
I'm new Windows Phone Universal App, I need to implement bar/pie chart.
Tried many dll, Metro UI, WinRtXamlToolKit and WinRtXamlToolKit.Controls.DataVisualization
These dll are not working.
Give me good idea to do this on Windows Phone Universal App. How to do chart programmatically.
Thanks
I believe the Telerik has some Chart libraries that cost money ( can't link though as stackoverflow only permits me to post 2 links ( less than 10 rep) ). I have not used it and it is in Beta version at the moment. Google "Rad Chart windows universal apps" and you can read about it.
When I have needed charts for universal apps i have used the Google Chart Tools. You can use https://developers.google.com/chart/image/ even though Google is not developing on it anymore. It is is freakingly easy to use if you do not want to spend time drawing your own Charts. With the API you can request a chart just through a http request. You can setup almost everything and it's really easy to use thanks to the well documented API.
Here is an example of a bar chart i made using the API.
http://chart.googleapis.com/chart?chtt=Karakterfordeling&cht=bvg&chof=png&chs=300x300&chxt=x,y&chco=0076A3&chf=bg,s,65432100&hxr=0,0,50&chxl=0:|2|4|7|10|12&chxr=1,0,20&chbh=40,0,10&chd=t:2,60,70,10,90
All the arguments are passed through the http request and you can set your Chart up using the Live Chart Playground:
These are the arguments for the http request posted above. You can use the Live Chart Playground to set up parameters like below.
chtt=Karakterfordeling
cht=bvg
chof=png
chs=300x300
chxt=x,y
chco=0076A3
chf=bg,s,65432100
hxr=0,0,50
chxl=0:
2
4
7
10
12
chxr=1,0,20
chbh=40,0,10
chd=t:2,60,70,10,90
In code you set the http string as your ImageSource. You can manipulate the http string in your code and adapt the chart parameters/data if needed. I would recommend using a Converter that you bind to from you XAML. Pass your data to the converter and let it return a ImageSource with the http request. If you are new to Converters you can probably find a few posts about it here on stackoverflow.
Don't use DLLs grab the files into your project.
Add WinRTXamlToolkit.Controls.DataVisualization.csproj to your solution and reference it in the main project and add this to your page.
xmlns:charting="using:WinRTXamlToolkit.Controls.DataVisualization.Charting"
xmlns:datavis="using:WinRTXamlToolkit.Controls.DataVisualization"
Look at the samples project http://winrtxamltoolkit.codeplex.com
Unfortunately, winrtxamltoolkit is only for WinRT; VS 2013 doesn't allow adding of project references of that kind to WinPhone projects.
Sorry to ask such a basic question, but I've spent the last 30mins on google and found nothing (very likely my poor search engine skills!)
I'm upgrading (well, moving code) from a windows phone 8 app to a universal app (the windows store code is largely absent at the moment, I'm currently concentrating on porting over the windows phone stuff).
Previously I was using
NavigationContext.QueryString.TryGetValue
But with 8.1 this doesn't work and I can't for the life of me find out how to get the querystring.
Any help would be very gratefully appreciated.
You can send a parameter the way Vyas_27 written, but make it looks like
//id - first parameter
//value - second parameter
Frame.Navigate(typeof(SecondPage), "id&value");
To get parameters
string[] parameters = ((string)e.Parameter).Split(new char[] {'&'});
string id = parameters[0];
string value = parameters[1];
I am trying to using the CameraCaptureSequence API to capture a sequence of frames of a scene. Currently, I am trying to modify the code available on MSDN for the basic lens sample to accomplish this.
here is what I have done to capture 3 frames. But the app crashes upon start:
public async Task PrepareCameraCaptureSequence()
{
this.cameraCaptureSequence = this.PhotoCaptureDevice.CreateCaptureSequence(3);
this.cameraCaptureSequence.FrameAcquired += cameraCaptureSequence_FrameAcquired;
await this.PhotoCaptureDevice.PrepareCaptureSequenceAsync(this.cameraCaptureSequence);
}
Most of the online resources I saw do the above for just one frame, i.e., using "this.PhotoCaptureDevice.CreateCaptureSequence(1)". Can someone please help me out with capturing multiple frames using CameraCaptureSequence?
Thanks
Ekta
So, I have found something on this MSDN article.
Apparently, the Windows.Phone.Media.Capture.CameraCaptureSequence class currently supports only single frame capture. Hence, while working with the current release of Windows 8 APIs, you must specify a single frame when you call the CreateCaptureSequence method.
That's too bad, I am guessing I will have to work with the frames of a video stream. If anyone comes across another answer to this question, please do share!
How to produce a complete WP8 screenshot? By “complete” I mean “including application bar, status bar, message boxes and keyboard”.
Things I’ve tried:
GDI API that worked in WP7 (GetDC, CreateCompatibleDC, BitBlt), result - CreateCompatibleDC or CreateDCW return NULL, GetLastError says “the specified procedure could not be found”. Moreover, it seems WP8 only has the single HDC, namely 0x00dc00dc, so no off-screen GDI DCs are possible.
InvokeScreenCapture and SaveApplicationScreenShot from ShellChrome.dll – application deactivates, nothing else happens.
D3D11Device1::GetImmediateContext, ID3D11RenderTargetView::OMGetRenderTargets – OMGetRenderTargets returns NULL.
Any other ideas?
I don’t need to pass marketplace certification, so unsupported/undocumented APIs are OK.
In WP8 and under there is no way to capture the entire screen without running in TCB (requires a hacked image) and loading in libs that don't ship with any SDK.