on 07-22-2015 9:45 AM
Hello mobility experts.
We want to extract device uniq id (for example SN) when agentry session goes and store it somewhere in SAP. I've searched SDML reference and did not find anything for Android devices. Could you help with this question? Maybe some other ways exists...
Regards,
Andrey
Andrey,
I am assuming the reason you are asking the Serial Number is to uniquely identify the user transmitting. Let us assume that deviceID = Serial Number for this discussion purpose or the ability to uniquely identify a device.
With this said, most of the SDML are designed for Windows type of devices. You may try <<user.client.LocaleID>> or you may try <<user.deviceid>>.
I am not really sure if the <<user.deviceid>> was fully integrated as the documentation on this is lacking in SAP.
Starting from Agentry 6.0.32 see reference: Agentry Patch Notes 6.0.32 - SAP Mobility - SCN Wiki
AG-24058 - Change Android client to default to using server-generated device IDs
This feature may or may not be related to the SDML <<user.deviceid>> as it is purely used inside the Agentry core libraries called deviceID(). I am not sure if this is part of the openUI control where the deviceID() may be exposed. You may need to research the openUI section.
I believe this piece of code was replicated into Agentry 6.0, 6.1 and 7.0 (In theory copied into SMP 3.0).
The main comment of this is:
~~~~~~~~~~~~Start here~~~~~~~~~~~~~~~
This was tested with multiple transmits from multiple devices and the server's device logs show the same number of device IDs (updating the user information of the device ID when a user is changed on a device)
~~~~~~~~~~~~end~~~~~~~~~~~~~~~~~~~~
I have not really played with this but you may try it out (<<user.deviceID>>). Worst comes to worst it may not be supported as it is not part of any of our documentation in SMP 3.0 SDML document. It could only be a control inside the Agentry core libraries wherein when they use the deviceID() function it returns the Android device id. Again this may be openUI.
Hopefully somebody in the Agentry core of designers may expand on this subject matter. With respect to support, if it is not documented it is not supported. I gave my best shot at this question by providing the Agentry key bug number listed above from the release notes.
Hopefully somebody who is within the inner circle of development may shine in.
Another idea: If you are trying to uniquely identify the transmit by getting the serial number or key of the device, you may also try to use the USERGUID available for each user that transmit against SAP backend with a particular device. This is normally stored in a /SYCLO/ Table MDW00 for each user transmitting. You can probably use this data to uniquely identify the user as this is normally use by the SAP Work Manager product to identify that a particular user is transmitting.
Best Regards,
Mark Pe
SAP Platinum Support Engineer
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Mark,
Thank you very much for approach. I decided to use OpenUI. I attach class logic, maybe someone find it useful.
package com.sap.mobile.platform.client.openui.extensions;
import com.sap.mobile.platform.client.openui.adapters.StringDisplayAdapter;
import com.sap.mobile.platform.client.openui.models.StringDisplayModel;
import android.content.Context;
import android.net.wifi.WifiInfo;
import android.net.wifi.WifiManager;
import android.os.Build;
import android.telephony.TelephonyManager;
import android.view.View;
public class ZAndroidInfo extends StringDisplayAdapter {
StringDisplayModel _model;
Context _context;
@Override
public void initialize(StringDisplayModel arg0, Context arg1) {
// TODO Auto-generated method stub
_model = arg0;
_context = arg1;
}
@Override
public View getView() {
// TODO Auto-generated method stub
return null;
}
@Override
public String getExtensionString(String name)
{
if (name.equals("MAC")) {
WifiManager wifiManager = (WifiManager) _context.getSystemService(Context.WIFI_SERVICE);
WifiInfo wInfo = wifiManager.getConnectionInfo();
return wInfo.getMacAddress(); }
if (name.equals("IMEI")) {
TelephonyManager telephonyManager = (TelephonyManager)_context.getSystemService(Context.TELEPHONY_SERVICE);
return telephonyManager.getDeviceId();
}
if (name.equals("SERIAL")) {
return Build.SERIAL;
}
return "";
}
}
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.