Run existing native Android App over the SUP

Advertisement
Hello everyone,
we have developed an Android app, which connects to the ERP system via  a "simple" Rest webservice. Now we have a customer who wants to run the same app over the SUP. We have installed SUP and want to know which is the easiest way to run our Android app over the SUP. What would be the first steps to connect our app to the SUP. What changes have to be done in the existing code?
Thanks and Regards,
Themicaa
Advertisement

Replay

Hi Themicaa,
Are you using SAP NetWeaver Gateway 2.0 to expose your ERP contents as REST services?. Are you following oData formats?
Connectivity to SUP would be simple.
Install SUP2.1 Server. Once you have the above setup ready, you need to do the below configurations.
1. Configure releay server in SCC.(Only if device connectivity from outside firewall.)
2. Create security configuration in SCC.
3. Create applicationID and application connection in SCC providing Gateway Service Doc/Proxy URL.
Refer thread http://forums.sdn.sap.com/thread.jspa?threadID=2132783&messageID=11081762#11081762 for details.
Install SUP2.1 SDK installer.
With SDK installer you will get libraries for Connectivity, Parser, Cach etc.
Add libraries from  <UnwiredPlatformSDK_InstallDir>\MobileSDK\OData\Android\libraries\. to your application project.
Use the below piece of code to register the application wit SUP server.
          try {
               /* STEP1:Initialize the App */
               LiteUserManager.initInstance(getApplicationContext(), "applicationID");
               /* STEP2:Provide SUP connection Settings and Register the User */
               LiteUserManager usrMngr = LiteUserManager.getInstance();
               // usrMngr.setConnectionProfile(Server_Host, Port, FormID);
               if (!usrMngr.isRegistered()) {
                    usrMngr.setConnectionProfile("10.66.57.144", 5005, "0");
                    // usrMngr.registerUser(userName, actCode);
                    usrMngr.registerUser("APPUSER", "123");
          } catch (MessagingClientException e) {
               e.printStackTrace();
ODP-reference Android app available @ https://cw.sdn.sap.com/cw/docs/DOC-146460
Regards
Rohith