4

I am developing application which should be compatible with Window CE 4.x and above version. So, I decided to select .NET compact Framework 2.0 for development option.

But now I have situation that I am not able to find any proper solution for my below requirement.

Requirement;

My application requirement is to display information of database table in application via Web service.

Problem:

Here information in table is dynamic and it will be inserted inserted every few seconds/minutes and .NET CF application should be display latest (last 4 or configured N) information.

I am thinking to implement pull technology in application where application will do web service call every 2/5 seconds or few minutes but this approach is not looking good as it will increase the unnecessary service call as it is possible that new information inserted after some minutes.

So, I am thinking to use push technology in application where server will send notification to .NET compact framework application (client) on new record insert in database table. Notification has message with primary key of record so, .NET compact framework application will call web service method with primary key on push notification from server and display information in application.

Above push technology approach is looking easy with words but I don't have an idea about it's implementation.

I tried to search solution/example for same on internet but could not able find.

Can anyone help me on push technology approach ? How I can implement it in my application?

Jignesh Thakker
  • 3,638
  • 2
  • 28
  • 35
  • FYI, Compact Framework 3.5 will support down to a CE 4.2 device, so I suggest you work with that instead. – tcarvin Dec 08 '15 at 14:40
  • @tcarvin, Thanks for update. I was not aware about that compact framework 3.5 is supported in CE 4.2. I will give a try with .NET compact framework 3.5 application on CE 4.2 device. – Jignesh Thakker Dec 14 '15 at 11:00
  • @coder771, I have used signalR in my ASP.NET application but I doubt I can use it with .NET Compact framework. Still I will check whether I can using signalR with my application or not. If you can share any good tutorial and sample for signalR which can be used with .NET compact framework then it will be great help to me. – Jignesh Thakker Dec 14 '15 at 11:03
  • 1
    @JigneshThakker You could use sockets to send/receive the data, they are supported by the compact framework and operate on a lower level than a web server. – coder771 Dec 14 '15 at 11:35

3 Answers3

4

To be able to push something the app needs a service that is waiting for a push all the time. That can be a socket connection that is signaled by the service, Or it can be a SMS send to the device and processed by the app.

Unfortunately there is no standard PUSH notification support on Windows Mobile as with Android, iOS and Windows Phone.

josef
  • 5,951
  • 1
  • 13
  • 24
  • I reviewed SMS send to device option and it is not looking feasible with current application as one of the constraint of application is to use existing hardware and software of customer. Customer is not willing to buy any new hardware/software for this application. So, I have to find solution which can be implemented with existing hardware/software of customer. I will try with socket connection approach which you have mentioned. Thanks for your answer. – Jignesh Thakker Dec 14 '15 at 11:08
0

There's no PUSH Notification support on Windows Phone, you can achieve this with any type of Service that an APP can continuously try to wait for PUSH all the time...

Waqas Shahid
  • 1,051
  • 1
  • 7
  • 22
0

I implemented below solution to get latest inserted data in .net compact framework application.

  • I created windows service application which hosted on windows server and watch the SQL server database table to get the notification on new record insert. For this I have used TableDependency Library
  • This window service also start TCP server (IP Address & Port)
  • Now once new data inserted in SQL server table, Window service application will get the notification in SqlTableDependency.OnChange event and new record insert data message will be send to all the connected client (Windows CE Application) to the TCP Server.
Jignesh Thakker
  • 3,638
  • 2
  • 28
  • 35
  • Hey, I am looking for a similar solution. How did you manage the connections from server to clients? So how did you send the data message to the clients? – iappwebdev Mar 28 '21 at 09:02