After burning my mid-night oil in investigating how to make my android app to talk through relay server, here are few things what I have noticed and would like to share my experience with the android SUP integration through relay server so that it can help you if you are facing few challenges.
If you have been using SUP for some time, then you must have been wondering what happened to the MBS and RBS option while generating the code in SUP 2.1.2, which was there in all earlier version, With 2.1.2 there is now a more unified method however both RBS and MBS still exist as such. In android the application registers initially through MBS however the synchronising with the server is done through the RBS method (port 2480 normally). When generating the code however there is no option to select RBS or MBS. It will already be correctly configured to achieve this. Beyond the initial register with the server though, Android should only be using RBS to talk with the application.
When you first connect and register with the server it will need to connect through port 5001 and then synchronize data through port 2480 or 2481 for secure by default (unless changed). You will as a result need both an RBS and an MBS farm for the relay server however with iOS applications (if those are connecting through the relay server) will already use an MBS farm to connect.
As to why it uses both. By nature RBS tends to favor applications which can be used both online and offline. MBS requires more connectivity but sends smaller packages to the device however RBS sends fewer packages to the device but these are larger. Registration to begin with is just a series of messages to verify the device however the main application is designed to also be run-able in "offline mode" using an offline login method which is typical of RBS.
iPhone has the APNS which makes that MBS only really. Blackberry has been RBS since very early versions so changing that would cause people to have to rework any blackberry programs in later versions however the intention is to move the MBS and RBS methods closer together which is why in the SCC for 2.1.2 it states unified and why if you try to generate code in the 2.1.2 Mobile SDK, there is no option to select a communication type. The idea is to bring everything closer together and the MBS method is the best way to register originally with the server.
So typically, what exactly you have to do is, at first ensure that your able to synchronize by directly connected through SUP alone. How do you do that ? Let’s go through the following steps
1) 1 ) Before registering the application set the connection properties:
2) 2) Then go for the registration :
3) 3) If your application has been successfully registered, then let’s set the property for Synchronization :
4) 4) And then you can set the personalization parameters, and then you are good to go with the subscription and synchronization
Now once you are done with all the steps mentioned above and if you are able to synchronize then let’s try achieve it through relay server, If at all if you are using Sybase Hosted Relay Server, you need to create 2 farms, one for MBS and another one for RBS, then configure Outbound enabler in SCC for both the Farms and ensure that status shows as running, let us assume that you have named your Farm-ID for MBS & RBS as developmentMBS and developmentRBS.
In the above mentioned steps, now your HOST will be your Relay Server, PORT & PORT_SYNC will be 80 and the FarmId in step no.1 has to developmentMBS, and then what I did was I have edited the GeneratedDB.java under the initialize method, and that is tricky,
This blog post was written when keeping SUP 2.1.2 in mind,
you are yet confused ? post a question at SAP for Mobile.
I hope this post will be helpful to you, and that was my first blog in SCN, looking forward to see your encouragement.
Thanks you all