make a call features not working with IOS - c#

This code perfectly works with Android devices but does not work with iPhone connections.
Iphone can send requests to the Laptop with the following step. but the Laptop can not send requests to the iPhone.
https://support.google.com/chrome/answer/9430554?hl=en&co=GENIE.Platform%3DiOS&oco=1

Related

Android Xamarin - net call with ip adress failing for mobile data

I'm caught up in weird issue. I'm making web call using below simple code in my .Net Native Android App
var client = new System.Net.WebClient();
var data = client.DownloadString("http://172.217.12.174");
It was all working fine on API 25 until I recently upgraded it to 29.
Issue is it works fine on wifi connection but fails when switched to mobile data. I only see Timeout exception in debug though.
However it works if I put same url in chrome browser on mobile data.
My initial investigation found this is happening for any ip address based url (I have tried with Google.com IP address above and has same issue). So I think its some issue with Webclient. I have Samsung 10+ only to test with mobile connection so not sure if its problem with my device.

Cannot call localhost deployed on laptop from Android device

Here is my situation:
On my laptop (running Windows 8.1), I have deployed a Web API (written in C#) to my
localhost. I can access this service from laptop browser. The
address is http://localhost:8089/api/... blah blah
My laptop and my Android device are connecting to the same WiFi network, because I'm testing this at home.
I added an Inbound Rule on Firewall for port 8089.
My laptop IP is: 192.168.0.8, but when I call http://192.168.0.8:8089/api/... from my Android device, it said Connection refused.
What should I do now to make my service available to my device? Thanks for your help.

C# SignalR alternative with support for Android and iOS

I'm working on a project that needs to send messages from a server to clients with support for both Android and iOS. For now i'm using SignalR in a C# server application with Android and iOS clients. Everything is working fine. But i'm looking for some alternatives that may be better.
I also did some research and found some examples, but there not fitting my needs.
SocketRocket (only iOS)
Alchemy Websocket (not sure if supports native iOS and Android)
I know this is an old question but in case this topic is still relevant to someone:
We have been using HTTP based requests from client to server and Google Firebase Cloud Messaging to push messages from our backend to a Xamarin iOS application (server to client) at work.
Firebase allows to:
Send notification messages that are displayed to your user. Or send data messages and determine completely what happens in your application code.
and
Add message handling, topic subscription logic, or other optional features to your client app. [...]
We mainly chose Firebase over SignalR because SignalR seemed to stop working when the application was running in the background and the managed C# threads were suspended by iOS.
Firebase turned out to be more reliable in these cases (at least in our use-case).
Although I have no experience with it, Firebase is also available on Android (it's a project by Google after all, so it is officially supported).
Saying either one being "generally better" than the other would come down to opinions and would have to be decided based on specific project requirements, but Firebase is a valid and mature alternative to SignalR in some circumstances, even though the integration with the iOS simulator does not seem to work (server side message push just fails with an exception, at least in our project).

Communicate to PC over USB

How can I exchange data between my WP8 app and my desktop Windows app running on the PC that has the phone connected with a USB cable? On WP7, there was TCP/IP networking over USB connection. On WP8, it seems it no longer works.
On the device side, NetworkInterfaceList class lists the Ethernet adapter, however NetworkInformation.GetHostNames method says there is no IP address assigned to that NIC. Is there a way to assign an IP address to that NIC, and use it for phone-to-pc communication over the USB cable?
On the PC side, looks like the connectivity DLLs implement Smart Device Connectivity API. Where can I find Microsoft.Smartdevice.DeviceAgentTransport.dll for Windows Phone 8 platform?
Are there some other options?
P.S. I am not submitting anything to the marketplace, so private or undocumented APIs are OK for me.
I was just looking for this one myself and found a good resource over at msdn,
IP over USB. As long as you have the windows phone SDK installed you have everything.
Edit: A small update, it seems that the server code must be running on the device and the client on the host, but apart from that everything worked as expected.
Used regedit to add a new entry under HKEY_LOCAL_MACHINE\Software\Microsoft\IpOverUsbSDK and created values similar to other entries, just different ports.
It took a few seconds and a refresh of regedit for IpOverUsbEnum.exe to display the new service.

Is it possible to have Async Socket in Mono for Android using C#?

I just started developing a sample application for Mono. The main task is to implement a tcp-socket server on the android tablet listening for connections from a client. after connecting the client starts sending real-time data and the android application displays the data on the screen. this is important to implement the server side on the android. I am using Mono for Android / C# . I already have about a week google searching and sample browsing.
My question is: if the Async TCP socket works on the android mono framework or not. because my code works fine when I use it in "windows application" to "windows application" platform. but when I change it to "windows application" to "android" the connection simply disconnects.
I know the question is wage, I know you all expect sample source... If I had a place to put the sample, I would definitely put it!
I am using Mono for Android Api 12 Emulator
I already forwarded the TCP port using emulator telnet console 'redir' command
connection establishes but data does not being received on the server (android side)
any help/sample/guide will be appreciated
It is possible to have Async Socket in Android using Mono. there is no specific difference with windows application for this scenario. my problem was actually from de-serializing the message which caused the connection to stop.
problem solved by adding new DesrializationBinder and changing AssemblyName for Android namespace.

Categories

Resources