Skip to Content
avatar image
Former Member

How to connect Android emulator to SAP network

I want Android to connect to SAP network and call the HTTP server that i have crated on one of SAP System to interact with the Android emulator.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • May 24, 2012 at 11:17 AM

    Hi Shrinivas,

    If your emulator is in the same network, you can directly call the HTTP URL from your app on simulator.

    make sure you have added the below permission in the androidmanifest.xml of your app.

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

    <uses-permission android:name="android.permission.READ_PHONE_STATE"/>

    If you are looking for the details on connection to SAP via SUP, you can check out this doc http://scn.sap.com/docs/DOC-23532

    Regards

    Rohith

    Add comment
    10|10000 characters needed characters exceeded

    • Hi,

      The error is because of HTTP authentication failure. You can try sending the authentication is headers. I could successfully call oData service from SAP NW gateway using the below.

      Ex:    

        HttpGet GetRequest =  new HttpGet("HTTP URL");

         

            //GetRequest.setHeader("Authorization","Basic Base64Encoding of UserName;password");

             GetRequest.setHeader("Authorization","Basic c3VwdXNlcjM6czNwdXNlcg==");

      Regards

      Rohith