How to notify C# GUI from PHP - c#

I am writing a RESTful Webservice with PHP. When I change data it is very simple to update a GUI in iOS oder Android with Push Notifications on mobile devices but I haven´t found a good solution for C# desktop application on computer. The user should get these changes very quickly. (1-2 second is ok).
My question is: Is there a similar way to update the GUI in C# like push notifications?
PS: I don´t want to use a windows web service!

Related

I want to send a string from an android device to a windows machine over wifi with c#. Is this possible?

I want to make a program that transmits strings from an Android device, to the web or directly to my PC.
Do note that the android and windows device are connected to the same wifi if this makes a difference. The problem here is that I do not know how to send strings from one device to another. I am thinking of doing it in a txt file and then reading it with the program on my PC (Which I have already tested), but I don't know how to transmit it.
Yes, you can share a data from cross platform devices. There are many methods to do it. I would personally recommend using Web APIs using asp.net core, the consume that Web API in your android application, it can be in Xamarin, and for Desktop you can used HttpClient package to consume either in WPF or Winform.

Send commands remotely to mobile app in Xamarin C#

I am developing a mobile (Xamarin.IOS) and a desktop app (C# Winforms) for our small start-up for internal use. I want to be able to send commands (not remote notifications) to the client (mobile app) through our main desktop app.
For example; I want all our employees using our mobile app to perform certain task, let's say, show a popup window with specific text when they open up the app. Any ideas about how to implement such kind of thing? Is is technically possible to tell a device to remotely execute certain management commands?
Thanks in advance.
There are multiple ways of doing this.
A Microsoft MVP, Mark Arteaga, suggests using Azure Functions-HTTP Triggers to do this. He presented this in multiple Microsoft events and also has a Github repo where he implements it in a sample mobile app.
So whenever you need to, you would send commands through Azure Functions to the client using similar, and if you want to go one step further, you can even look into implementing it with Backgrounding using Shiny

Xamarin - push notification - trigger for update data from server

Im new in mobile development. Now I write a little app.
User login in app
see list view of data from server. when I add something in server i send push to mobile and update data
Right now - i have Droid app that use this component(https://components.xamarin.com/view/gcmclient/) and receive messages
(c# console app for test ) -- all its work
Now question is - when i handle push from server - how to call method for update list view (this logic located in PCL and handle push located in droid app
P.S I still looking for good tutorial for iOS Push notification. Can somebody give me link?
P.S2 - if its possible use GCM for iOS?
You will need to call back into your PCL, either by Dependency Injection or some other method.
PS: GCM for iOS is here: https://components.xamarin.com/view/googleiosgcm

Mobile App to Work Along side a Winform C#

Ive made a Windows Form Application and all is working fine on that.
but what im trying to do is make it so people have a mobile App(that ill end up making) that will allow them to be away from the PC and push a button on the mobile app that will send someform or command to the Winform Application and get it to trigger a button click event.
E.G
Winform is open on PC has a button on it that will play or pause music.
I go get a drink downstairs and i want to pause the music from the mobile app.
Push the button on the mobile app and it connects to the Winform application and triggers the event for the pause button.
If anyone can help me out with this or put me in the right direction to do somthing like this that would be great. thank you.
Ben
Basically what you just described is that you need to build a mobile application.
There are several tools that allow you to move your application to web. I used to work with these guys, they were called Artinsoft at the time but they are now called Mobilize.net, and they have a tool for making this conversion: www.mobilize.net/press/topic/convert-windows-to-web
However in your cases it seems like what you are trying to build is a remote control, in this case you need to either expose an endpoint for a mobile app to connect to or create a centralized server that both the remote and Winforms connect to.
I suggest using a TCP/IP connection. I don't know anything about mobile development, so I'll just focus on .NET and the concepts should carry-over.
System.Net.Sockets contains TCP classes for opening connections to hosts/clients. I'd recommend that the desktop-app acts as the host while the mobile-app is the client.
There are plenty of online articles on the subject, so take one and explore it's code until you understand it. Then, prototype your task on a single desktop machine using two-different .NET programs, one for the host (mimics the desktop program in the final project) and the other as the client (mimics the mobile-app in the final project). Then, learn the mobile API for networking and mimic what you did in the client-test program on-to the mobile platform project.

Detect incoming call iphone 5

I have a question regarding the possibility of creating a winforms application in C#, which is able to detect incoming calls on an iphone.
Here is the scenario:
the iphone is connected to the computer via a usb cable.
whenever the phone rings I would like to be able to do the following:
Retrive the phone number.
Use the phone number in the winforms application, to search xml filer.
Answer the phone via the application and play an automated voice message.
Is this even possible in C#? If so how could this be done and are there any libraries designed for interacting with an iphone using C#??
Thanks and regards.
Anders
There are no SDK's that allow you to develop .NET apps that interact externally with the iPhone.
If you want to write an iPhone app, but are intimidated by the learning curve you could check out MonoTouch. It allows you to write iPhone\Android apps using C#.

Categories