listing15-17_useridentification.java

来自「着几乎所有智能机厂商都将有自己配套的App Store,甚至并非智能手机制造商的」· Java 代码 · 共 23 行

JAVA
23
字号
// Listing 15-17. Retrieving a Globally Unique Identification ID


public String getIdentification( MIDlet midlet ) 
{
	//#if user.msisdn:defined
		//#= return "msisdn:${user.msisdn}";
	//#elif polish.Property.imei:defined
		//#= return "imei:" + System.getProperty( "${polish.Property.imei}" );
	//#elif polish.Property.imsi:defined
		//#= return "imsi:" + System.getProperty( "${polish.Property.imsi}" );
	//#elif polish.api.btapi
		return "bluetooth:" + LocalDevice.getLocalDevice().getBluetoothAddress();
	//#else
		String msisdn = midlet.getAppProperty( "user.msisdn" );
		if ( msisdn != null ) {
			return "misdn:" + msisdn;
		} else {
			return null;
		}
	//#endif
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?