Send command from c# app to iphone - c#

I am making an project that need to send command from c# app to iphone (in fact i need to get installed list app on iphone and send it to the c# app), but I do not know how to do this. As I search on google I figure out that I must make an client - server with iphone as server and c# app as client, then i will send command from c# app to iphone through socket in LAN (connect into one wifi). I must build an tweak on jailbroken iphone to connect with c# app.
More detail about what i need to do:
C# app will send command to iphone to get installed list app on iphone
Iphone will listen the command and send back data to c# app.
Now i have already build an c# application but do not know what to do next!, can you point me out this problem?

Related

Client on mobile which would control/send commands to my pc server client

I don't know where to start, so let's start by saying what I want.
An application on my Phone which would control/send commands to my PC
I am not asking how to code it, I want to get a brief idea on what I need in order to do it. I had thought of using ASP .NET Core Web Application, but I am not sure if that's what I need, I need a server to be running on the PC, so that the phone will connect to and send commands to the PC Client from the Mobile Client.
Also, It needs to be C# since its the only language I am fluent in.
Which library should I use on the PC and the Mobile?
You can use ASP.NET Core to create a web service that is hosted on your PC. The application on your phone could send commands by sending HTTP requests to the web service.
For example, the web service could react to a request like:
POST http://localhost:8080/do-stuff
But the web service method is not the most performant one. If you put a priority on performance, you should rather work with sockets. You can use the .NET classes like in this example or use a library.
If you want to develop everything with C#, I would recommend using Xamarin for developing the mobile app.

Unable to use SDK for Zebra Scanner model MC33

I'm developing a windows application with using scanner Zebra MC33.
There is SDK pack which is described here: https://www.zebra.com/us/en/support-downloads/software/developer-tools/scanner-sdk-for-android.html
But my model MC33 is not in a list of approved devices. And test desktop app (supply in pack with SDK) does not detect my device.
Can somebody recommed what to do and if Zebra inc. plan to release SDK for my device (MC33) as well?
UPDATE: during debug my app catch answer code
112 = "ERROR_DEVICE_UNAVAILABLE" = " Required device is unavailable"
I work for Zebra and would concur with the comments below your question. The SDK you are using is designed for our range of handheld rugged scanners but the MC33 is considered a Mobile Computer and uses a different SDK.
I don't quite understand what you are trying to achieve by I'm developing a windows application with using scanner Zebra MC33. That device runs Android so if you want to send scan data to an application running on Windows you will first need to capture those scans on the device and then send them (through IP or BT for example) to your Windows desktop app. There are a few ways to do this (https://techdocs.zebra.com/help/) is a good entry point - you could use DataWedge to send the data over IP or you could write an Android app to send the data over a BT socket. There is a Xamarin SDK for C# development on the device that is popular with Windows developers but I don't think you mean that.

Handling gpio value using localhost

i am making a Universal windows Application for home automation, the app UI and hardware interfacing is ready and working
i'm using raspberry pi 2 to serve as gpio
and i plan to use the same app on my windows phone to trigger the ON/OFF request over same local network
the GPIO Hardware interfacing is done and is working
i'm stuck at a point "How do i communicate between my phone app and raspberry pi?"
they are connected to same wifi network
i am a C#/.Net person, and any solution available over internet is for Python/Java.
There are several solutions for your question but none will involve only C# on the raspberry side. What I did (is one of the solutions available but you can choose to use pyton, for example) was to use Node.JS and run a server on a raspberry pi and connect to that server (it could be any type of server TCP server, telnet, web, etc.) and connect from C# to that server and then interact with your GPIO normally. There are libraries in Node.JS (https://www.npmjs.com/package/pi-gpio) to control GPIO so you can write code to handle a connection from your C# app and when connected turn on/off a certain GPIO.
Something like the following will create a TCP server on the raspberry pi and from your C# program you will need to connect to that IP (raspberry IP) and port (1337) and do whatever you want to do.
It is worth the time it will take learn Node.JS (it won't be complicated if you already know C# but it will take time to get used to the syntaxis but you can do so much after you know how it works).
var net = require('net');
var server = net.createServer(function(socket) {
socket.write('Echo server\r\n');
socket.pipe(socket);
});
server.listen(1337, '127.0.0.1');
NodeJs is probably a good portable choice.
But if you want to do it from Windows in C#, ASP.NET, check out the Nusbio device.
You can control gpios from a web site. See the Console demo which use the Nancy web server.

Send and receive info between windows and android through wireless network

I have a c# win app that works with SQL. I want to develop an Android app that sends a query to win app and query result return to Android app. I didn't develop any android app.
1.Is there any way that I connect to my SQL database directly?
2.How send info from android app to PC?
3.How detect android device from win app?
You need to create Web Services and call them from your android app. Please have a look at this link which will give you information on calling webservices in android How to call a RESTful web service from Android?
1.Is there any way that I connect to my SQL database directly?
no there is no way to access SqlServer ... directly , you have to make a webservice to communicate with sql server.
2.How send info from android app to PC?
with that WebService and a url you can call http Post/Get in your Android App and consume the related WebService and send your data to the server and get proper data from server. for implenting such behavior here(StackOverFlow) is huge number of links that you can search for it.
3.How detect android device from win app?
if i get it right you can add google usb driver which is inside Android SDK , then Eclipse/Netbeans or other IDE's can detect your android device.

way of communicating between Windows phone app and desktop app

I want my windows phone app to communicate with a desktop app (in Windows), basically i want to send a picture which is captured in the phone to be send to the desktop app and get back the feedback from the desktop app.
Whats the most elegant and modular and simple way of doing this?
If you can force your user to connect via wifi such that he is on the same local network as the desktop, you listen for the phone's connection on a higher port and transfer the data to/from it over TCP directly.
Otherwise, the best way to do this at present would be via the internet, using your server to synchronize files and messages between the two devices.

Categories

Resources