0

signalR hub in api project. And frontend i'm using maui app project,

I'm doing chat application through the maui with Signalr concept based.

(Example) User-1 send message to user-2 If send request hit first it will reach the api controller & controller will handle to direct the hub. This is was i'm doing here.

while run the application through the window's machine it will work quite good. But, while run through the android emulator its showing connection failed.I don't know why.

Actually i change the baseaddress also http://10.0.2.2. if click send button that event based method is there. Here i'm getting the message details but It will showing signalR connection failed something

Problem : While run the window's machine works. Why android emulator run time only it will show connection failed error i'm getting

1
  • Hi Senthilkumar, could you share the latest progress? Commented Feb 16, 2024 at 11:53

1 Answer 1

2

Starting with Android 9 (API level 28), Android doesn't allow plaintext traffic (HTTP) by default, requiring apps to use HTTPS to enhance security during data transfer.

So for test environment, we can allow http traffic by setting android:usesCleartextTraffic="true" in your AndroidManifest.xml.

Sample:

<application
    ...
    android:usesCleartextTraffic="true"
    ...>
    ...
 </application>

Related link: Behavior changes: apps targeting API level 28+

Sign up to request clarification or add additional context in comments.

1 Comment

this method helped me after 3 days. best wishes for you

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.