I am writing an app where I want to get the model type of the device and relay it to my server. I am currently doing this in this way:
try{
String path = URLEncoder.encode(Build.MODEL, "utf-8");
} catch (UnsupportedEncodeingException e) {
e.printStackTrace();
}
HttpGet httpGet = new HttpGet(baseUrl + "/" + path);
My question is if the Build.MODEL string that is returned will always be UTF-8 encoded?
Does anyone know?
Thanks
encode()to encode such a string as UTF-8, the output will be UTF-8 encoded, where appropriate byte octets are formatted in%HHsyntax.