Android 如何在Webservice中获取移动设备标识
我有android原生应用程序和web服务。我们的申请是大学申请。为会话问题生成长寿令牌。所以我们计划使用MDM,我在Google上搜索,找到了一些解决方案Android 如何在Webservice中获取移动设备标识,android,web-services,mdm,Android,Web Services,Mdm,我有android原生应用程序和web服务。我们的申请是大学申请。为会话问题生成长寿令牌。所以我们计划使用MDM,我在Google上搜索,找到了一些解决方案 Open Mobster (Open Source Mobile Enterprise Backend) Apache USerGrid_ (Mobile Backend as a service) OpenMeap - not support native 问题是我不知道这个MDM是否提供设备识别功能。如果有人知道,请告诉我。设备标识
Open Mobster (Open Source Mobile Enterprise Backend)
Apache USerGrid_ (Mobile Backend as a service)
OpenMeap - not support native
问题是我不知道这个MDM是否提供设备识别功能。如果有人知道,请告诉我。设备标识可以是任何唯一id或mac地址
或者,如果我要开发我们自己的中间层,我们如何从请求头中获取mac地址。在不传递给服务方法的情况下,应该从请求中获取
有没有办法解决这个问题
请帮助我以下是OpenEAP如何获取Mac地址并将其传递到标头中
package com.openmeap.thinclient;
import java.io.ByteArrayInputStream;
import com.openmeap.http.HttpRequestExecuter;
import com.openmeap.http.HttpResponse;
import com.openmeap.util.Utils;
public class FirstRunCheck implements Runnable {
private SLICConfig config;
private String macAddress;
private HttpRequestExecuter executer;
public FirstRunCheck(SLICConfig config, String macAddress, HttpRequestExecuter executer) {
this.config = config;
this.macAddress = macAddress;
this.executer = executer;
}
public void run() {
if( config.isDevelopmentMode().equals(Boolean.TRUE) ) {
return;
}
if( config.getNotFirstRun()==null ) {
config.setNotFirstRun(Boolean.TRUE);
try {
String macWithSalt = macAddress+".OPENMEAP#$!@3__234";
String hashValue = Utils.hashInputStream("sha1", new ByteArrayInputStream(macWithSalt.getBytes("UTF-8")));
HttpResponse response = executer.get("http://usage.openmeap.com/tracker.gif?hash="+hashValue);
Utils.consumeInputStream(response.getResponseBody());
} catch( Exception ioe ) {
return;
}
}
}
}