Code example for UnsupportedEncodingException

Methods: getMessage

0
	public String getUrlEncodedDeviceName()
	{ 
		try { 
			return URLEncoder.encode(getDeviceName(), "UTF-8");
		} catch (UnsupportedEncodingException e) {
			Log.e("OpenRemote/PhoneInformation", e.getMessage());
			return ""; 
		} 
	} 
	 
	/** 
	 * Return the email address of the registered user.  
	 * @param context The current application context 
	 * @return The e-mail address 
	 */ 
	public abstract String getEmailAddress(Context context);
	 
	/** 
	 * Return a PhoneInformation instance based on Android version. Used because Android supports the 
	 * AccountManager from API version 5 and up 
	 * @return A PhoneInformation implementation based on the Android version, either PhoneInformationAccountManager or PhoneInformationBase