Just started to look on how to develop on windows phone and i found about PhoneGap and Visual WebGui and i thought about the next ideea: if i start a new silverlight for windows phone application in visual studio and i create a web browser, like i saw in PhoneGap, and to use javascript and html5 for the application. The problem is that i want to use Sockets from C# (since javascript only has websockets... ), i know i can use java script code in C# to manipulat a html5 page but is it possible if the user clicks a button to use the Socket from C# to send a message to the server(like using javascript to call a method written in C#)?
Thanks
Yes, you can create your own FFI between JS & C# to create a bridge in both directions. The PhoneGap code should provide a good example of how to call in both directions.
Related
I want to create a vpn application such as "Touch VPN" or "Hi VPN'
How to use xamarin to connect to vpn server using .open files in the background?
There are several example source codes in Java
But I never found any source code in xamarin c#
How can I use c# for that purpose?
Please see example Xamarin.Android VPN service demo: https://github.com/luqmanhussain/XamarinAndroidVPNExample
Accodring to your several examples, you can convert java to C# code as well. There are some tips when you want to do that.
https://learn.microsoft.com/en-us/xamarin/android/get-started/java-developers
It depends on which protocol you need. But if you need a custom protocol or want to develop your own protocol in .NET using Xamarin, you can see our VpnHood project, a component base VPN via NuGet packages. It is in C# and uses Xamarin to develop the client for Android.
https://github.com/vpnhood/VpnHood
a while back i made a C# Windows Forms which generates PDF report by using itextsharp.
Also, I made phonegap app that communicate with SQL Server that can DELETE, UPDATE and SELECT from database and it's working fine.
Now here is my question
How can I send data from Phonegap application to C# windows form, which run on the server side, to generate A PDF report?
This is what I found out so far and i'm not sure if i am going in the right direction
1.Re-write the code of C# Windows form to asp.net form
2.make a C# webservice which can receive data from phonegap and use asp.net to generate a PDF Report.
3.webservice should be at server side running 24/7
All I want is that "something" should be at the server side waiting for data, once it receives data it should make a pdf report out of it.
Thank you and I hope that was not confusing.
I just need to be pointed at the right direction.
Finally I found the answer i was looking for.
These are the main points I mentioned on my question:
I made C# Desktop app for generating PDF report using iTextsharp
I want a Phonegap app to generate PDF report by sending data to C# desktop application.
The answer simply is to make C# web service and consume this web service from phonegap. it took me some time but it's working perfectly.
I 'm working on system that consisted of two part .first part is android application (client app) capture image and send to WPF application .second part is WPF application (server application) that receive that image , do some kind of processing on it and send back info about the image ,so what is the best way to make it work like server(WPF)/client(android) .
Using HTTP, preferably implementing as REST service, is the way to go. WPF/WCF and Android have libraries you can use to implement this. For Android, take a look at [Android's HTTP clients][http://android-developers.blogspot.com/2011/09/androids-http-clients.html) blog post.
Thanks ,I search about it and i found this framework Eneter and this Example on it Android: How to communicate with .NET application via TCP .
I am new to developing Windows Phone applications using C# and I am trying to send some data through POST to a PHP file from my Windows Phone 7 application on click of a button. I wish to receive the reply from the PHP script and print it out to a Text Block. I have tried some code samples from MSDN, but they throw some errors which I am not able to understand.
This was the sample from MSDN that I tried : http://msdn.microsoft.com/en-us/library/ktfa4fek%28v=VS.90%29.aspx
I ran into many errors by trying the above example. Can anyone help me with the C# code to send POST data to PHP and receive response from it? Also, to get the response, is it enough to Echo the data from PHP or do I need to do something else like returning the value?
The problem is you are trying to use an example from the full .NET Framework. Windows Phone 7 does not support the full .NET framework. Your app actually has to target the Silverlight Framework, and if you look at the WebClient class in Silverlight, there is no UploadData() method.
You have to use one of the appropriate methods in WebClient for Silverlight
Without knowing more of your code and what you are trying to upload, it is hard to say which one, but you have several overloads of UploadStringASync() or OpenWriteASync() to choose from.
Likewise the other classes you are trying to use do not have the methods in the Silverlight framework
I have designed a desktop application in c# and web application in php. my desktop application requests data by calling php file and some portion of desktop application showing web forms using web browser control. both process takes too much time. is there any other method speed up this two processes
I would write your PHP app so that it has a RESTful API available that the C# application can connect to. In this way, you can use a technology like WCF to communicate to your web-based API and use C# in your desktop app to present and work with the data being managed in the PHP app.
You're looking at going back about 15 years to the client-server architectures... not a bad thing, but all of the lessons we learned then are going to be applicable to you now.
You might could implement something with Adobe AIR.
Adobe Air