Closed ramazanyich closed 8 years ago
I tested SMS push reconfiguration with the Android client TAPI 1.6. The decoding is correct. See below the log traces: _10-20 10:49:01.894 17846-17846/com.gsma.rcs V/[RCS][ProvisioningPushSMSReceiver]: Configuration SMS receiver - Received broadcast: android.intent.action.DATA_SMSRECEIVED 10-20 10:49:01.904 17846-17846/com.gsma.rcs V/[RCS][ProvisioningPushSMSReceiver]: Binary SMS received with :208017503782236-rcscfg 10-20 10:49:01.904 17846-17846/com.gsma.rcs V/[RCS][LauncherUtils]: Stop RCS service 10-20 10:49:01.934 17846-17846/com.gsma.rcs V/[RCS][LauncherUtils]: Reset RCS config 10-20 10:49:02.344 17846-17846/com.gsma.rcs V/[RCS][ContactManager]: deleteRCSEntries 10-20 10:49:02.404 17846-17846/com.gsma.rcs V/[RCS][StartService]: Launch RCS service (boot=true) (user=false) 10-20 10:49:02.404 17846-17846/com.gsma.rcs V/[RCS][HttpsProvisioningService]: Stop retry configuration update ...
The utf16 encoding of the 208017503782236-rcscfg is shown below: 003200300038003000310037003500300033003700380032003200330036002d007200630073006300660067
I'm implementing the sending of network initiated config request from server part I construct an SMS content as byte array: new SMS((client.getIMSI()+"-rcscfg").getBytes("UTF-16"), Sms.DataCoding.UCS2) ... message is sent and received by RCS listener ProvisioningPushSMSReceiver. but conversion of smsData is not correct. it is constructed as final String smsData = new String(msg.getUserData(), UTF16);
but as result I got some chinese characters... if I replace that line by final String smsData = msg.getMessageBody(); then I got correctly something like 214011001388741-rcscfg Could you please adjust the code ?