К основному контенту

Сообщения

Показаны сообщения с ярлыком "C#"

Local notifications in Android with Xamarin

I've been developing an Android mobile app for my pet project. I chose Xamarin framework as a tool just because I'm familiar with C# (even probably writing a native app is much better idea). Since I'm not a mobile developer I've been facing issues from time to time. In particular I realized that enabling local notifications (e.g. reminders) is not that much clear as I would love to. So, this post will go through few steps showing how to set a local notification (or reminder). The info is up-to-date in September, 2020. NB: the post is relevant for Android 8.0 (Oreo) and higher since a feature of notification channels was introduced for those versions (see details here ). The code was tested on a phone with Android 9.0 Pie. Let's start. To demonstrate the process I built a simple app with just two buttons. See code in my Github repository . One button is to set a notification at a selected day and time. Another button will cancel the already set notif...

Utility to parse COM port messages

COM port parser.  Those who deal with hardware often need to read messages from devices connected to your PC over COM ports. This Windows desktop utility helps to read, log and visualize messages from a COM port. Here below I'll provide the details of how to use the utility. COM port settings This part of UI allows to choose the appropriate settings. First of all select from the list the corresponding COM port your hardware device connected to. Then select appropriate baudrate, number of bits, options for parity and stop bits. Once ready click  Open . The default settings are 9600,8,N,1. Data log settings Once the port is correctly opened the utility can log arriving messages to a .txt file. The default name for the log file is generated automatically as  hhmmss_ddmmyyyy_comport_log.txt . You may change the name and directory. Click  Start  to start writing the messages and  Stop  to finish it. You may also add a timestamp to ev...