toJson is the method to convert the android device information to json.
String toJson() => json.encode(toMap());