Skip to Content
0
Jul 28, 2016 at 09:20 AM

Push notification from HCPms

34 Views

Hello Friends,

We have a running hybrid android application( Not Kepsel , Simple HTML5 application), which is connected to Local SMP.

Now we want to use HCPms.

The challenge we are facing is - Currently our code to register to SMP for push notification is like -

public class EmailComposer extends CordovaPlugin implements

ISMPUserRegistrationListener, OnCheckedChangeListener {

...........

public boolean execute(String action, JSONArray arg1, CallbackContext callbackContext) {

..... registerDevice() ........

}

private void registerDevice() {

try {

mCurrentTAG = REGISTER;

ClientConnection clientConnection = new ClientConnection(context, mSmpAppId, mSmpDomain, mSecurityConfig, this.getRequestManager());

clientConnection.setConnectionProfile(true, mSmpHost, mSmpPort, <relay server url> ,mSmpCompanyId);

clientConnection.setApplicationConnectionID(mSmpAppConnId);

UserManager userManager = new UserManager(clientConnection);

String name = userManager.getApplicationConnectionId();

Log.i("name", name);

boolean a = userManager.isUserRegistered();

if(false == userManager.isUserRegistered()){

mRequestTag = REQUEST_METADATA;

userManager.setUserRegistrationListener(this);

userManager.registerUser(false);

}

} catch (SMPException oe) {

mSuccess = false;

mHandler.post(mUpdateResults);

}

)

....

....

.....

}

.

Hope all gurus must have understood , what values would be there in above used variables.

To register to HCPms what things I need to change in this code or do I need to try some other way to register.

If there is any helpful document or anybody has done this please share your code [Private Information removed by Moderator]


Its on high priority please help.

@<span style="font-size: 10pt;" data-mce-style="font-size: 10pt;">Jitendra Kansal</span> @<span style="font-size: 10pt;" data-mce-style="font-size: 10pt;">Midhun VP</span>

Message was edited by: Michael Appleby