Windows Phone 8 Logging - c#

Description
I just start Windows Phone Development and I try to put some Logs in my application as I usually do in Android, I try to search through the Internet, but can't find anything useful.
Question
Is there in some native methods like Log.i(), Log.e() etc. in Android but for Windows Phone? I don't need to install some new libraries or something else.

Where did you expect to see the Log output?
You can try to use Debug.WriteLine() method, for example :
System.Diagnostics.Debug.WriteLine("Print something");
to print some value to Visual Studio output window.

Related

Making custom tel protocol windows 10

I'm working on a custom softphone application and running into a problem. I would really like to redirect the tel: links to a application on my PC. I have figgured out I need to add my application to the windows TEL; URL:tel option list. However all solutions I'm finding don't seem to work. This documentation isn't working for me (yes i have restarted multiple times) some peaple say it isn't posible in windows 10 annymore, however there are a few third-party application that are popping up. The applictions are not from the windows store so that can't be the issue either.
The .reg export I ended up with looks like this:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\tel]
#="URL:Tel test"
"URL Protocol"=""
[HKEY_CLASSES_ROOT\tel\DefaultIcon]
#="C:\\Test\\Test.exe"
[HKEY_CLASSES_ROOT\tel\shell]
[HKEY_CLASSES_ROOT\tel\shell\open]
[HKEY_CLASSES_ROOT\tel\shell\open\command]
#="C:\\Test\\Test.exe" "%1"
The goal vissual:
Inside the windows settings on the tel: protocol I would like to add my own application (written in C#)
When selected the .exe will be called al a tel: handeler.
I would really appriciate anny tips towards the solution.
you also need to add the software with the related capability.
Check here for the relevant registry keys:
https://newbedev.com/can-t-change-tel-protocol-handler-in-windows-10

How can I open a File Dialog in WPF app that is being converted to a UWP app via Desktop App Converter

I have an app I created in WPF. Current in WPF, I'm using the Microsoft.Win32.SaveFileDialog file picker to let the user select a file location to save to.
I'm in the midst of converting this app to a Windows Store compatible app, via the Desktop App Converter application. When I use the Win32 picker in the UWP-converted app, it just hangs and eventually crashes, so that doesn't seem to be happy.
It looks like there is a UWP-compatible file picker Windows.Storage.Pickers.FileSavePicker, which is available using the Nuget package UWPDesktop.
Unfortunately, this is giving me the following warning -
Type 'Windows.Storage.Pickers.FileSavePicker' can only be used in UWP apps, not Desktop or Centennial
This seems pretty clear to me, so, finally my question is What dialog picker am I supposed to use for a desktop converter UWP app?
Seems like there are 2 options -
There's some kind of 3rd type of file picker that I'm unaware of, that's compatible with both frameworks.
I use some kind of check in the app to see what framework is active (somehow) and use the appropriate file picker.
Thanks in advance!
You can continue to use the Win32 picker in your converted WPF app. That is supported and expected to work.
To answer why you are seeing a crash here:
If you have Office 2016 installed, there was recently a bug introduced with an Office update that is causing the file picker dialog to crash for converted apps. The fix for this bug should go out very soon in a servicing update.
To confirm that this is indeed the bug you are hitting you can look at the crash reports for your app, and you should see a crash in the module grooveex.dll.
Thanks,
Stefan Wick - Windows Developer Platform
I ended up building a sample app containing just the problematic dialog in an otherwise empty app, with the plan of sending it to Stefan over MS.
Of course, everything looked good, so I played with it a little more and eventually figured out what might have happened.
I was running some async code just before the dialog was executed, and it looks like that would fail silently, causing the app to hang indefinitely.
I don't think this will help anyone, just wanted to close the loop.

Windows 8 Tile Icon for WPF application?

guys, first time posting -
I'm a newbie to Windows development and VS (Using 2013 on Windows 8.1).
I've created a very simple application by the action of
File->New Project/WPF application.
The application works great, and does exactly what I'd like it to do.
I successfully added a large (128x128) icon and got it to look great on Windows 7's taskbar and start menu by right-clicking my project in the Solution Explorer and specifying my .ico file through there.
I also added the 'Icon' property to my MainWindow.xaml file and it even looks great on the taskbar of Windows 8...
However, it doesn't even display my app's icon on the Start Menu of Windows 8, and I am having a really hard time finding documentation specific to this issue.
I'm sure it's a no-brainer but I'm just stuck.
How do I get a nice icon and tile in Windows 8?
Live tiles are only supported in Windows Store Applications but you can use some third-party solutions that provides a way to add this capability via the interoperation between your Desktop Application and separate Windows Store application (this one is installed on end-users computers and behaves like a server that can provide a Tile for its clients, which actually are the Desktop applications).
For example, DevExpress solution - WinRTLiveTileManager.
Or you can implement this approach itself...
Live tiles are only supported in Windows Store Apps unfortunately.
See this thread...

Windows Phone Programming Visual Studio

I am programming some applications for the Windows Phone and am looking for some standard debugging practices that I cannot figure out how to do in a Windows Phone project in Visual Studio.
How can I print statements to the command line just for debugging purposes in a windows phone project?
Can I use MessageBox.show() (it seems that I cannot import System.Windows.Forms)
All help is appreciated!
you can use Debbugger.Log which will output to debug window
http://msdn.microsoft.com/en-in/library/system.diagnostics.debugger.log(v=vs.95).aspx
Indeed, you cannot import System.Windows.Forms from a Windows Phone project. In the case of WP7 you will program using a subset of Silverlight. With that in mind, there is a Message Box control in Silverlight for WP7 using the System.Windows namespace: http://msdn.microsoft.com/en-us/library/system.windows.messagebox(VS.95).aspx
I suggest that you approach your debugging needs by leveraging unit tests instead of printing to the Message Box.
For advanced tracing and logging you may want to take a look on
Silverlight and WP7 Exception Handling and Logging building block
NLog for Windows Phone
You can simply use Debug.WriteLine(Something); just like Console.WriteLine(Something);. The Something will automatically be converted to string. This is as simple as it can get.
As indicated, you can indeed use MessageBox control. It's present in System.Windows namespace. You can also use some third party toolkit like Coding4Fun if you need customized messagebox.

How to create a driver for my application

I build 2 application one for android and one for pc
My application is to make the camera of android mobile appear inside application of C#
but I didn't use DirecShow in my application..
it's work good ..but still I have to make the application of c# which display the camera
appear as an option inside Skype and MSN which I think make this application like driver
any help to do that will be great
Thanks
I don't think you can write a windows driver in c#. Maybe you should begin reading here: Windows Driver Kit (WDK)

Categories