androidnode.jsparse-platformconnectionparse-server

Parse Server working for JavaScript SDK but not working for Android


I am trying to create local parse server (node.js) and connect it to android and javascript sdk but when I put the app id & server url & client key in Android , and trying to query an object , the application throwing ParseException no_connection

the keys and url I write :

<string name="parse_server_url" translatable="false">http://192.168.1.200:1337/parse/</string>
<string name="parse_app_id" translatable="false">myapp</string>
<string name="parse_client_key" translatable="false">myclientkey</string>

(This strings for AndroidManifest.xml metadata + Parse.initialize() in the App java file)

javascript sdk working normally even the dashboard opening normally...

when I try to write the server url in android device browser , the page opening normally... I tried to use different parse-server versions (2.1.x/4.5.0/6.2.1) but the only sdk working is JavaScript SDK.

Edit : This is Parse Initialize App.java :

Parse.initialize(new Parse.Configuration.Builder(this)
            .applicationId(getString(R.string.parse_app_id))
            .clientKey(getString(R.string.parse_client_key))
            .server(getString(R.string.parse_server_url))
            .enableLocalDataStore()
            .build());

Solution

  • I solved the problem by adding android:usesCleartextTraffic="true" to application tag in AndroidManiFest.xml