2

This bug is getting me crezy. I looked in forums but none answered to this particular question. here is my sample code on AndroidManifest.xml:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    .
    <uses-permission android:name="android.promission.INTERNET"/>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
    .
    <application
        .
        android:usesCleartextTraffic="true"
        . 

and although I put all permits as needed and uninstalled + installed the application, it still gives me an exception

W/System.err: java.net.SocketException: socket failed: EPERM (Operation not permitted)
W/System.err:     at java.net.Socket.createImpl(Socket.java:492)
        at java.net.Socket.<init>(Socket.java:446)
        at java.net.Socket.<init>(Socket.java:218)
        at com.diamcom.blue.connect.send(connect.java:23)
        at com.diamcom.blue.sendToServer.sendChanges(sendToServer.java:43)
        at com.diamcom.blue.sendToServer.run(sendToServer.java:25)

Any idea ?

2
  • now I see that on forum stackoverflow.com/questions/60203194/… someone offered that the wifi I am connected with in emulator is not allowing me to connect to the api I am calling, but no solution was offered Commented Jun 18, 2020 at 3:38
  • @DipankarBaghel Commented Jun 18, 2020 at 4:36

1 Answer 1

2

So looking through your manifest shows your internet permission is spelt wrongly.

It is: <uses-permission android:name="android.permission.INTERNET" />

not: <uses-permission android:name="android.promission.INTERNET"/>

This might not solve your problem, but it's one step forward to figuring out what's wrong.

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

Comments

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.