I have the app for Android and another app for PC, both were written by me. Android app connects to the PC app, and the PC app sends data (in realtime) to the smartphone.
The problem is: if the PC is connected to the mobile wireless network, I can't get its address, so I can't connect my Android app to the PC.
So, is there some simple application (for Windows), that I can use as a server for data forwarding. PC and mobile App will be connected to this server (launched on the station with the static address), and the server will just forward data from one app to another?
Or maybe there are good tutorials for creating such kind of server on C#/Java?
I would use a third pc (a server) that acts as a bridge for Android and PC. I wrote a web service in .NET for a virtual server on the internet. Both Android and PC know the ip address (or the domain name) of the server.
The PC talk to server using .NET native web service call, the Android uses ksoap.
For more infomration about ksoap for android look here:
http://code.google.com/p/ksoap2-android/
EDIT:
I suppose you can have the web server in the pc but you need to configure your modem to forward specific ports to the pc. But if you have no static ip address you need to reconfigure the ip address on Android device everytime your modem is rebooted (or switched off/on). You can also try to use dynamic dns services...
Check this out:
http://whiletrue.blog.com/2013/07/11/smartphone-as-pc-controller/
I've made this with Muzzley. Basically, you already have most of the work done if you integrate with it.
(disclaimer: i work for this project)
On the PC side, you can use the lib to include in you pc app in several languages:
(java) http://www.muzzley.com/documentation/libraries/java.html
(.NET) http://www.muzzley.com/documentation/libraries/dotnet.html
(nodejs) http://www.muzzley.com/documentation/libraries/nodejs.html
On the smartphone side, you can use any of the existent widgets (virtual interfaces):
http://www.muzzley.com/documentation/widgets.html
or eventually make your own:
http://www.muzzley.com/documentation/widgets/webview.html
Example:
You can pull from github several examples here:
https://github.com/muzzley/muzzley-demos/
(check the the webview example)
I hope it helps.
Related
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.
I am working on a project where an Android application sends data via UDP to a Unity application on a Windows server. I can confirm that it works correctly with two different Windows machines. On a third Windows machine, however, nothing is being received.
What I have tried in detail:
The Android device is connected to the Wifi hotspot of the respective Windows machine
Therefore the server ip is always 192.168.137.1, and I have tried different port numbers like 8888, 11000, 60320
All firewalls are disabled on the Windows machines
Could someone please give me a hint, what else I should try?
Scenario: I have a small POS system running in a brick-and-mortar store. The software is running in Windows machines with SQL Server 2008 - 2012 (it varies). There are Android tablets that need to connect to the server in someway to get the data inside SQL Server.
My plan right now is to create some REST Web services using NancyFx and host them as a Windows Service inside the Windows machines. Then the Android tablets will need to connect to the server via HTTP in order to consume the REST API.
I have a problem (perhaps more than one): the network in the brick-and-mortar store is not that reliable and the Wi-Fi signal might decrease for whatever reason.
Question: Is there a way to automatically find the IP or machine name of the server (the one with the REST API) even if these properties change for some reason (unknown network issues or so)?
Yes, the server and the tablets are going to be on the same local network.
it's more of a network problem than programming issue. you must have a DHCP server installed in your LAN. use that to assign an IP to the server with a fixed lease. that way you fix the address of server. clients should preferably connect to that server using its name. since it's a Windows network, name would resolve to the ip address.
that is the simplest solution i can think of
I am looking into writing an application for personal use,
where I want to send data or a file from the android client (on android phone) to the C# server application (on my computer- Windows 7), hopefully through USB cable.
I wrote the C# server and the android client. They can communicate via on the same LAN, but it failed through USB-Cable.
How I would go about setting up this communication?
Can someone give the sample or code for me ?? Thank you!
I need to develop and test an application in Windows Mobile 6 for socket Programming in c#. I have done it in Windows Desktop application (i.e Creating a Windows Console Application that acts as a Server and listens. Then a Windows Form Application that is the client. Has a button and textbox. When i press the button the client gets connected to the server).
Now i have no idea how to check socket programming in windows Mobile 6. (Building a WM6 application that acts as a client and another that acts as sever something like that or should i be using a different approach? I am clueless)
Thanks.
If you just want to test your Windows Mobile 6 client then you can simply connect it to your Windows Desktop application. Click on File > Configure > Network and check the Enable NE2000 option. You can see this blog post to find out how to install the NE2000 driver.
Using Windows Mobile 6 as a client and Windows Desktop as the server is fine. If you want to use the sockets over GPRS or CDMA then you should be aware of the fact your mobile device will likely have a dynamic IP (which can change as the handheld roams to other wireless networks) and will be behind NAT, so it can be difficult to push data out to the handheld without some kind of connection to the server initiated by the client.